-
Notifications
You must be signed in to change notification settings - Fork 33
C# WPF vs VB6 Controls
Benjamin edited this page Oct 5, 2020
·
1 revision
Most of the standard VB6 controls have an corresponding one in C#. However, certain things are now different. If you are not already, you will have to familiarize yourself with C# controls before you get too far.
If you use Grid
as your default Panel type, however, you can use some of the shortcut functions in the VBExtension
module to add "extension methods" to existing controls to get similar functionality.
MoveControl(C, x, y, w, h, makeVisible = false)
-
Control.SetVisible(true/false)
- or just use the.Visibility
enum, but this helps provide more similarity to VB6. If C# ever releases "extension properties", even greater similarity to VB6 would be possible. Most of the time you just want to useHidden
orVisible
, but you can also use the third option,Collapsed
, with an extra param.