I made my first window is not closing properly. The rest think it's ok.
Any suggestion?
att.,
Cleber
Code: Select all
IncludeFile "\qmsys\syscom\qmclient.unicode.pb"
wFlags = #PB_Window_MaximizeGadget | #PB_Window_MinimizeGadget |
#PB_Window_SizeGadget | #PB_Window_ScreenCentered
OpenWindow(1, 0, 0, 300, 200, "Minha janela", wFlags)
#BotaoSeleciona = 1
ButtonGadget(#BotaoSeleciona, 10,100, 200, 60, "Seleciona")
Repeat
Event = WindowEvent()
Select EventGadget()
Case #BotaoSeleciona
If Not QMConnect("localhost", -1, "cleber", "psw", "teste")
TextGadget(0, 0, 0, 250, 200, "Não conectou", #PB_Text_Center )
Else
TextGadget(0, 0, 0, 250, 200, "Conectou com QM", #PB_Text_Center)
Delay(5000)
Arg1.s = ""
QMCall1("RELCADCLI", Arg1.s)
TextGadget(0, 0, 0, 250, 200, Arg1.s, #PB_Text_Center)
Delay(5000)
EndIf
EndSelect
Until Event = #PB_Event_CloseWindow


