Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3720

Possible creating "permanent" picture object?

$
0
0

Hi everybody,
I have a new, maybe silly simple question for you:
Is it possible to create a picture object which I can use in a timer event without creating it everytime new in the Timer event?

Until now i have only this code in the timer event:

Static y as integer
Var p As New Picture (300, 200, 32)

p.Graphics.DrawPicture(Mypicture, 0, 0, 100, 200, 0, y, 100, 200)
p.Graphics.DrawPicture(Mypicture, 100, 0, 100, 200, 0, y, 100, 200)
p.Graphics.DrawPicture(Mypicture, 200, 0, 100, 200, 0, y, 100, 200)

DesktopCanvas1.Backdrop = p

y = y + movepic

But I dont like to create a new picture object in every timer event.
Is it possible to create a “permanent” picture object out of timer code, which I can use in the timer everytime it fires?
Or maybe better sth. very different and better working? :slight_smile:
…and…after 3 years of Xojo..I still not have completely understood the way graphics work in Xojo, VB6 was easier somehow…

Thank you a lot, Rolf.

12 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 3720

Trending Articles