Page 1 of 1
Programming Help
Posted: Fri Aug 19, 2005 2:45 pm
by cegy
Hi there i have just downloaded purebasic which looks ace but i wanna know how to program in it i.e help files, tuts etc... to help me get started in purebasic.
Can anyone help me please
Many Thanks Cegy

Posted: Fri Aug 19, 2005 3:18 pm
by fweil
Welcome cegy,
You have a ton of sources accessible here :
http://www.purearea.net/pb/CodeArchiv/CodeArchiv.html
and the forum for all questions and sources sharing !
KRgrds
Posted: Fri Aug 19, 2005 5:32 pm
by cegy
Many thanks

just 1 more question how do i use the visual designer when i code with it

i hope this doesn't sound daft

Posted: Fri Aug 19, 2005 6:20 pm
by fweil
If you have got the last 3.94 release of PureBasic, just use the Visual Designer and push F1 !
The help should put you on the tracks.
Rgrds
Posted: Fri Aug 19, 2005 6:33 pm
by cegy
fweil wrote:If you have got the last 3.94 release of PureBasic, just use the Visual Designer and push F1 !
The help should put you on the tracks.
Rgrds
oh yeah you know after you made ur form and you saved it how "would" you code it with your project?
I hope you understand what i mean :s
Posted: Fri Aug 19, 2005 6:54 pm
by Killswitch
Design your form then click on:
Project > Generate Source
Then it automatically creates the code you've designed. I haven't tried the newest release but the old one created two files an include file an the main file, you'll only need the one with the most code in it!
You'll probally want to look up on Procedures, Constants and Enumerations.
Posted: Fri Aug 19, 2005 7:02 pm
by fweil
Well basically the Visual Designer can create a project, which is not the code but the collection of objects and behaviours.
When loading this project, you can switch to PureBasic editor (Project menu). If you do so, you will get two source files in the PureBasic editor.
The first one is GeneratedMainFile.pb which is the caller of the second GeneratedIncludeFile.pb.
To focus on the program you want to design, you can go to GeneratedMainFile.pb and add the following lines :
Code: Select all
Open_Window_0()
Repeat
Select WaitWindowEvent()
Case #PB_Event_Menu
Select EventMenuID()
; put there your menu events
EndSelect
Case #PB_Event_Gadget
Select EventGadgetID()
; put there your gadget events
EndSelect
Case #PB_Event_CloseWindow
Quit = #True
EndSelect
Until Quit
End
Hope this helps
Posted: Fri Aug 19, 2005 7:55 pm
by cegy
fweil wrote:Well basically the Visual Designer can create a project, which is not the code but the collection of objects and behaviours.
When loading this project, you can switch to PureBasic editor (Project menu). If you do so, you will get two source files in the PureBasic editor.
The first one is GeneratedMainFile.pb which is the caller of the second GeneratedIncludeFile.pb.
To focus on the program you want to design, you can go to GeneratedMainFile.pb and add the following lines :
Code: Select all
Open_Window_0()
Repeat
Select WaitWindowEvent()
Case #PB_Event_Menu
Select EventMenuID()
; put there your menu events
EndSelect
Case #PB_Event_Gadget
Select EventGadgetID()
; put there your gadget events
EndSelect
Case #PB_Event_CloseWindow
Quit = #True
EndSelect
Until Quit
End
Hope this helps
Oh many thanks if its possible for a sample and how to do it "to" make sure i do it right. This would be very helpful
