1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2024-05-12 06:50:12 +00:00
7 PictureBox Drawing
Fellippe Heitor edited this page 2021-12-22 12:12:15 -03:00

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.

Examples

Code showcasing the technique:

See also:

Picture box