Share via


Using Windows Forms Controls in Visual Basic .NET

Posted May 1, 2004

Chat Date: April 13, 2004

Please note: Portions of this transcript have been edited for clarity

Introduction

Moderator: Jason (Microsoft)
Welcome to today’s chat on Using Windows Forms Controls in Visual Basic .NET. We have members of the Visual Basic and Windows Client teams here to answer your questions today. I will ask the hosts to introduce themselves.

Host: Matt (Microsoft)
Hi there! I'm Matt Stoecker and I'm a programmer/writer for Microsoft.

Host: MarkRi (Microsoft)
Hello, my name is Mark Rideout and I'm a Program Manager in the Windows Forms team.

Moderator: Jason (Microsoft)
And I am Jason Cooke, the acting VB.NET chat coordinator. Glad you all could make it today!

Moderator: Jason (Microsoft)
Let's get started! Fire away with your questions for our hosts.

Moderator: Jason (Microsoft)
(Ed Hickey, our regular coordinator, is off this week.)

Start of Chat

Host: MarkRi (Microsoft)
Q: Will Windows Controls in the next version of .NET support virtual modes? For example, listboxes, comboboxes
A: Our goal is to add virtual mode to the Listview control and to the new DataGridView control.

Host: MarkRi (Microsoft)
Q: MarkRi_MS: Is the reason for this because the underlying Win32 control doesn't support this mode?
A: The ListView is the control that people normally ask about virtual mode for, so that is what we wanted

Host: MarkRi (Microsoft)
A: to target first. Obviously the cost of adding virtual mode to a Win32 control that doesn't natively

Host: MarkRi (Microsoft)
A: support it is much higher, so we have to make decisions based on that.

Host: MarkRi (Microsoft)
Q: Question, is there anyway to call the query builder that the sqlclient.sqlcommand class uses while in design view?
A: No, there isn't any support way to invoke this dialog.

Moderator: Jason (Microsoft)
Q: (PC) Where can I find this propertyGrid control at?
A: It's in Visual Studio 2002/2003, but it's not in the ToolBox by default. To add it, go to the Tools menu, select Customize Toolbox. In the dialog box, select the Framework Components tab and then select PropertyGrid. ...

Moderator: Jason (Microsoft)
A: For more information

Host: MarkRi (Microsoft)
Q: Speaking of the base control class, is there any good documentation for taking the base control class, and deriving from it to represent a control that already exists in Win32?
A: I personally haven't seen any documentation that describes how to do this. If you don't mind learning from example, take a look how Lutz Roeder implemented the Win32 command bar

Host: MarkRi (Microsoft)
A: at https://www.aisto.com/roeder/dotnet/.

Host: MarkRi (Microsoft)
Q: For example, say I have a piece of legacy code, a DLL that creates a windows control. I like what it does, don't want to re-implement in .NET. I just want to create a managed wrapper, much like the other controls in the System.Windows.Forms namespace
A: There are multiple ways to approach this. The easiest way to if your legacy control is an ActiveX control -- you can use it already in Windows Forms.

Host: MarkRi (Microsoft)
A: But, if your control isn't, then your control must have a defined window class that you can create. Take a look at the NativeWindodw class overview documentation for a brief example of using the class name.

Host: MarkRi (Microsoft)
Q: is there an events editor? I want to add a rich design time feature to a string property and provide the editor with the control in question and just have a drop down of events
A: No there isn't. You'll have to use reflection on the type and come up with a list of events yourself.

Host: MarkRi (Microsoft)
Q: I'm often asked why winforms doesn't have a checkboxlist/radiobutton list where each item can have it's own return value like a,b,c,d and each one be a radio button and depending on which is selected is what is returned.
A: We are asked the same question! We have looked at doing this but the benefits of a checkboxlist vs adding individual check boxes is very low but the total cost is high. It is a request that we are aware of though!

Moderator: Jason (Microsoft)
This has been a GREAT chat. Thank you to everyone. Unfortunately, it is time to go. Thanks for participating, and we'll see you next time!

For further information on this topic please visit the following:

Newsgroups: microsoft.public.dotnet.languages.vb

VB .NET Transcripts: Read the archive of past VB .NET chats.

Website: Visit the Microsoft Visual Basic .NET site.

Top of Page Top of Page