microsoft.public.dotnet.framework.windowsforms Archive - March 2002
Post a message to this list
Messages
Page: 123456789101112
Custom Serializer: how to persist objects to resources? (5 replies)
microsoft.public.dotnet.framework.windowsforms
Hello I'm writing control. At design time it's content can be modified and I need to save control's internal state. For this reason I implemented serializer class for my control (MySerializer : CodeDomSerializer). In Serialize() / Deserialize() methods I obtain base class's serializer and it does most of the work. As regards my control's custom data (which is not exposed as properties and therefor...
How can you determine 'EventArgs' at runtime (3 replies)
microsoft.public.dotnet.framework.windowsforms
I would like to determine the event args for a particular event.. I have been able to determine the eventhandler but not the args for example System.Reflection.EventInfo eventInfo typeof(System.Windows.Forms.Button).GetEvent("MouseDown"); //this will tell me the type Type eventHanderType eventInfo.EventHanderType; // will return MouseEventHandler // but I would also like to determine the events ar...
Creating modeless forms in code (2 replies)
microsoft.public.dotnet.framework.windowsforms
I am writing an application in C# and I need to create several modeless forms within an applications code. The problem is that every time I create a new form and show it on the screen it appears entirely inactive. The mouse cursor indicates that it is busy. Here is my code... // the application does other work here Form form1 new Form( ); form1.Show // the applications continues... How can I get e...
Click on UserControl (5 replies)
microsoft.public.dotnet.framework.windowsforms
I have created UserControl and I'd like that this control fire a Click event. Click is a declared event but I don't know how to simalute a click from this object..
TreeView Control Performance - Adding 10000 Nodes - 4 Seconds? (19 replies)
microsoft.public.dotnet.framework.windowsforms
When adding 10000 Nodes to a TreeView Control it takes over 4.3 seconds? (P4 1.9 Ghz) This seems a bit slow to me, does anyone know what I am doing wrong here? When adding 10000 Items to a listView control, performance is much better. int begin Environment.TickCount; treeView1.BeginUpdate(); for(int i 0; i 10000; i ) { treeView1.Nodes.Add("Blah"); } treeView1.EndUpdate(); int end Environment.TickC...
addtional design-time graphics (2 replies)
microsoft.public.dotnet.framework.windowsforms
In the Custom Designers section of NET Framework Developer's Guide it states: "... a System.Windows.Forms.Panel object might not have a visible border at run time. However, without a border the panel is invisible to the developer designing a form that contains the panel. Therefore, the designer for the System.Windows.Forms.Panel object draws a dotted line border around the panel." How do I draw ad...
Error "Exception from HRESULT 0x80131019" when loading C# Controls (2 replies)
microsoft.public.dotnet.framework.windowsforms
I created a new TextBox, derived fom the TextBox Control. When loading this TextBox into a new form I always get the error: Exception from HRESULT 0x80131019. This happens also with other controls I created. I tried different approaches: create a standard textbox in the resource editor and exchange the standard textbox class in the source code. The programm will compile an function as expected, bu...
Bug? with embedding browser ActiveX (2 replies)
microsoft.public.dotnet.framework.windowsforms
A simple example, One Form, to controls on it, a checkBox and a AxShDocVw.AxWebBrowser. During inizialisation i call the navigate function of the browser, so that a html file will be shone. Everything fine. But, the event "Enter" of the Browser control only fires, if you change the focus between the two controls of the form with the Tab Button of the keyboard, if you change the focus by clicking o...
TextBox Scrollbars if/when necessary (3 replies)
microsoft.public.dotnet.framework.windowsforms
Is there a property or some other mechanism for telling a multiline non word wrapping TextBox that you only want to see the two scrollbars if/when they are necessary (ie when the text doesn't fit in the available viewing area)?
ComboBox - detecting when changed by user (2 replies)
microsoft.public.dotnet.framework.windowsforms
How can I detect when a ComboBox changes value because of a user action (I.e. not because of a programmatic change or a change in the datasource) Thanks! Olav
Event and ShowDialog() (2 replies)
microsoft.public.dotnet.framework.windowsforms
In a textbox control I have handled the KeyUp Event (for precision I control the Key Enter/Return) and a Dbl Click Event. If in the Dbl click Event I open a new Form using the SowDialog() method; when I press the button Return in the form opened with showDialog (not with the mouse), after the form is closed, the Event is propagated in the KeyUp event of the txtbox control. Does anyone know why ? T...
Serializing properties of items in a collection (5 replies)
microsoft.public.dotnet.framework.windowsforms
I am writing a custom control which contains a property whose type is a strongly typed collection. I have set DesignerSerializationVisibility attribute on this property to Content. I am creating the collection in the control's constructor and adding an item to it. When I drop the control on a form and bring up the collection editor for the property (at design time) I can see the item I added from ...
Cannot Add a node to a treeview from another form (7 replies)
microsoft.public.dotnet.framework.windowsforms
I have the following problem I WANT TO ALLOW A USER TO ADD A NODE I have the following tree Globe Country City Hotel When I rightClick on the Globe I want to add a country I rightClick on the Country I want to add a City and so on IT FAILS WHEN I REFER TO THE MAIN FORM ROOT NODE WHY? I TESTED THE FOLLOWING AND WORK A FORM A TREEVIEW A BUTTON A TEXT BOX CODE THAT WORKS!!!######## Private Sub Form1 ...
Non Visual Controls (2 replies)
microsoft.public.dotnet.framework.windowsforms
I have a series of SqlDataAdapter controls on a form. Prgramatically, I need to execute the Fill method given the "name" of the sqldataadapter not the object reference. Since a sqldataadapter is not a visual control, I can't walk through the controls list in order to obtain a pointer to the obejct. So, given the string name of a sqldataadapter, how do a find a reference to the object? Thanks, Tom
How to make PropertyGrid can show image list (2 replies)
microsoft.public.dotnet.framework.windowsforms
I made a user control with a propety ImageList and ImageIndex. How can I make the drop down menu as like as Form.TreeView.ImageIndex that can show the imagelist image as a icon in the drop down menu? Best Regards Ayrton Phoenix ^^^^^^^^^^^^ My Email: phoenix@flex logic.com potato@potatotomato.com ICQ UIN: 667462, 667480
Winform controls disappear in designer (8 replies)
microsoft.public.dotnet.framework.windowsforms
Can anyone tell me how to get the controls to show up again in the Beta 2 version when they mysteriously disappear in the form designer? All the code for them is still there and there are no compile errors. They don't show up when you run the application either. Thanks, David
Do Design Time Instances Run Constructors? (4 replies)
microsoft.public.dotnet.framework.windowsforms
Hi all, a couple easy ones. The forms designer is getting in my way. It seems there has to be a way to strike a balance between designing visually and writing code by hand. I like doing both and I have a few questions. Are we really not supposed to edit the code in InitializeComponent()? It would be much easier at times. Also, the designer puts this line in and I'm still trying to understand what ...
Is this a bug? (2 replies)
microsoft.public.dotnet.framework.windowsforms
I've got a form with several instances of my own user control. When doing a drag/drop, I want to display my own cursor when moving over the controls but let it use the default when over the form. I'd been able to get it to use my cursor by setting the GiveIT CertificationEventArgs.UseDefaultCursors to false in the OnGiveIT Certification method. But that method doesn't get called in the form. So I tried to chain m...
Background color of the tabcontrol cannot be set! (3 replies)
microsoft.public.dotnet.framework.windowsforms
I'm facing a bit of a problem. My client wants to change the color of a form containing a tabcontrol. The tabpages itself can have a different backcolor set, but the tabcontrol itself cannot be changed (it uses Color.Control). It seems that the BackColor is hidden in the implementation. Any idea how to make a workaround for this? Stefan de Vogelaere
Sort Multiple ListView Columns (2 replies)
microsoft.public.dotnet.framework.windowsforms
Hi, I want to click on any column header in my listview and sort by that column. Can anyone tell me how this is done with a .NET listview? Thanks, James
Preventing another instance of the application to run. (2 replies)
microsoft.public.dotnet.framework.windowsforms
Hi, I will like to prevent that another instance of my winform application will run when i have current one. I could do a check if an existing process is running and finish the application if exist and set focus to the other one, but i will also will like to display a particular form within the application when it gets called. Does anybody know how can I achieve this and if I'm following the corre...
Thread Recursion (8 replies)
microsoft.public.dotnet.framework.windowsforms
Hello all, I am writing an application in C# that has a recursive method in it. Depending on how many times this method is called, the application can get really bogged down. What I want to do is create a thread that will handle the recursion. I have been researching this for about a week now, and I can't figure out how to get the thread to start on a recursive method. I have tried getting the thr...
OpenFileDialog directories? (2 replies)
microsoft.public.dotnet.framework.windowsforms
Hello. I'd like to use OpenFileDialog to select a directory. How can I do that?
Datasource in parent window (2 replies)
microsoft.public.dotnet.framework.windowsforms
Hy, Can sombody tell me how to refer from a MDI child window to a dataset in the Parent window? Regards, Rob warning
How to change column width and row height in DataGrid ? (2 replies)
microsoft.public.dotnet.framework.windowsforms
How can I change the width of some columns and the height of some (multiline) rows after binding the DataGrid with a DataTable ? Heinz
Ad
Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification