VBAndCs / sVB-Small-Visual-Basic

Small Visual Basic (sVB) is an educational programming language, created by Eng. Mohammad Hamdy as an evolved version of Microsoft Small Basic (SB). It is meant to be easier and more powerful at the same time, to introduce programming basics to kids and beginners of any age, provided that they can use the English keyboard on the Windows OS.
Other
232 stars 16 forks source link

Gradual fade-in and fade-out of images ... #53

Closed boa2145 closed 3 months ago

boa2145 commented 8 months ago

Hello Mohammad,

I set an image into a window by using the method "DrawImage()" of the object "GraphicsWindow". Is it possible to fade-in and fade-out an image? It would be nice to show the image gradually from zero to hundred percent or the other way out.

Kind regards ... Gregor

VBAndCs commented 8 months ago

Hi Gregor, Add a label over the image, make it fill the GW and give it the backcolor of the GW. Use the AnimateTransparency method to make the label 100% transparent after 3 seconds or more. This will do the trick.


From: Gregor @.> Sent: Tuesday, January 30, 2024 10:19 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] Gradual fade-in and fade-out of images ... (Issue #53)

Hello Mohammad,

I set an image into a window by using the method "DrawImage()" of the object "GraphicsWindow". Is it possible to fade-in and fade-out an image? It would be nice to show the image gradually from zero to hundred percent or the other way out.

Kind regards ... Gregor

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/53, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVTJSDN2NWSEXAEWWO3YRDCLLAVCNFSM6AAAAABCQ672JGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYDONBWGUYDANY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

VBAndCs commented 8 months ago

Remember that the Controls.AddLabel returns the label so you can use it as an o next L = Controls.AddLabel(...) L.Width = GW.Width ......


From: Gregor @.> Sent: Tuesday, January 30, 2024 10:19 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] Gradual fade-in and fade-out of images ... (Issue #53)

Hello Mohammad,

I set an image into a window by using the method "DrawImage()" of the object "GraphicsWindow". Is it possible to fade-in and fade-out an image? It would be nice to show the image gradually from zero to hundred percent or the other way out.

Kind regards ... Gregor

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/53, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVTJSDN2NWSEXAEWWO3YRDCLLAVCNFSM6AAAAABCQ672JGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYDONBWGUYDANY. You are receiving this because you are subscribed to this thread.Message ID: @.***>