The Qt documentation in C++ of this class can be read here: http://doc.trolltech.com/4.4/qwidget.html
This is the parent class of all controls providing common functionality for all controls. |
It receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen.
A Form itself is a control, which is a window with controls.
This class contains functionality for both controls and forms. Some of it makes only sense when working with forms, others when working with non-form controls.
Back to the Framework overview.
Most important
Close a form Close → OnClose , Open a form Open → OnOpen , OpenHidden → OnOpen,
Hide a control/form Hide → OnHide , Visible = False → OnHide , Show a control/form Show → OnShow , Visible = True → OnShow,
Set position of a control/form Move → OnMove, Change size of a control/form Resize → OnResize,
Name, ControlType, Group, ParentForm, ParentControl,
X, Y, Width, Height, GlobalX, GlobalY, OldX, OldY, OldWidth, OldHeight, LoadedX, LoadedY, LoadedWidth, LoadedHeight, Move, Resize, OnMove, OnResize,
Layout, MinimumWidth, MinimumHeight, MaximumWidth, MaximumHeight,
SetFocus, Focus, FocusPolicy, FocusProxy, FocusOrder, OnGotFocus, OnLostFocus,
FontName, FontSize, FontItalic, FontBold, FontUnderline, FontColor,
StatusTip, ToolTip, WhatsThis,
OnKeyDown, OnKeyUp, OnKeyPress,
See the style2 example project for more information.
For Forms set Opacity, but this will only work for top-level window forms.
For all non-form controls try to set Background to ” ”, which will neither load an image nor a color as background for the control.
Some exceptions are
If you would like to add controls at runtime in code, it is possible to do so.
See the add_control_on_the_fly example project for more information.
Either you create a control related to a particular form
Dim TextBox1 As TextBox TextBox1 = New TextBox(Me)
or without relation to a form.
Dim TextBox1 As TextBox TextBox1 = New TextBox()
Function Close() As Boolean
Closes this control. Returns true if the control was closed; otherwise returns false.
First it sends the control a OnClose. The control is hidden if it does not cancel the close event. If it cancel the event, nothing happens.
Close events are delivered to the control no matter if the control is visible or not.
If this control is a form configured as dialog, use Hide instead. Close won't work in this case.
Only useable if control is a form control.
Sub Hide()
Hides the control. This function is equivalent to Visible = False. Results in OnHide.
See also Show
Sub Lower()
Lowers the control to the bottom of the parent control's visible stack.
After this call the control will be visually behind any overlapping control.
Normally, you do not need this sub.
See also Raise
Sub Raise()
Raises this control to the top of the parent control's visible stack.
After this call the control will be visually in front of any overlapping control.
Normally, you do not need this sub.
See also Lower
Sub Repaint()
This function does not cause an immediate repaint; instead it schedules a paint event for processing when KBasic returns to the main event loop. This permits KBasic to optimize for more speed and less flicker.
Calling it several times normally results in just one OnPaint call.
Sub Show()
Shows the control and its child controls. This function is equivalent to Visible = True. Results in OnShow.
See also Hide
Sub ShowFullScreen()
Shows the form in full-screen mode.
To return from full-screen mode, call ShowNormal.
Be aware that a form which is in the list of Forms becomes deleted from this list. After ShowNormal has been called it is part of Forms again.
Only useable if control is a form control.
Sub ShowMaximized()
Shows the form maximized.
Only useable if control is a form control.
Sub ShowMinimized()
Shows the form minimized.
Only useable if control is a form control.
Sub ShowNormal()
Restores size of the form after it has been maximized or minimized.
Only useable if control is a form control.
Sub ShowCentered ()
Only useable if control is a form control.
Implemented since KBasic V1.75.
Function IsShownFullScreen() As Boolean
Implemented since KBasic V1.6 (n).
Only useable if control is a form control.
Function IsShownMaximized() As Boolean
Implemented since KBasic V1.6 (n).
Only useable if control is a form control.
Function IsShownMinimized() As Boolean
Implemented since KBasic V1.6 (n).
Only useable if control is a form control.
Function IsShownNormal() As Boolean
Implemented since KBasic V1.6 (n).
Only useable if control is a form control or video control.
Sub SetFocus()
Gives the keyboard input focus to this control (or its FocusProxy) if this control or one of its parents is the active form.
First, a OnLostFocus event is sent to the focus control to tell it that it is about to lose the focus. Then a OnGotFocus event is sent to the other control to tell it that it just received the focus.
OnSetFocus gives focus to a control regardless of its FocusPolicy.
Be aware that if the control is hidden, it will not accept focus.
If the control is a form, it sets the form to be the active window.
An active window is a visible top-level window that has the keyboard input focus.
The Qt documentation says that
“This function performs the same operation as clicking the mouse on the title bar of a top-level window. On X11, the result depends on the Window Manager. If you want to ensure that the window is stacked on top as well you should also call Raise. Note that the window must be visible, otherwise FormSetActive() has no effect. On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way.”
Sub Open()
Opens this control. Only useable together with forms.
First it sends the control an OnOpen. The control is shown.
Only useable if control is a form control.
Sub Open(X As Integer, Y As Integer)
Implemented since KBasic V1.6 (n).
Only useable if control is a form control.
Sub Open(X As Integer, Y As Integer, Width As Integer, Height As Integer)
Implemented since KBasic V1.6 (n).
Only useable if control is a form control.
Sub OpenHidden ()
Opens this control. Only useable together with forms.
First it sends the control an OnOpen. The control is NOT shown.
Only useable if control is a form control.
Sub OpenFullScreen ()
Implemented since KBasic V1.6 (n).
Only useable if control is a form control.
Sub OpenCentered()
Implemented since KBasic V1.6 (n).
Only useable if control is a form control.
Sub OpenMaximized()
Implemented since KBasic V1.75.
Only useable if control is a form control.
Sub OpenMinimized()
Implemented since KBasic V1.75.
Only useable if control is a form control.
Function IsOpen() As Boolean
Implemented since KBasic V1.75.
Only useable if control is a form control or video control.
Sub Resize(Width As Integer, Height As Integer)
Resizes this control.
Sends the control an OnResize.
Sub ToggleVisible()
Implemented since KBasic V1.75.
Sub ClearFocus()
Implemented since KBasic V1.75.
Function DataIds() As Strings
Implemented since KBasic V1.75.
Sub SetBoolean(Id As String, Boolean)
Implemented since KBasic V1.75.
Sub DataSetInteger(Id As String, Integer)
Implemented since KBasic V1.75.
Sub DataSetLong(Id As String, Long)
Implemented since KBasic V1.79.
Sub DataSetString(Id As String, String)
Implemented since KBasic V1.75.
Sub SetDataDouble(Id As String, Double)
Implemented since KBasic V1.75.
Sub SetDataDecimal(Id As String, Decimal)
Implemented since KBasic V1.79.
Sub SetDataDateTime(Id As String, DateTime)
Implemented since KBasic V1.79.
Function DataBoolean(Id As String) As Boolean
Implemented since KBasic V1.75.
Function DataInteger(Id As String) As Integer
Implemented since KBasic V1.75.
Function DataLong(Id As String) As Long
Implemented since KBasic V1.79.
Function DataString(Id As String) As String
Implemented since KBasic V1.75.
Function DataDouble(Id As String) As Double
Implemented since KBasic V1.75.
Function DataDecimal(Id As String) As Decimal
Implemented since KBasic V1.79.
Function DataDateTime(Id As String) As DateTime
Implemented since KBasic V1.79.
Sub SingleShot(Milliseconds As Integer)
Sends the control an OnSingleShot after Milliseconds ellapsed.
Implemented since KBasic V1.75.
Sub StartTimer()
Sends the control an OnTimer after Milliseconds determined by TimerInterval ellapsed.
Implemented since KBasic V1.75.
Sub StopTimer()
Implemented since KBasic V1.75.
Function GlobalX(Integer) As Integer
Implemented since KBasic V1.75.
Function GlobalY(Integer) As Integer
Implemented since KBasic V1.75.
Function LocalX(Integer) As Integer
Implemented since KBasic V1.75.
Function LocalY(Integer) As Integer
Implemented since KBasic V1.75.
Function UnderMouse() As Boolean
Implemented since KBasic V1.75.
Property Name As String (ReadWrite)
The name of the control.
Be sure to name it unique. Otherwise your form will be messed up.
Property Layout As String (ReadOnly)
It is useful to give a control features like automatic stretching (Width and Height) and automatic moving (X and Y) relative to its parent.
Property Group As String (ReadWrite)
Contains the group to which the control belongs. Normally, you need only to set it, if you need RadioButtons to be in exclusive mode (only one at a time may be selected). Or, if you need to handle the same event at one place for many controls.
Property Background As String (ReadWrite)
Background might be a color or an image. If you set a color use this format &HRRGGBB (RGB value) e.g. &H00FF00 (green). An image can be an absolute path to an image file (png, jpg,…) like c:\myfolder\myimage.png or can be an relative path to the current project like myimage.png (which is present in the current project directory). Relative paths are recommended.
Color objects of the class Colors must not be used yet.
Example
Dim c As CommandButton c = Control("Button0") ' Button0 is declared in current form c.Background = "tux.jpg" ' relative path. File exists in current project directory c.Background = "&H00FF00" ' set the background to green c.Background = "Red" ' set the background to red
Predefined color values
“White”, “Black”, “Red”, “DarkRed”, “Green”, “DarkGreen”, “Blue”, “DarkBlue”, “Cyan”, “DarkCyan”, “Magenta”, “DarkMagenta”, “Yellow”, “DarkYellow”, “Gray”, “DarkGray”, “LightGray”.
Color objects of the class Colors must not be used yet.
Property BackgroundStyle As String (ReadWrite)
Implemented since KBasic V1.74.
Possible values are
Only available for the following controls
Adds a gradient background like used in Windows Vista for some controls.
Please do not forget to set the Background to some color.
Property Palette As String (ReadWrite)
Implemented since KBasic V1.74.
Active (or Normal), Inactive or Disabled may be used as prefix.
Window | A general background color. |
WindowText | A general foreground color. |
Base | Used mostly as the background color for text entry widgets, but can also be used for other painting - such as the background of combobox drop down lists and toolbar handles. It is usually white or another light color. |
AlternateBase | Used as the alternate background color in views with alternating row colors |
ToolTipBase | Used as the background color for ToolTip and WhatsThis. |
ToolTipText | Used as the foreground color for ToolTip and WhatsThis. |
Text | The foreground color used with Base. This is usually the same as the WindowText, in which case it must provide good contrast with Window and Base. |
Button | The general button background color. This background can be different from Window as some styles require a different background color for buttons. |
ButtonText | A foreground color used with the Button color. |
BrightText | A text color that is very different from WindowText, and contrasts well with e.g. Dark. Typically used for text that needs to be drawn where Text or WindowText would give poor contrast, such as on pressed push buttons. Note that text colors can be used for things other than just words; text colors are usually used for text, but it's quite common to use the text color roles for lines, icons, etc. |
Light | Lighter than Button color. |
Midlight | Between Button and Light. |
Dark | Darker than Button. |
Mid | Between Button and Dark. |
Shadow | A very dark color. By default, the shadow color is black. |
Highlight | A color to indicate a selected item or the current item. By default, the highlight color is dark blue. |
HighlightedText | A text color that contrasts with Highlight. By default, the highlighted text color is white. |
Link | A text color used for unvisited hyperlinks. By default, the link color is blue. |
LinkVisited | A text color used for already visited hyperlinks. By default, the linkvisited color is magenta. |
Examples
WindowText=&HFF0000;Window=&HFF0000; Normal:Window=&HFF0000;Active:WindowText=&HFF0000;Inactive:WindowText=&H00F000;Disabled:WindowText=&H00F000;
Property X As Integer (ReadWrite)
Left position on the screen of the control.
Property Y As Integer (ReadWrite)
Top position on the screen of the control.
Property Width As Integer (ReadWrite)
Property Height As Integer (ReadWrite)
Property Left As Integer (ReadWrite)
Left position on the screen of the control. Provided for your convinience.
Implemented since KBasic V1.75.
Property Top As Integer (ReadWrite)
Top position on the screen of the control. Provided for your convinience.
Implemented since KBasic V1.75.
Property GlobalX As Integer
Contains the x position relative to the entire screen and the parent control or parent form.
Property GlobalY As Integer
Contains the y position relative to the entire screen and the parent control or parent form.
Property OldX As Integer (ReadOnly)
Contains the old x value of that control before the current x was set.
Property OldY As Integer (ReadOnly)
Contains the old y value of that control before the current y was set.
Property OldWidth As Integer (ReadOnly)
Contains the old width value of that control before the current width was set.
Property OldHeight As Integer (ReadOnly)
Contains the old height value of that control before the current height was set.
ReadOnly LoadedX As Integer (ReadOnly)
ReadOnly LoadedY As Integer (ReadOnly)
ReadOnly LoadedWidth As Integer (ReadOnly)
ReadOnly LoadedHeight As Integer (ReadOnly)
ReadWrite MinimumWidth As Integer
Useful for extended layout management.
ReadWrite MinimumHeight As Integer
Useful for extended layout management.
ReadWrite MaximumWidth As Integer
Useful for extended layout management.
ReadWrite MaximumHeight As Integer
Useful for extended layout management.
ReadWrite Tag As String
This is freely to use for custom property values.
ReadWrite CSV As String
Used by some controls like ComboBox to store comma separated values (CSV).
It is possible to define images for each entry. Encloses every image file name into [ [ ] ]. Here is an example
[[irc_op.png]]ComboBoxBox;[[icq_protocol]]1st Entry;2nd Entry;3rd Entry
ReadWrite SQL As String
This is not the binding sql name for the control. If you would like to bind your control to a table see SQLName
Contains a sql select statement for custom sql data filling.
Used by some controls like ComboBox to store values generated by a sql query.
This makes only sense when used together with ComboBox, TextBox, ListView, TreeView or ListBox. Other controls are not supported.
For TextBox, the sql fills the completer property and for TreeView, it provides the data to be displayed.
It is important that when you select two columns the first one is treated as data and the other column(s) are treated as caption. The data can be used in code for further event handling.
SELECT id, name, code FROM myTable
ReadOnly ParentForm As String
This is used by child controls (e.g. contained form in a form) to get information about the parent form.
ReadOnly ParentControl As String
Returns the parent control. Normally, it is a tab control.
For forms it is always an empty string ””, neither this form is contained in a child control or not.
ReadOnly ControlType As String
Possible values are e.g.
and much more!
ReadOnly Focus As Boolean
If the control has got the focus now.
ReadWrite FocusPolicy As String
Possible values are TabFocus, ClickFocus, StrongFocus, WheelFocus, NoFocus
ReadOnly FocusProxy As String
See the project example “focus” shipping with KBasic.
ReadOnly FocusOrder As Integer
Start with number 1 for the first control.
If FocusOrder is set to 0 (default), it will not be in the focus chain, managing tabbing through controls. It will gain focus by accident.
To change the order in which a control receives focus you need to set this property to different value for each control. Lower values receive the focus first and proceed numerically through higher values.
ReadWrite Cursor As String
Set the cursor for that control. If the mouse pointer is over the control, it will change to one of the following shapes.
Might be a String containing binary data. See the binary project example for using.
Possible values are:
Cursor might be an image. An image can be an absolute path to an image file (png, jpg,…) like c:\myfolder\myimage.png or can be an relative path to the current project like myimage.png (which is present in the current project directory). Relative paths are recommended.
Example
Cursor = "tux.jpg" ' relative path. File exists in current project directory
Implemented since KBasic V1.75.
ReadWrite CursorAnimation As String
ReadWrite FontName As String
e.g. “Arial”, “Courier”
ReadWrite FontSize As Integer
ReadWrite FontItalic As Boolean
ReadWrite FontBold As Boolean
ReadWrite FontUnderline As Boolean
ReadWrite FontColor As String
If you set a color use this format &HRRGGBB (RGB value) e.g. &H00FF00 (green).
Color objects of the class Colors must not be used yet.
Example
Dim c As CommandButton c = Control("Button0") ' Button0 is declared in current form c.FontColor = "&H00FF00" ' set the background to green
Predefined color values
“White”, “Black”, “Red”, “DarkRed”, “Green”, “DarkGreen”, “Blue”, “DarkBlue”, “Cyan”, “DarkCyan”, “Magenta”, “DarkMagenta”, “Yellow”, “DarkYellow”, “Gray”, “DarkGray”, “LightGray”.
Color objects of the class Colors must not be used yet.
ReadWrite StatusTip As String
Text is shown in the statusbar, if it is selected or so. Behaviour depends on the control type.
ReadWrite ToolTip As String
Behaviour depends on the control type.
ReadWrite SytleSheet As String
Example for TextBox (QLineEdit) setting the background yellow:
QLineEdit { background: yellow }
Fore more information read http://doc.trolltech.com/4.3/stylesheet.html
ReadWrite WhatsThis As String
Not implemented yet.
ReadOnly TimerInterval As Integer
Calls OnTimer after TimerInterval milli seconds.
TimerInterval = 1000 means 1 second
For a form: OnTimer is only called after the form was opened and StartTimer has been called.
ReadWrite Opacity As Integer
This only works on Mac OS X and Windows 2000 or later. It might work on Linux as well.
Makes only sense for form controls. Set the transparent level for the form control. Only forms with no parent are affected, but forms (normal forms only) inside a mainwindow and Dialogs emulate this feature by setting a own background palette with alpha value. In this case, a background value must not be set by you.
Values from 0 to 100 are allowed.
ReadWrite ContextMenu As String
The name of the menubaritem holding the context menu to be displayed when the context menu for this control is requested.
ReadWrite DrawOnPaint As Boolean
If it is set to false, the controls won’t draw the default look. This is useful, if you want to provide custom drawing without the default look.
Implemented since KBasic V1.75.
ReadWrite Mask As String
Causes only the pixels of the control for which mask has a corresponding value to be visible. Note that this effect can be slow if it is particularly complex. Masked controls receive mouse events only on their visible portions.
Implemented since KBasic V1.75.
ReadWrite SoundOnEvent As String
Implemented since KBasic V1.75.
ReadOnly ShowMode As String
Only useful for form controls now.
Implemented since KBasic V1.75.
ReadWrite MouseTracking As Boolean
Implemented since KBasic V1.75.
ReadOnly TabIndex As Integer
Internally used by KBasic to set up tabs.
ReadOnly ParentIndex As Integer
Internally used by KBasic.
Close → OnClose , Open → OnOpen , OpenHidden → OnOpen,
Hide → OnHide , Visible = False → OnHide , Show → OnShow , Visible = True → OnShow,
Move → OnMove, Resize → OnResize,
RepaintAlways → OnPaint, Repaint → OnPaint,
X → OnMove, Y → OnMove, Width → OnResize, Height → OnResize,
SetFocus → OnLostFocus/OnGotFocus
Mouse cursor comes over control → OnEnter, Mouse cursor was over control, but is now outside of it → OnExit,
Key down first time→ OnKeyDown, Key was down, but now released → OnKeyUp, Key was first time pressed and now continued pressed → OnKeyPress,
Mouse double clicked on control → OnDblClick, Mouse double or only one time clicked on control → OnClick,
Mouse cursor moves over control → OnMouseMove, Mouse button down first time → OnMouseDown, Mouse button was down, but now released → OnMouseUp,
Every milli seconds of TimerInterval → OnTimer,
OnOpen()
Only used by form controls.
OnClose(ByRef Cancel As Boolean)
Only used by form controls. If you reimplement this sub and set Cancel = True, the form won't close.
OnEnter()
Raised whenever mouse cursor enters the boundary of a control.
OnGotFocus()
Form objects do not receive this event.
FocusPolicy must be set correctly, if this should work for a form as well.
OnLostFocus()
Form objects do not receive this event.
OnHide()
OnKeyDown(KeyCode As Integer, Shift As Boolean, Control As Boolean, Alt As Boolean)
See Key Codes for possible key code values.
Note that this function does not distinguish between capital and non-capital letters.
OnKeyUp(KeyCode As Integer, Shift As Boolean, Control As Boolean, Alt As Boolean)
See Key Codes for possible key code values.
Note that this function does not distinguish between capital and non-capital letters.
OnKeyPress(KeyCode As Integer, Shift As Boolean, Control As Boolean, Alt As Boolean)
See Key Codes for possible key code values.
Note that this function does not distinguish between capital and non-capital letters.
OnExit()
Raised whenever mouse cursor leaves the boundary of a control.
OnDblClick(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
Note that the controls get a OnMouseDown(…) and an OnMouseUp(…) before the OnDblClick(…).
OnClick(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
OnMouseMove(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
Because of performance reasons, this event only works with Box and Form controls yet.
OnMouseDown(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
OnMouseDown(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
OnMove(X As Integer, Y As Integer, OldX As Integer, OldY As Integer)
OnPaint(X As Integer, Y As Integer, Width As Integer, Height As Integer)
Currently, you may only use OnPaint with Box or Form objects.
Use the static Paint object to do your custom drawing.
OnResize(Width As Integer, Height As Integer, OldWidth As Integer, OldHeight As Integer)
OnShow()
OnTimer()
Only useable if control is a form control.
OnMouseWheel(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer)
OnMultiPageShow(Page As Integer)
Only useable if control is a form control.
OnContextMenu(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer)
OnSingleShot()
Implemented since KBasic V1.75.
OnEnabled ()
Implemented since KBasic V1.75.
OnDisabled ()
Implemented since KBasic V1.75.
OnDragEnter(ByRef Cancel As Boolean, X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, Width As Integer, Height As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean, Shift As Boolean, Control As Boolean, Alt As Boolean)
Implemented since KBasic V1.75.
OnDragMove(ByRef Cancel As Boolean, X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, Width As Integer, Height As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean, Shift As Boolean, Control As Boolean, Alt As Boolean)
Implemented since KBasic V1.75.
OnDragExit()
Implemented since KBasic V1.75.
OnDragMove(ByRef Cancel As Boolean, MimeData As String, X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean, Shift As Boolean, Control As Boolean, Alt As Boolean)
Implemented since KBasic V1.75.
ReadOnly SQLName As String
Some controls may use this property only: Label, ListBox, ComboBox, TextBox, DateBox, TimeBox
ReadOnly SQLRelation As String
This makes only sense when used together with ComboBox or ListBox. Other controls are not supported except for child controls.
ReadOnly TableViewCaption As String
ReadOnly TableViewWidth As Integer
ReadOnly TableViewVisible As Boolean
On Mac OS X, Key.Control corresponds to the Command keys and Key.Meta corresponds to the Control keys.
Predefined key codes are:
Key.Escape , Key.Tab , Key.Backtab , Key.Backspace , Key.Return , Key.Enter , Key.Insert , Key.Delete , Key.Pause , Key.Print , Key.SysReq , Key.Clear , Key.Home , Key.End , Key.Left , Key.Up , Key.Right , Key.Down , Key.PageUp , Key.PageDown , Key.Shift , Key.Control , Key.Meta , Key.Alt , Key.AltGr , Key.CapsLock , Key.NumLock , Key.ScrollLock , Key.F1 , Key.F2 , Key.F3 , Key.F4 , Key.F5 , Key.F6 , Key.F7 , Key.F8 , Key.F9 , Key.F10 , Key.F11 , Key.F12 , Key.F13 , Key.F14 , Key.F15 , Key.F16 , Key.F17 , Key.F18 , Key.F19 , Key.F20 , Key.F21 , Key.F22 , Key.F23 , Key.F24 , Key.F25 , Key.F26 , Key.F27 , Key.F28 , Key.F29 , Key.F30 , Key.F31 , Key.F32 , Key.F33 , Key.F34 , Key.F35 , Key.Super_L , Key.Super_R , Key.Menu , Key.Hyper_L , Key.Hyper_R , Key.Help , Key.Direction_L , Key.Direction_RKey.Space , Key.Any , Key.Exclam , Key.QuoteDbl , Key.NumberSign , Key.Dollar , Key.Percent , Key.Ampersand , Key.Apostrophe , Key.ParenLeft , Key.ParenRight , Key.Asterisk , KeyPlus , Key.Comma , Key.Minus , Key.Period , Key.Slash , Key.0 , Key.1 , Key.2 , Key.3 , Key.4 , Key.5 , Key.6 , Key.7 , Key.8 , Key.9 , Key.Colon , Key.Semicolon , Key.Less , Key.Equal , Key.Greater , Key.Question , Key.At , Key.A , Key.B , Key.C , Key. , Key.E , Key.F , Key.G , Key.H , Key.I , Key.J , Key.K , Key.L , Key.M , Key.N , Key.O , Key.P , Key.Q , Key.R , Key.S , Key.T , Key.U , Key.V , Key.W , Key.X , Key.Y , Key.Z , Key.BracketLeft , Key.Backslash , Key.BracketRight , Key.AsciiCircum , Key.Underscore , Key.QuoteLeft , Key.BraceLeft , Key.Bar , Key.BraceRight , Key.AsciiTilde , Key.nobreakspace , Key.exclamdown , Key.cent , Key.sterling , Key.currency , Key.yen , Key.brokenbar , Key.section , Key.diaeresis , Key.copyright , Key.ordfeminine , Key.guillemotleft , Key.notsign , Key.hyphen , Key.registered , Key.macron , Key.degree , Key.plusminus , Key.twosuperior , Key.threesuperior , Key.acute , Key.mu , Key.paragraph , Key.periodcentered , Key.cedilla , Key.onesuperior , Key.masculine , Key.guillemotright , Key.onequarter , Key.onehalf , Key.threequarters , Key.questiondown , Key.Agrave , Key.Aacute , Key.Acircumflex , Key.Atilde , Key.Adiaeresis , Key.Aring , Key.AE , Key.Ccedilla , Key.Egrave , Key.Eacute , Key.Ecircumflex , Key.Ediaeresis , Key.Igrave , Key.Iacute , Key.Icircumflex , Key.Idiaeresis , Key.ETH , Key.Ntilde , Key.Ograve , Key.Oacute , Key.Ocircumflex , Key.Otilde , Key.Odiaeresis , Key.multiply , Key.Oobique , Key.Ugrave , Key.Uacute , Key.Ucircumflex , Key.Udiaeresis , Key.Yacute , Key.THORN , Key.ssharp , Key.division , Key.ydiaeresis , Key.Multi_key , Key.Codeinput , Key.SingleCandidate , Key.MultipleCandidate , Key.PreviousCandidate , Key.Mode_switch , Key.Kanji , Key.Muhenkan , Key.Henkan , Key.Romaji , Key.Hiragana , Key.Katakana , Key.Hiragana_Katakana , Key.Zenkaku , Key.Hankaku , Key.Zenkaku_Hankaku , Key.Touroku , Key.Massyo , Key.Kana_Lock , Key.Kana_Shift , Key.Eisu_Shift , Key.Eisu_toggle , Key.Hangul , Key.Hangul_Start , Key.Hangul_End , Key.Hangul_Hanja , Key.Hangul_Jamo , Key.Hangul_Romaja , Key.Hangul_Jeonja , Key.Hangul_Banja , Key.Hangul_PreHanja , Key.Hangul_PostHanja , Key.Hangul_Special , Key.Dead_Grave , Key.Dead_Acute , Key.Dead_Circumflex , Key.Dead_Tilde , Key.Dead_Macron , Key.Dead_Breve , Key.Dead_Abovedot , Key.Dead_Diaeresis , Key.Dead_Abovering , Key.Dead_Doubleacute , Key.Dead_Caron , Key.Dead_Cedilla , Key.Dead_Ogonek , Key.Dead_Iota , Key.Dead_Voiced_Sound , Key.Dead_Semivoiced_Sound , Key.Dead_Belowdot , , Key.Dead_Hook , Key.Dead_Horn , Key.Back , Key.Forward , Key.Stop , Key.Refresh , Key.VolumeDown , Key.VolumeMute , Key.VolumeUp , Key.BassBoost , Key.BassUp , Key.BassDown , Key.TrebleUp , Key.TrebleDown , Key.MediaPlay , Key.MediaStopKey.MediaPrevious , Key.MediaNext , Key.MediaRecord , Key.HomePage , Key.Favorites , Key.Search , Key.Standby , Key.OpenUrl , Key.LaunchMail , Key.LaunchMedia , Key.Launch0 , Key.Launch1 , Key.Launch2 , Key.Launch3 , Key.Launch4 , Key.Launch5 , Key.Launch6 , Key.Launch7 , Key.Launch8 , Key.Launch9 , Key.LaunchA , Key.LaunchB , Key.LaunchC , Key.LaunchD , Key.LaunchE , Key.LaunchF , Key.MediaLast , Key.unknown , Key.Call , Key.Context1 , Key.Context2 , Key.Context3 , Key.Context4 , Key.Flip , Key.Hangup , Key.No , Key.Select , Key.Yes , Key.Execute , Key.Printer , Key.Play , Key.Sleep , Key.Zoom , Key.Cancel ,
Dim f As bernd ' assume that bernd is a form class created with the form designer f = New bernd f.Open() ' OR Forms.Open("bernd") ' for this call you must setup mainwindow in projects properties
Written by Bernd Noetscher
Date 2007-02-22