|
You're right. I am now simplifying the code. However, the proble is still there: I call Control.BeginInvoke(new MethodInvoker(myMethod)) and the debugger never stops in myMethod, and the code never executes.
Regards,
Serge (Logic Software, Easy Projects .NET site)
|
|
|
|
|
Hi folks...
I am working with mdi forms and i would like to disable the mdichild to be moved out from the mdicontainer and the scrollbars must not appear. What i am trying to say is that the mdichild form must not be able to be moved out of the parent container. How can i do that?
Sorry my poor english
Thiago
C# beginner - brazil
|
|
|
|
|
My suggestion would be to add handlers to the move and size properties of your child window, and make sure its position stays within the bounds of the parent window
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
and... how can I do that?
I've never worked with handlers in C#... as I said, i am beginner. Plz, help me! If you want, I can send you the project.
Best reguards
Thiago
|
|
|
|
|
I'm not at a computer with C# on it at the moment, but if memory serves me right, you'll need to bring up the form for the child window in the form editor, then in the properties panel click on a little icon that looks like a bolt of lightning (a yellow zigzag) - click that and it'll show all the possible handlers you can give this form - double click on the move and size ones and it'll make the functions for you
(Anyone else able to give a better description?)
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
Hello,
i want to ask if image buttons are supported by Smart Device Applications?
thx
regards
pat
|
|
|
|
|
Hello,
i developed a smart device application with a login function. Now i want to develop that after the user presses the login button for approximately 3 seconds a greeting screen is displayed where personal information of the logged in user is displayed and then it is automatically forwarded to the main screen.
Is this possible to develop for a smart device application? if yes can anybody give me a short explanation how it works?
thanks in advance
regards
patrick
|
|
|
|
|
I'm not sure about smart device applications specifically, but the approach I'd try would just be to open up a form with your greeting message displayed, that has a timer attached set to fire after 3 seconds, and have an handler function for that timer that closes the form. Then just create an instance of the greeting form from the constructor (or some suitable place) of your main form, that'll make it get displayed
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
hi,
I have code to add access control entry to active directory user object so that they can't change password (User cannot change password is checked)
But i wonder it's possible to write code to remove this access control entry again. I have tried using AccessControlList.RemoveAce method..but the "User cannot change password" is still checked.
Using Windows 2003 server active directory and System.DirectoryServices here.
Any help?
Thanks
|
|
|
|
|
Dont know if this is exactly what you are looking for but i found it a very informative site on this topic - maybe you could find some answers/clues there-
http://weblogs.asp.net/cumpsd/archive/2004/02/08/69403.aspx
|
|
|
|
|
Ok i have a DataTable that has 2 columns: ID & Name
I have populated a combo box from that data table like so
ComboBox1.DataSource = XmlIn.Tables["Names"];
ComboBox1.DisplayMember = "Name";
Now when a user selects a name from the combobox and then clicks a button i need away to return the coresponding ID to that name.
I have thought of using a DataView to scan for the name and return the relevent number but was sure there was a tidier way to return the ID value.
Can any one help?
Thank you.
|
|
|
|
|
set the ValueMember property of the control:
ComboBox1.ValueMember = "ID";
ComboBox1.DisplayMember = "Name";
ComboBox1.DataSource = XmlIn.Tables["Names"];
Then, you can get the selected Value by using the SelectedValue property:
ComboBox1.SelectedValue;
Jon G
www.Gizmocoder.com
|
|
|
|
|
just add another line to you code after setting the displaymember -
combobox1.ValueMember = XmlIn.Tables["ID"];
then to get the id you could do something like -
combobox1.SelectedValue.toString()
gavirj
|
|
|
|
|
Hi, sorry to bother with the easy stuff. Im brand new to C#, and loving it BTW.
Anyway. coming from scripting everything in KORN and Perl I need an example of the following in c#.
I would like to see simple c# code to
open a file,
build each line into an array by splitting on a char,
and print that line on a match on any element on an array.
In perl it would go:
@array = `cat file`;
foreach $line (@array) {
if ( $array[0] =~m/something/ ){
print "$line\n";
}
A simple C# example to this would get me off the google prompt, and back in happyville.
--
sween
|
|
|
|
|
Try this one:
FileStream fs = new FileStream(fileName);
StreamReader reader = new StreamReader(fs);
String line = String.Empty
while( (line = reader.ReadLine()) != null ){
if(line.indexOf("something") > 0){
Console.WriteLine( line );
}
Regexp epression = new Regex("~m/something/")
if(expression.IsMatch(line)){
Console.WrileLine(line);
}
}
reader.close();
|
|
|
|
|
Thank you.
FileStream fs = new FileStream(FileName, FileMode.Open);
seemed to work a little better... but all is getting less fuzzy.
Thanks again.
--
sween
|
|
|
|
|
I want to do a edit usercontrol that like VC++. It can auto check user input text's length. But don't like c#,For example, "全角", it's lenthe is 4, isn't 2. How to do it?
|
|
|
|
|
Multiply the string's length value by 2. However, this is NOT indicitave of the amount of memory used by the string (length prefix etc).
To get a C++ representation of what the unicode string, you will probably want to convert the string to an array of short and manipulate it like that. Use the System.Text.Encoding namespace to convert the string to and from a short array.
|
|
|
|
|
when i write my custom collection, and then when i use it and add any member to it, it display default object name in the list.
i want to when add a member to list, i name it member.
|
|
|
|
|
I need to create a taskbar for windows in .NET. It needs to re-size the
available desktop as does the standard windows taskbar.
Can this be done and if so how ?
|
|
|
|
|
Hi CPians,
I need to find out first visible column of a RichTextBox . Please render suggestions how to go for it.
Thanks in advance.
Regards,
Jay.
|
|
|
|
|
Columns? In a RichTextBox? Whatever do you mean?
Are you talking about the first visible Text character?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
Sorry for not being too descriptive, I want to get first visible text character index.
Regards,
Jay.
|
|
|
|
|
Off the top of my head, no methods for this exist.
Are you talking about the first visible character in the RTF stream? I mean, strip away all the RTF formatting and getting the position in the stream of the first character that would render visibly in the control?
Or are you talking about the first visible character when scrolling the control contents left and right?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I mean first visible character when scrolling the control contents left and right.
|
|
|
|