

- #Purebasic select case serial
- #Purebasic select case manual
- #Purebasic select case code
- #Purebasic select case windows
#Purebasic select case serial
I have 3 questions: may I use the serial port (COM1/COM2) with PureBasic (using some lib/functions or Windows-API)? Is the.dll support, working fine? I saw PureBasic has inner functions to call Direct-X, in your opinion is faster than BlitzBasic or not? Thank you in advance for informations. Need the additionally XM2MXM Tool (76 KB) for converting the XM modules into the MXM format. Include the very small MXM-Music-Module Player in PureBasic. For a compatible Linux version see the userlib 'Serial'. Sending and receiving of data through the serial port.
#Purebasic select case code
To have all the control over the generated code, just switch to code mode and inspect it.RS 232 Communication Library. Indeed it's also possible to continue to create window manually, or mix the two. MainWindow_Events(Event) This procedure name is always window name followed by '_Events' Case DateWindowĮndSelect Until Event = #PB_Event_CloseWindow Quit on any window closeĪs seen, it's easy to integrate visually designed forms in a program. This procedure name is always 'Open' followed by the window name OpenDateWindow() Open the second window The event procedures, as specified in the 'event procedure' property of each gadget Procedure OkButtonEvent(EventType)ĮndProcedure Procedure CancelButtonEvent(EventType)ĮndProcedure Procedure TrainCalendarEvent(EventType)ĮndProcedure The main event loop as usual, the only change is to call the automatically generated event procedure for each window. If we assume MainWindow.pbf has two buttons ('OK' and 'Cancel') and DateWindow.pbf has one calendar gadget, here is how the main file would look like (the main file is not handled by the form designer, it has to be written manually): XIncludeFile "MainWindow.pbf" Include the first window definition XIncludeFile "DateWindow.pbf" Include the second window definition OpenMainWindow() Open the first window. The directory structure could look like that: Main.pb The main PureBasic file, which will includes the two forms file, and defines the events Form files can also be added to a project.įor example, to build a program which handle two windows, we will have to create two form files and one main file. Every form file should be named with the '.pbf' extension, so it will be correctly opened by the IDE. The event procedures needs to be defined somewhere in the source code. An event procedure can be assigned to every gadget, and will be handled automatically in the event loop. It can not have two form in the file (in other words, it should never have two OpenWindow() in the same file). The form designer has been created to allow modular forms and easy maintenance. Using the form designer in real world projects When a gadget is selected on the form, its properties are display on this panel and can be modified here. Select one, and draw directly on the form the size needed. The image and its path can be changed easily here. A form is built from code, so if a change is made directly in code view, it will be reflected visually.ĭisplay all the images currently used by the form. It will bring automatically the form panel tool on top.Ĭhange the form view, switch from design mode to code view.

#Purebasic select case manual
The code parser isn't the same used by the compiler and therefore doesn't support all features, so when doing manual changes to a form file, it has to remain basic.Ĭreate a new empty form. A form file is a regular PureBasic file, so it can be easily modified without even open the form designer. It supports almost all native PureBasic gadgets, menu and even status bar.
#Purebasic select case windows
The PureBasic IDE has a very powerful integrated form designer, which allows to design easily windows and arrange gadgets on them.
