I am brand new to PureBasic and looking for ideas on the best way to get my feet wet, so to speak. I have been a long time user of another compiler and visual designer and now is the time to explore other options. I have been a Linux user since about 2006 or 2007 and have longed for a way to create in-house programs for Linux, so the whole cross-compiling options in PureBasic sound great!
I have played around a little with the PB visual designer, but haven't figured out how to put code behind a button, for instance.
Are there any recommended tutorials for someone just starting out?
Thanks for your help and suggestions!
Gary
Best way for a newbie to get started??
-
- New User
- Posts: 5
- Joined: Mon Feb 03, 2014 12:13 am
- Location: Springfield, IL
Re: Best way for a newbie to get started??
You can found some tutorials and books at: http://www.purearea.net
You can found many examples in the installationsdir from purebasic and in the helpfile.
You can found many help here in the forum!
But it is not a good idea to beginn with a Visuell Designer without the basic principles of PureBasic.
Greetings - Thomas
You can found many examples in the installationsdir from purebasic and in the helpfile.
You can found many help here in the forum!
But it is not a good idea to beginn with a Visuell Designer without the basic principles of PureBasic.
Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: Best way for a newbie to get started??
How to do almost anything in PureBasic:
http://www.purearea.net/pb/CodeArchiv/English.html
It is for an older version, but you can download that older version to work with and just apply what you learn to the new version tweaking any necessary changes.
http://www.purearea.net/pb/CodeArchiv/English.html
It is for an older version, but you can download that older version to work with and just apply what you learn to the new version tweaking any necessary changes.
Best wishes to the PB community. Thank you for the memories. 
-
- Enthusiast
- Posts: 542
- Joined: Tue Apr 24, 2012 5:08 pm
- Location: Ontario, Canada
Re: Best way for a newbie to get started??
Hi Gary -- so you're taking "the big step".
Just today I finally pulled the plug on that "other compiler and visual designer". So after two years of planning and three years of conversion I'm now 100% cross-platform PureBasic, running on Linux Mint. No API and no support DLLs.
It's been an interesting journey, but I must confess that my code is better for the change. Having all the features I need, in a single cross-platform language, will make my life a lot easier. Until now I've been actively coding in COBOL, MASM, PowerBasic, FreeBasic, and EZGUI.
I suggest you just dive in and start coding. There's a bit of a learning curve getting used to the syntax, but it all makes sense after a while. I found the forums to be the best place for information. You'll also find links to stuff on other web sites.
As ts-soft suggests, learn the language before you use the Visual Designer. I prefer to code without benefit of a visual designer, as they are never as flexible as I would like them to be.
Rod Gobby
Just today I finally pulled the plug on that "other compiler and visual designer". So after two years of planning and three years of conversion I'm now 100% cross-platform PureBasic, running on Linux Mint. No API and no support DLLs.
It's been an interesting journey, but I must confess that my code is better for the change. Having all the features I need, in a single cross-platform language, will make my life a lot easier. Until now I've been actively coding in COBOL, MASM, PowerBasic, FreeBasic, and EZGUI.
I suggest you just dive in and start coding. There's a bit of a learning curve getting used to the syntax, but it all makes sense after a while. I found the forums to be the best place for information. You'll also find links to stuff on other web sites.
As ts-soft suggests, learn the language before you use the Visual Designer. I prefer to code without benefit of a visual designer, as they are never as flexible as I would like them to be.
Rod Gobby
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan
~ Spike Milligan
Re: Best way for a newbie to get started??
Check out the "We start programming" chapter in the help file. Read through all pages of it and you'll get a good understanding of how PureBasic works.Gary Stout wrote:Are there any recommended tutorials for someone just starting out?
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
- BasicallyPure
- Enthusiast
- Posts: 539
- Joined: Thu Mar 24, 2011 12:40 am
- Location: Iowa, USA
Re: Best way for a newbie to get started??
I would agree that is best to avoid the form designer until you have gained some experience first.
It will likely lead to confusion.
I find it very useful if you have many gadgets on your window then it is very helpful to get them arranged in
a nice way.
and react to each button click.
BP
It will likely lead to confusion.
I find it very useful if you have many gadgets on your window then it is very helpful to get them arranged in
a nice way.
Here is a simple example (without using the form designer) to create a window with buttonsGary Stout wrote:I have played around a little with the PB visual designer, but haven't figured out how to put code behind a button, for instance.
and react to each button click.
Code: Select all
; simple example using button gadgets
EnableExplicit ; I highly recommend using this compiler command
; define constants
#WinMain = 0
Enumeration ; automatically assign numbers to constants
#Btn_1 ; = 0
#Btn_2 ; = 1
#Btn_3 ; = 2
EndEnumeration
Procedure PROCESS_BUTTON_1()
Debug "button 1 clicked"
EndProcedure
Procedure PROCESS_BUTTON_2()
Debug "button 2 clicked"
EndProcedure
Procedure PROCESS_BUTTON_3()
Debug "button 3 clicked"
EndProcedure
; define variables for main body code
Define Quit.i ; as type integer
Define flags.i = #PB_Window_ScreenCentered | #PB_Window_SystemMenu
If OpenWindow(#WinMain,0,0,340,50,"Example",flags) = 0 ; 0 indicates fail
MessageRequester("Error!","Unable to create window.")
End
EndIf
; create the button gadgets
ButtonGadget(#Btn_1,010,10,100,20,"Button 1")
ButtonGadget(#Btn_2,120,10,100,20,"Button 2")
ButtonGadget(#Btn_3,230,10,100,20,"Button 3")
; process all window events, act upon those of interest
Repeat
Select WaitWindowEvent() ; waits for any window event to occur
Case #PB_Event_Gadget ; indicates the event was from a gadget
Select EventGadget() ; identifies the gadget that fired the event
Case #Btn_1 : PROCESS_BUTTON_1()
Case #Btn_2 : PROCESS_BUTTON_2()
Case #Btn_3 : PROCESS_BUTTON_3()
EndSelect
Case #PB_Event_CloseWindow : Quit = 1
EndSelect
Until Quit = 1
End
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
Until you know everything you know nothing, all you have is what you believe.
-
- New User
- Posts: 5
- Joined: Mon Feb 03, 2014 12:13 am
- Location: Springfield, IL
Re: Best way for a newbie to get started??
Thanks everyone for the suggestions and links. I am going to dive in head first and see what I can learn!
Gary
Gary
Re: Best way for a newbie to get started??
You may also find PureBasic Survival Guide interesting.
Re: Best way for a newbie to get started??
If you like the video tutorial format...
http://www.youtube.com/results?search_query=purebasic designer
http://www.youtube.com/results?search_query=purebasic designer
Keep it BASIC.