-
Notifications
You must be signed in to change notification settings - Fork 16
PictureBox Drawing
Fellippe Heitor edited this page Dec 22, 2021
·
7 revisions
You can use a PictureBox control as a drawing canvas and use all QB64 drawing commands. To do so, use the methods BeginDraw and EndDraw:
BeginDraw PictureBox1 'Replace PictureBox1 with the actual ID of the desired PictureBox
'Drawing code goes here
EndDraw PictureBox1
A good place to add code that updates a PictureBox's software drawing is the BeforeUpdateDisplay event handler (SUB __UI_BeforeUpdateDisplay), as it is run before every form repaint.
Code showcasing the technique: