VB.NET Programming. Intermediate Lesson 2. Variable Scope

Поділитися
Вставка
  • Опубліковано 19 лис 2024

КОМЕНТАРІ • 27

  • @jtlunsford780
    @jtlunsford780 Рік тому +3

    If I've seen a Block Level var, I didn't know it's scope or how it worked till this vid. I didn't know how Form1_Closing worked and I had never heard of Closed. WOW . I stop the vid and take notes each time I learn something new. Thank you so much for being you and what you do for us out here....JT

  • @barbarareinhardt3264
    @barbarareinhardt3264 2 роки тому +1

    Thank you so much for sharing these lessons. I am taking a beginning VB course online through a college this semester and it has been a nightmare. The instructor has been a complete ghost. The textbook introduces too many new concepts in each chapter and doesn't give enough short targeted practice. The tutorials are pages of code long and involve so many other concepts that it's overwhelming. I was almost ready to give up when I found this series on UA-cam. It has been a lifesaver. I'm actually enjoying programming again. I will send you some $ Love as soon as I'm able. Thank you again. I hope you continue creating these videos!

  • @girishnaik3449
    @girishnaik3449 3 роки тому +2

    Thank you for this! can't wait for the next video!

  • @kabukijoe99
    @kabukijoe99 Рік тому +1

    very good explanation of variable scope.

  • @sachininissanka8
    @sachininissanka8 Рік тому +2

    thank u very much, sir I follow your channel, and I get so much knowledge thank you, sir.😊

  • @zeoloty4494
    @zeoloty4494 3 роки тому +3

    Finally! Thank you for the lesson.

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 роки тому +2

      More on the way as soon as the work load lightens. We teachers are doing the exam boards' job for them these days.

  • @kevinerose
    @kevinerose 3 роки тому +1

    Loving these videos. I'm trying to get back into programming after 15 years. In those 15 years, I've just dabbled in VBA here and there so it is fun learning the new system. Also, glad to see loads of similarities with VB6. I think database access may be the biggest change so I am looking forward to seeing that video. Also, I remember dabbling in object arrays a bit in VB6 so I'm not sure how that works in VB.NET yet.

  • @bjoernlorenzen4091
    @bjoernlorenzen4091 3 роки тому +2

    Your videos are incredible good. I love everything about them

  • @DeusProgramming
    @DeusProgramming 11 місяців тому

    Hey man, first of all, found your videos today, great stuff, real simple to listen/understand (if the brain can comprehend the advanced level of coding required sometimes xD)
    Quick question, how did you get that toolbar for quick defining events under the Form Explorer
    Btw, do you do any personal lessons? Thanks

  • @kamkoamoh
    @kamkoamoh 3 роки тому +2

    Good to have the second part men ❤️

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 роки тому +2

      First view!!! - Part 3 is on the way this week (I hope) :)KD

    • @kamkoamoh
      @kamkoamoh 3 роки тому +1

      @@ComputerScienceLessons I needed this tutorials a year ago, damn they would be useful as hell ❤️😉thanks men , 101% sub

  • @josejaimefelixgarciagarcia8884
    @josejaimefelixgarciagarcia8884 3 роки тому +1

    that is so cool

  • @anthonynorton666
    @anthonynorton666 3 роки тому +1

    Excuse my ignorance, but I missed a step here. How did you end up with 2 Form2s (~8:15)?

  • @zeoloty4494
    @zeoloty4494 3 роки тому +2

    I see you welcome the user in Form1, but I tried to do it in Logon form and it worked too. But when I defined two welcome strings, one in Form1 and one in Logon, only the latter appeared. Any idea why?

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 роки тому +1

      You need to define the welcome string somewhere that both forms can see it. That means in a module with the public keyword. Add a module to the project and put the following code in it:
      Public stWelcome As String = "hello world"
      The welcome string should be available to both forms.
      (There are other ways to do this, but they require some knowledge of OOP, which I've covered in another series) :)KD

    • @zeoloty4494
      @zeoloty4494 3 роки тому +2

      @@ComputerScienceLessons is it a good practice in general to put all public variables in a module and call it "public variables module?"

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 роки тому +2

      It's not a bad idea, but it would depend on the size of the application and how many people were working on it. I have worked for software companies that do exactly what you suggest. Others might group variables according to purpose. Ultimately, it's about making your particular application easy to maintain. :)KD

  • @harisimer
    @harisimer 3 роки тому +1

    Form1. Show... Form1 is a Class, its a bit silly that this works for forms. But usually you would .Show an Instance of the class Form1
    Little joke for this one, try: Form1 = Nothing; Form1. Show
    This makes absolutely no sense for any other class then forms, because forms get automatically created instances, which confuses beginners once they try to to anything more advanced with forms.

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 роки тому +2

      Forms (and the classes they reference) are indeed a special case, most classes don't affect the user interface. You can of course create multiple instances of the same form. Perhaps I will dig into this in an Advanced course. :)KD