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

Crash during set the foreground color of a control ... #21

Closed boa2145 closed 1 year ago

boa2145 commented 1 year ago

Hello Mohammad, when I want to set the foreground color of a control, the program crashes. I tried it with a label, a listbox and a button. Each time the program stopped responding and then crashed. I enclose 3 screenshots to show you my steps, until the app crashes.

Greetings... Gregor

Screenshot (355) Screenshot (356) Screenshot (358)

VBAndCs commented 1 year ago

@boa2145 Thanks for reporting this. I got the same issue, despite this was stable for a long time. When I tried it in VS, it works fine, but it causes trouble in the version installed in the program files! I will investigate more. thanks

VBAndCs commented 1 year ago

@boa2145 The color dialogs tries to save the selected brush to the recent brushes file in the project directory, which is denied when sVB is installed in the program files folder. I saved this file to the user date folder to fix the issue. I also improved the code editor title as you asked. I hope you like it. You can use these updates in the sVB 2.8.4.2 Thanks.

boa2145 commented 1 year ago

@VBAndCs Hello Mohammad, Thanks for your effort. The font on the top left looks fine in the code editor. It is much better than before, like a tiny shadow.

I can't say much about the crash, only that it happens regularly in this context.

Regards ... Gregor :)

VBAndCs commented 1 year ago

I can't say much about the crash, only that it happens regularly in this context.

It is fixed for me in the new version. Uninstall the old version and try sVB 2.8.4.2.

boa2145 commented 1 year ago

Hello Mohammad, I tried it out to change the foreground color of a control. It worked.

Could you help me to use the short cuts to decrease or increase the font size resp. the size of the text of a control. I don't know what to do with "Strg"+"[" or "Strg"+"]", because on my keyboard I have to press "AltGr"+"[" to get "[" and "AltGr"+ "]" to get "]".

VBAndCs commented 1 year ago

They are the same as MS Word. Ctrl+[ and Ctrl+] while you are typing in English. The [ and ] in Arabic are on the D and F keys, and they can differ in each language, but in English, they are on the two keys next to P.

boa2145 commented 1 year ago

My [ and ] characters are on the key with ( and 8 and the other is on the key with ) and 9. There are three characters on each key. I have to press AltGr + [ to get [ and AltGr + ] to get ].

VBAndCs commented 1 year ago

@boa2145 It would be better to use the font dialog (Ctrl+F) to change the font size and any other font property you want:

image

boa2145 commented 1 year ago

Good morning Mohammad,

That sounds better to use STRG+F and your font editor. Thanks for the hint.

Presently I am studying to animate forms again. That will take some time and I am going to try your samples out, too. I have all programming books by Philip Conrod and Lou Tyle. Sometimes it is a bit difficult for me to use the controls and I have to think what would be the matter for kids? Easier or much more difficult? The handling of SB controls is not easy, although I have some programming experiences.

Have a nice Friday ... Gregor

Mohammad Hamdy Ghanem @.***> schrieb am Fr., 26. Mai 2023, 04:16:

@boa2145 https://github.com/boa2145 It would be better to use the font dialog (Ctrl+F) to change the font size and any other font property you want:

[image: image] https://user-images.githubusercontent.com/48354902/241101775-31d9b7af-0193-4889-8a30-d3b20ac2a54d.png

— Reply to this email directly, view it on GitHub https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/21#issuecomment-1563723578, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3D5YMVCRPZLIM76VMCG5STXIAG6PANCNFSM6AAAAAAYOJAUZE . You are receiving this because you were mentioned.Message ID: @.***>

boa2145 commented 1 year ago

Postscript: I've meant to handle objects, their methods and properties, furthermore controls to code a tiny program with animated forms.

Mohammad Hamdy Ghanem @.***> schrieb am Fr., 26. Mai 2023, 04:16:

@boa2145 https://github.com/boa2145 It would be better to use the font dialog (Ctrl+F) to change the font size and any other font property you want:

[image: image] https://user-images.githubusercontent.com/48354902/241101775-31d9b7af-0193-4889-8a30-d3b20ac2a54d.png

— Reply to this email directly, view it on GitHub https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/21#issuecomment-1563723578, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3D5YMVCRPZLIM76VMCG5STXIAG6PANCNFSM6AAAAAAYOJAUZE . You are receiving this because you were mentioned.Message ID: @.***>

VBAndCs commented 1 year ago

@boa2145 I published 58 simplified videos till now to introduce sVB to kids. They are in Arabic, but even if you mute the sound, you will still understand what I am doing, starting from the fifth video. I explained how to introduce sVB to kids in this section:

sVB for kids:

It is fair to wonder about how to introduce sVB to kids, while it seems very big compared to SB. In fact sVB can be too easy for kids. All you need is to prepare some attractive images, use the color dialog to display them in labels, and use the animation methods to write some short and funny applications that interests small kids (see the animation and Jerry projects in the samples folder).

image

You can start with codeless apps, use the form designer to display some shapes and images, use the color dialog to change their back colors. In the next step you can add some buttons to the app, each with a single code line that can animate the shape location, color or transparency. In the next step you can introduce variables, but avoid If statements and loops until the kid gets comfortable with the language. In fact I published a course to teach sVB for kids on YouTube, but it is in Arabic. It contains about 60 videos (10 minutes in average), and I think it is easy for developers and teachers to view them even they don't understand Arabic, as the visual design and the little sVB code used, with the aid of this book, will be easy to comprehend, so, you can get the idea and build upon. I encourage youtubers to introduce such a course in English and other languages, and they are free to reuse any ideas from my course without worrying about copyrights.