Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15213

VS 2019 I Seem to be Missing Something Fundamental

$
0
0
Howdy,

I'm hoping to get some help in learning/understanding some seemingly very basic problems.

I am not a programmer. I learned Turbo Pascal 3 back in school and became interested enough to purchase the compilers for TP 5.5 and the 6. I also dabbled a bit in Turbo Prolog. Needless to say, this was back in the DOS days. I was adequate for what I needed/wanted to do. As life became more complicated, I had no reason to code and I didn't until a decade or so later. I decided to try and learn Visual Basic. I think it was version 6. I remember being much more favorably impressed than my previous Basic experience which involved a Radio Shack TRS-80 with cassette drive. Mostly, I was glad it hid all that intimidating "Windows" stuff from me so I didn't have to worry about it. I probably would have spent more time and effort on it but a brain tumor intervened. Then, unexpectedly, I got married and had 2 kids.

Now I am at a point of life where I have envisioned a project I would like to undertake. I have roughed it out conceptually and decided that I really need to learn proper coding so I downloaded the 2019 version of MS's offering. I also bought a book, "Learn Visual Basic", by Conrod and Tylee. The book was chosen based on Amazon reviews and because the same authors have another text dealing with Basic and databases.

Reading the book has been no problem thus far. Everything seems to make sense conceptually but I must be missing something. because I have not even been able to complete the first chapter. I am repeatedly told that my form is not a part of my project. Repeated forays online have led to a kludge where I change the text of a file and compile successfully but that file is not something that the tutorial has mention as of yet and, while trying to fix things, I have found other errata and I do not understand why.

I have tried starting over fresh and even uninstalled and reinstalled Visual Studio but the results remain the same. This leads me to infer that I am systematically making the same errors but I have no idea what those errors are.

Besides the problem of my form not being a part of my project, I have noticed the following is how a typical procedure is generated in the form file:

Private Sub btnStart_Click(sender As Object, e As EventArgs) Handles btnStart.Click
'Establish and print starting time
StartTime = Now
txtStart.Text = Format(StartTime, "hh:mm:ss")
txtEnd.Text = ""
txtElapsed.Text = ""
End Sub

When I check the procedure in the text, however, I notice some differences. The book contains the text "ByVal sender As Object" where the argument generated by Visual Studio omits "ByVal".

Similarly, "e" in the generated procedure is as given above whereas the text says, "ByVal e As System.EventArgs". The differences being in the "ByVal" and the "System" preceding "EventArgs".


I have noticed other but similar discrepancies between the generated code and the textbook code for all of the subroutines. I have not idea why. What I do know is that things are not work out as they should and my frustration level is beginning to hit destructive levels.

I know that since the brain tumor, I do not pick things up as easily as I used to but I usually eventually figure it out. That is not the case this time and I very much hope that somebody can set me back on the path of rectitude.

FWIW, the system is running Win 10, has 64GB of Ram, and a pair of Xeon E5-2650 processors. It is handicapped by the presence of a substandard operator who is even now pining away for his old Stadtler & Mars slide rule.

Thank you for your consideration.

Viewing all articles
Browse latest Browse all 15213

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>