Code: Alles auswählen
'Designer_generated_code
'DO NOT MODIFY THE STRUCTURE OF THIS SECTION!
'Doing so could stop the interaction between the form and editor for this session.
'Designer - Declarations
Dim thisApp As Application
Dim Form1 As Form
Dim Control1 As Label
Dim Control2 As TextBox
Dim Control5 As OptionButton
Dim Control6 As OptionButton
Dim Control7 As CheckBox
Dim Control8 As ComboBox
Dim Control9 As ListBox
Dim cmdShow8 As CommandButton
Dim cmdExit9 As CommandButton
Dim Control10 As TextBox
'Designer - Functions
Private Function InitGui(hInst As HINSTANCE)
thisApp.Create(hInst)
Form1.Create(62,86,381,357,HWND_DESKTOP,NULL,"Form",0,0)
'last two params are Windows Style and Windows Extended Style.
Control1.Create(5,6,354,20,Form1.SelfHwnd(),"Label",0,0)
Control2.Create(6,30,359,20,Form1.SelfHwnd(),"TextBox",0,0)
Control5.Create(5,56,357,20,Form1.SelfHwnd(),"OptionButton",0,0)
Control6.Create(5,75,348,20,Form1.SelfHwnd(),"OptionButton",0,0)
Control7.Create(5,205,336,20,Form1.SelfHwnd(),"CheckBox",0,0)
Control8.Create(6,98,356,80,Form1.SelfHwnd(),"",0,0)
Control9.Create(7,140,359,60,Form1.SelfHwnd(),"",0,0)
cmdShow8.Create(4,229,136,27,Form1.SelfHwnd(),"Show",0,0)
cmdExit9.Create(204,229,152,28,Form1.SelfHwnd(),"Exit",0,0)
Control10.Create(5,265,362,59,Form1.SelfHwnd(),"TextBox",0,0)
SetEvents()
Form1.Show()
thisApp.DoModal()
End Function
'Designer - Events
Private Function SetEvents()
Form1.SetEvent(0,(void*)Form1_Load);
Control1.SetEvent(OnClick,(void*)Control1_Click)
Control5.SetEvent(OnClick,(void*)Control5_Click)
Control6.SetEvent(OnClick,(void*)Control6_Click)
Control7.SetEvent(OnClick,(void*)Control7_Click)
Control8.SetEvent(OnChange,(void*)Control8_Change)
cmdExit9.SetEvent(OnClick,(void*)cmdExit9_Click)
Control2.SetEvent(OnGotFocus,(void*)Control2_GotFocus)
Control2.SetEvent(OnLostFocus,(void*)Control2_LostFocus)
cmdShow8.SetEvent(OnClick,(void*)cmdShow8_Click)
End Function
'Designer_generated_code
Private Function Form1_Load()
'on Form load, set the text to nothing
Control10.Text("")
'set the control to multiline
Control10.MultiLine(True)
'add some text to the combobox
Control8.AddItem("Test1")
Control8.AddItem("Test2")
Control8.AddItem("Test3")
End Function
Private Function Control1_Click()
Dim tempStr As String
'get the current text in the textbox
tempStr=Control10.Text()
tempStr=tempStr + "Label (Control1) Clicked\r\n"
Control10.Text(tempStr)
End Function
Den Code könnte man ja fast in VB eingeben und es würde sich kompilieren lassen