|
Good
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
I have a buuton in my form,when I press this button,another form is open.How can I access controls in first form from second form?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
You can access controls in the first form if their modifiers value are set to public
No time to breathe
|
|
|
|
|
Really?!!!!!!!!!!!!!!!!!!!!!!!Thats my question.How?!!!!!!!!!I want to do it from second(child) one after it is shown.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
I'm sorry, my mistakes, I thought u wanna do it from the first form.
But I found a way that u can try, u can access the parent form's controls this way:
Form.ActiveForm.TopLevelControl.Controls[index]
No time to breathe
|
|
|
|
|
Thanks for your help but this return the control from second form,not parent form.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
I have a problem with datasets. The thing is, that i can not update my dataset. What I have is a dataset with 3 tables which I got from access file with oleDbAdapter. My application changes data in dataset, rows become modified, but when I call update method for the adapter nothing gets updated in source tables. No errors, seems that everything works fine, but it is not so.
oleDbAdapter generates my update/insert/delete commands.
I can not find problem. Can anyone help me?
|
|
|
|
|
I think you need to call AcceptChanges before trying to update.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
I tried, but still does not work! In this dataset there is a table that i need to update which has 4 fields. In appliction I change all fields, and when I call update method jus two fields are updated, but actally all fields in dataset are changed.
Anyway, AcceptChanges marks all modified rows as unchanged, and these rows update method does not take in count, isn't that?
|
|
|
|
|
Finally i found my problem, i had to use methos EndEdit() before updating dataset!! ))
|
|
|
|
|
Same problem i had over the weekend. I was gonna suggest checking the databinding then Textbox problem?
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Anyone know of a good C# named pipe example?
Davy
Blog for Software Testing, Bugs, Quality, Security and Stability - www.latedecember.com
News From Angus, Scotland - The Angus Blog
|
|
|
|
|
I want to COPY a directory to another location NOT move it like the code below does.
Does anyone know of such a method call? I searched the help and didn't see anything.
<br />
System.IO.Directory.Move(strSourceName, strDestination); <br />
|
|
|
|
|
MoveFile is in fact only renaming the directory, which is far less involved than duplicating the directory content (including all subdirectories as well).
There is no such Copy thing in the System.IO.Directory class. In fact, the only class that uses Win32Native.CopyFile (a native call, which is what you end up anyway) is the System.IO.File class. Means that you have to enumerate the files, and recursively call this method.
PS : The FCL is not guilty for not providing such method to us since even the native WIN32 ::CopyFile does not duplicate directories.
|
|
|
|
|
Thanks for the comments....BUT isn't it interesting that a user can do a CTRL+C and then a CTRL+V for paste to another directory? Would be nice to be able to do it in code.
|
|
|
|
|
jesus4u wrote:
Would be nice to be able to do it in code.
You are 5 lines of code away from doing it. Please don't tell me it's challenging you. (and writing those lines takes probably even less than the sole time required to post on Cp).
|
|
|
|
|
What do you mean I am 5 lines of code away from doing it?
|
|
|
|
|
A simple question: how do I match # ?
Jonathan de Halleux.
|
|
|
|
|
Jonathan de Halleux wrote:
how do I match # ?
Same as any other non-reserved character, such as letters of the alphabet. The only time it needs to be escaped ("\#") is if you use the RegexOptions.IgnorePatternWhitespace flag.
Cheers
|
|
|
|
|
I want to create an windows form app that loads new forms into an existing area of a form. An example of this is windows explorer.
When you open win explorer, you get 2 pains divided by a splitter bar. If you click on a drive letter a new window opens in the second pained area, and so on...
How do I do this, is there an example that shows how, is there a term that covers this i can search on for examples?
Thanks
uboat42
|
|
|
|
|
Windows explorer is actually very simple in design... TreeView on the left, ListView on the right with a splitter in between.
To get the same thing in VS.NET, drop a TreeView on your form, set the DockStyle property to Left. Drop a splitter control on your form. Drop a ListView on your form and set DockStyle to Fill.
Now you just have to write the code to fill the tree and list views as well as handle the events
Did I over-simplify it?
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
|
HAHAH, finally looked at the "empty" post long enough for the pic to load Just couldnt figure it out.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Is the part on the right of Windows Explorer exactly a ListView, or is it something derived from ListView? Does ListView inherently support the desktop-like qualities in Icon view where you can drag the icons around arbitrarily and make a cluttered mess?
This question leads into another question -- what is the best way to make a DesktopPanel-like control in C#. Something derived from Panel, ListView, or something entirely different?
|
|
|
|
|
Arun Bhalla wrote:
Is the part on the right of Windows Explorer exactly a ListView, or is it something derived from ListView?
It is a ListView, but I would assume it makes use of every single customization you could use
Arun Bhalla wrote:
Does ListView inherently support the desktop-like qualities in Icon view where you can drag the icons around arbitrarily and make a cluttered mess?
The underlying Win32 control does support it, but it doesn't look like the .NET wrapper of the control does. Of course, if you can do it in Win32 you can do it in .NET by using P/Invoke to call the system APIs. You just have a ton of work cut out for you if you are recreating all aspects of Explorer.
Arun Bhalla wrote:
what is the best way to make a DesktopPanel-like control in C#. Something derived from Panel, ListView, or something entirely different?
I'm not sure what type of program this would be mimicing...something like the Windows Taskbar (a screen wide/high form which stays docked to a side of the screen)? I'm pretty sure there is an article here on CP which makes something like this.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|