I'm trying to build an application and started with main screen, but it doesn't work. Howhever, if I copy/paste the code into the forme builder it does work. What is wrong with this code?
Code: Select all
; Form Designer for Purebasic - 6.01
; Warning: this file uses a strict syntax, if you edit it, make sure to respect the Form Designer limitation or it won't be opened again.
;
; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.
;
Enumeration
#Main_Window
#Project_Code_Lbl
#Project_Code_Text
EndEnumeration
;IncludeFile "procedures.pbi"
;Open_DataBase()
Procedure OpenMain(x = 0, y = 0, width = 793, height = 493)
OpenWindow(#Main_Window, x, y, width, height, "", #PB_Window_SystemMenu)
TextGadget(#Project_Code_Text, 20, 47, 133, 20, "")
SetGadgetColor(#Project_Code_Text, #PB_Gadget_BackColor,RGB(255,255,255))
StringGadget(#Project_Code_Lbl, 20, 27, 133, 20, "Project Code", #PB_String_BorderLess)
EndProcedure
Procedure Main_Events(event)
Select event
Case #PB_Event_CloseWindow
ProcedureReturn #False
Case #PB_Event_Menu
Select EventMenu()
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure
Best regards
// Code Tags added (Kiffi)