I'm not understanding this correctly.
If I used the visual designer to create 1 button labeled click me, then create the source, How would I code the little snippet to show the window with the button then code it so that when clicked it shows a message that say "you just clicked me".
I have no experience with window programming.
dont understand windows event, please help
in the options in visual designer.. make sure you ticked off the inlude event loop.. then just export to editor.. the event for clicking the button will already be implemented (the debugger must be on for you to see)
AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
As Lars said
And/or remark the line
; Debug "GadgetID: #Button_0"
and write : MessageRequester("MessageTitle","You just clicked me:",#PB_MessageRequester_Ok)
Like this
And/or remark the line
; Debug "GadgetID: #Button_0"
and write : MessageRequester("MessageTitle","You just clicked me:",#PB_MessageRequester_Ok)
Like this
Code: Select all
IncludeFile "GeneratedIncludeFile.pb"
Open_Window_0()
Repeat
Event = WaitWindowEvent()
If Event = #PB_EventGadget
GadgetID = EventGadgetID()
If GadgetID = #Button_0
;Debug "GadgetID: #Button_0"
MessageRequester("MessageTitle","You just clicked me:",#PB_MessageRequester_Ok)
EndIf
EndIf
Until Event = #PB_EventCloseWindow
End
Hi Amon..Amon wrote:a 1000 thankyous.
Hi Larsg, how will i get on with PB ? I hope I can use it for all my app needs.
cya BC or here
Once you learn the basics, and the PureBasic syntax, I think you'll do just fine..

And if you are stuck, there are nice people on this forum also..

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX