when i use SetFocus_(WindowID()) it locks my buttons, any ideas
TrackBarGadget(#Gadget_EC, 250, 230, 80, 20, 0, 1, #PB_TrackBar_Ticks)
SetGadgetState(#Gadget_EC, 0)
loaded=#False
Quit=#False
Repeat
EventID.l = WindowEvent()
SetFocus_(WindowID())
Select EventID
Case 0
next question, how do i run a windows command like netstat -n from purebasic,
SetFocus_(WindowID())
SetFocus_(WindowID())
1.3AMD, 2x 256 sdr, 32 AGP
@Bong-Mong:
You have to set the focus after an event for the
TrackbarGadget happened, not for all messages.
You have to set the focus after an event for the
TrackbarGadget happened, not for all messages.
Code: Select all
#Gadget_EC = 1
OpenWindow(0,0,0,500,300,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"")
CreateGadgetList(WindowID())
TrackBarGadget(#Gadget_EC, 250, 230, 80, 20, 0, 1, #PB_TrackBar_Ticks)
SetGadgetState(#Gadget_EC, 0)
ButtonGadget(2,10,10,100,20,"Button")
loaded=#False
Quit=#False
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
Case #PB_EventGadget
Select EventGadgetID()
Case #Gadget_EC
SetFocus_(WindowID())
EndSelect
EndSelect
ForEver

