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
222 stars 16 forks source link

The position of the image after drawing a colorful shape with the turtle ... #54

Closed boa2145 closed 1 month ago

boa2145 commented 5 months ago

Hello Mohammad,

For example, if I have drawn a flag with the turtle and filled it with color and then want to put the flag's logo on it, the logo is located behind the turtle's drawing but is not visible on the drawing. What could be the reason? On the other hand, if I draw the same flag with colored rectangles, I don't have the problem when I then put the logo on the drawing. I would like to use the turtle to slightly animate the drawing of the flag.

Regards ... Gregor

VBAndCs commented 5 months ago

Hi Gregor: The image is drawn on the form background, which makes any other shape or control appear over it. You should add a label on the GW and set it's Image property to the image path. You can also use the label's BringToFront method to ensure it's on top of the turtle shape. I hope you start using sVB tools instead of sticking with the old SB ways. Thanks.


From: Gregor @.> Sent: Tuesday, January 30, 2024 11:09 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] The position of the image after drawing a colorful shape with the turtle ... (Issue #54)

Hello Mohammad,

For example, if I have drawn a flag with the turtle and filled it with color and then want to put the flag's logo on it, the logo is located behind the turtle's drawing but is not visible on the drawing. What could be the reason? On the other hand, if I draw the same flag with colored rectangles, I don't have the problem when I then put the logo on the drawing. I would like to use the turtle to slightly animate the drawing of the flag.

Regards ... Gregor

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

VBAndCs commented 5 months ago

And please update to the latest sVB version to have the BringToFront merhod


From: Gregor @.> Sent: Tuesday, January 30, 2024 11:09 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] The position of the image after drawing a colorful shape with the turtle ... (Issue #54)

Hello Mohammad,

For example, if I have drawn a flag with the turtle and filled it with color and then want to put the flag's logo on it, the logo is located behind the turtle's drawing but is not visible on the drawing. What could be the reason? On the other hand, if I draw the same flag with colored rectangles, I don't have the problem when I then put the logo on the drawing. I would like to use the turtle to slightly animate the drawing of the flag.

Regards ... Gregor

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

boa2145 commented 5 months ago

Hello Mohammad,

Thanks for your replies. I currently use sVB v2.8.7 and have to update it, but I cannot find version 2.8.9 on GitHub. I thought about turtle graphics. I really like this kind of logo programming very much. It is one of my favourite kinds to program with Small Basic and Python. Is it right that I can only use the turtle with the GraphicsWindow object? So, If I want to program a flag with your form designer, I can't use the turtle, but I am able to use all elements of the form designer's toolbox, right?

VBAndCs commented 5 months ago

I allowed to use all sVB controls on the GW. After all the GQ is a Form, and you can use f = GW.AsForm() So you can f as any other form. You can also create a form with textboxes and buttons to control the turtle behaviour, like providing the polygon sides and Side length, then click the button to make the turtle draw the requested polygon.

Sub Button1_OnClick()
   GraphicsWindow.Clear()
   DrawPolygon(TxtSides.Text, TxtLen.Text)
EndSub

Sub DrawPolygon(n, l)
   a = 360 / n
   For i = 1 To n
      Turtle.Move(l)
      Turtle.Turn(a)
   Next
EndSub

So, it is OK to use the GW and Turtle, but you should read about all other sVB stuff because you can use it with them as well to create amazing apps. Thanks.


From: Gregor @.> Sent: Wednesday, January 31, 2024 5:39 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] The position of the image after drawing a colorful shape with the turtle ... (Issue #54)

Hello Mohammad,

Thanks for your replies. I currently use sVB v2.8.7 and have to update it. I thought about turtle graphics. I really like this kind of logo programming very much. It is one of my favourite kinds to program with Small Basic and Python. Is it right that I can only use the turtle with the GraphicsWindow object? So, If I want to program a flag with your form designer, I can't use the turtle, but I am able to use all elements of the form designer's toolbox, right?

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/54#issuecomment-1918422183, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVXS2FQJQ2KK5KZR673YRHKKLAVCNFSM6AAAAABCRBNFLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJYGQZDEMJYGM. You are receiving this because you commented.Message ID: @.***>

VBAndCs commented 5 months ago

I have no access to my GitHub account right now. I just reply using email, and publish updates to the source code using command line. The read me contains a link to the sVB installer on the VS Marketplace, which I update frequently:

https://marketplace.visualstudio.com/items?itemName=ModernVBNET.sVBInstaller


From: Gregor @.> Sent: Wednesday, January 31, 2024 5:39 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] The position of the image after drawing a colorful shape with the turtle ... (Issue #54)

Hello Mohammad,

Thanks for your replies. I currently use sVB v2.8.7 and have to update it. I thought about turtle graphics. I really like this kind of logo programming very much. It is one of my favourite kinds to program with Small Basic and Python. Is it right that I can only use the turtle with the GraphicsWindow object? So, If I want to program a flag with your form designer, I can't use the turtle, but I am able to use all elements of the form designer's toolbox, right?

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/54#issuecomment-1918422183, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVXS2FQJQ2KK5KZR673YRHKKLAVCNFSM6AAAAABCRBNFLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJYGQZDEMJYGM. You are receiving this because you commented.Message ID: @.***>

boa2145 commented 5 months ago

Hi Mohammad,

I tried to install sVB 2.8.9.3 from the marketplace on my pc. It was possible to download the file, but it happened nothing after double clicking on the file. I do not know why it happened nothing. I deactivated Norton Utilities (Auto Protect and Smart Firewall), but I am not able to install your sVB file. PS: I deinstalled Norton Utilties, but it is the same, cannot install sVB.

VBAndCs commented 5 months ago

Make sure that the file name is sVB_2.8.9.3_Installer.msi and its size is 20.7MB or redownload it. Note the browser may ask you to trust the file and to keep it, otherwise it may not complete downloading it. I downloaded the file and it works fine on my PC. Also, make sure that you give the file permission to run. Right click it, and at the end of the properties window choose to unblock the file. You may also move the file to another folder away of windows drive. Good luck.


From: Gregor @.> Sent: Thursday, February 1, 2024 9:37 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] The position of the image after drawing a colorful shape with the turtle ... (Issue #54)

Hi Mohammad,

I tried to install sVB 2.8.9.3 from the marketplace on my pc. It was possible to download the file, but it happened nothing after double clicking on the file. I do not know why it happened nothing. I deactivated Norton Utilities (Auto Protect and Smart Firewall), but I am not able to install your sVB file.

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/54#issuecomment-1922289253, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVXMRBKTWYPBQTC5II3YRQDIXAVCNFSM6AAAAABCRBNFLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRSGI4DSMRVGM. You are receiving this because you commented.Message ID: @.***>

boa2145 commented 5 months ago

Hello Mohammad,

I was able to install sVB 2.8.9.3 on my pc. I changed the browser (Brave -> Edge) and deactivated Auto Protect and Smart Firewall by Norton 360.

Norton Message

I tried to install for everyone and got this message.

Installing Message

After that I installed only for me and it worked. Thanks for your help ... Gregor

VBAndCs commented 5 months ago

I just published the first book of the "Small Visual Basic Kid Programmer" series on Amazon: https://www.amazon.com/dp/B0CVK1BMC9


From: Gregor @.> Sent: Tuesday, January 30, 2024 11:09 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] The position of the image after drawing a colorful shape with the turtle ... (Issue #54)

Hello Mohammad,

For example, if I have drawn a flag with the turtle and filled it with color and then want to put the flag's logo on it, the logo is located behind the turtle's drawing but is not visible on the drawing. What could be the reason? On the other hand, if I draw the same flag with colored rectangles, I don't have the problem when I then put the logo on the drawing. I would like to use the turtle to slightly animate the drawing of the flag.

Regards ... Gregor

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

boa2145 commented 5 months ago

Hello Mohammad, This is good news, that you have published a book about programming with Small Visual Basic on Amazon. Congratulations! I will buy it for my Kindle and look forward to reading your new book. By the way, I keep looking at your sVB manual and reading sections that interest me. Regards ... Gregor

VBAndCs commented 5 months ago

Thanks Gregor. I hope you find it useful. Regards.


From: Gregor @.> Sent: Tuesday, February 13, 2024 8:16 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] The position of the image after drawing a colorful shape with the turtle ... (Issue #54)

Hello Mohammad, This is good news Mohammad that you have published a book about programming with Small Visual Basic on Amazon. Congratulations! I will buy it for my Kindle and look forward to reading your new book. By the way, I keep looking at your sVB manual and reading sections that interest me. Regards ... Gregor

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/54#issuecomment-1942376966, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVWGQVWYULMKMT2K2X3YTPCYBAVCNFSM6AAAAABCRBNFLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBSGM3TMOJWGY. You are receiving this because you commented.

[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avast.comhttps://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail