The key features of PureBasic are portability (Windows, Linux, OS X and Raspberry supported with the same source code), the production of very fast and optimized native 32-bit or 64-bit executables and, of course, the very simple BASIC language syntax. For those of you who have read my previous blog entries may. PureBasic is a modern BASIC programming language.
As you can see from the code below I have taken advantage of mixing both Windows API with PureBasic API's to achieve the results. It displayed the wrong oversized window and debug reported the same 3840x2160 with x 1 and y 1 res. Most of the magic is done by Windows API ExtractIconEx function and from there we simply manipulate the icon images to display them in a gadget list window. I ran three other tabs first then ran it. Then I exited out and restarted purebasic. Ok, I ran it and it displayed the correct resolution and debug reported 3840x2160 res x 1 and res y 1. Multiple BindEvent messages are displayed for 1 MainScope message. Each window resize event generates 1 message. MessageRequester("Error", "Can't open windowed!", 0) Multiple BindEvent and multiple MainScope messages are displayed. MessageRequester("Error", "Can't open windowed screen!", 0) Res = OpenWindowedScreen(WindowID(0),0,0,DW,DH,#autoscale,0,0)ĬreateSprite(0, 50, 50) Create an empty sprite, will be whole blackĬlearScreen(RGB(0, 0, 200)) A blue backgroundĭisplaySprite(0, 10, 10) Display our black box at the left-top cornerĭisplaySprite(0, W-60, 10) Display our black box at the right-top cornerĭrawText((W>1)-(TextWidth(out)>1),100,out,RGB(0,255,0),RGB(0,0,255)) Res = OpenWindowedScreen(WindowID(0),0,0,W,H,#autoscale,0,0) If OpenWindow(0,0,0,W,H,"Windowed screen test ",#FLAGS)
#FLAGS = #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered If OpenWindow(0, 0, 0, 600, 100, Position of the mouse on the window:, PBWindowSystemMenu PBWindowScreenCentered) TextGadget(0, 10, 6, 200, 20. MessageRequester("Error", "Can't open screen & sprite environment!", 0) The new window becomes the active window, its not needed to use SetActiveWindow() (unless the window.Window: A number to identify the new window. Easy but very fast 2D game support through dedicated libraries (DirectX, SDL. Opens a new window according to the specified parameters.One of the things that still baffles me is that Microsoft Windows doesn.
Access to full OS API for advanced programmers Place the cursor on the OpenWindow() command and press F1.Procedure support for structured programming with local and global variables.No external DLLs, runtime interpreter or anything else required when creating executables.Very fast compiler which creates highly optimized executables.Huge set of internal commands (1100+) to quickly and easily build any application or game Experienced coders will have no problem gaining access to any of the legal OS structures or API objects and PureBasic even allows inline ASM. In spite of its beginner-friendly syntax, the possibilities are endless with PureBasic's advanced features such as pointers, structures, procedures, dynamically linked lists and much more. We have put a lot of effort into its realization to produce a fast, reliable system friendly language. PureBasic has been created for the beginner and expert alike. For discussions about the language itself, open a new Thread please. The new window becomes the active window, it's not needed to use SetActiveWindow () (unless the window is created as invisible). The key features of PureBasic are portability (Windows, Linux, MacOS X and AmigaOS are currently supported), the production of very fast and highly optimized executables and, of course, the very simple BASIC syntax. If OpenLibrary(0, 'PureBasic.dll') Or OpenLibrary(0, 'PureBasic.so') CallFunction(0, 'EasyRequester', 'Test') EndIf CompilerEndIf This corner is mainly for Purebasic code, i have removed all postings that have been 'discussions about PureBasic'. OpenWindow () Syntax Result OpenWindow (Window, x, y, InnerWidth, InnerHeight, Title, Flags, ParentWindowID) Description Opens a new window according to the specified parameters.
PureBasic is a native 32 bit and 64 bit programming language based on established BASIC rules.