BadNews01
December 6th, 2008, 12:09 PM
*NOTE: I am using Visual Studios.NET 8 Standard Edition*
I am very new to using visual studios.net and just purchased about 3 days ago actually. I have very beginner skills in vb 6 and using the program for the language. The great thing is the way the program is set up its pretty easy to go from one to the other SO FAR. Obviously the only thing that gets in my way is the language.
My question might be very easy and I think i have the answer myself actually but I want to make sure. I bought a book to program in VB.NET. Going threw the book there are curtain things I can't go along with from the book.
First off declaring a "global variable" which i think is how its referred to in visual studios. Before in vb6 the code part of the program had a tab which let you switch from a small section of code to a particular object to a section which showed all the code for the program and objects together. In visual basic 6 to declare a variable which would be used for several things you would have to do it under "Option Explicit" I think it was called. On Visual Studios the book is telling me to do it under "Windows Form Designer generted code" which should load up automatically with a new project but it does not for me. My book says when you start a new project with a form and double click it the code should look like this :
Public Class Form1
Inherits System.Windows.Forms.Form
+ Windows Form Designer generated code
Private Sub Form1_Load(ByVal sender As System.Object. _
ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
but when i do it MINE reads the following:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
I asume my book just is using a older version of the program then I am which is to bad because its a little difficult to follow.
1.If this is true where would i declare a variable with a wide scope or a "global variable"?
^Thats my first question my next question is:
2. It says I could run a program off of CommandPromt if I put the filepath and then end it with "\bin" then once it loads all i have to do is type in the program with ".exe" at the end...my problem is doing the file path. When I open Command Promt it already has my "C:\Users\MyName>". I don't think its a problem but the book acts like the command prompt should start blank and ready to add a filepath from scratch. Another thing is Im not too sure why projects save so many files. With vb6 it saved the form and the module and with visual studios it saves a lot more...i think i saw "directory" in there. Again i think the book is using an older version because the start screen is different.
3. A more simple question is that my book has grids on its forms.
4. It says i can go to the help menu and look for "show start page" or something like that to customize my version how I want. It then shows when you click it you have a drop down menu and can click VB6 to make my envoirnment to look like vb6. I don't have that option in my help menu maybe someone can tell me where I can do this or give me helpful tips on things I can customize to see how i would like it.
5. Another simple question is the book had an example of centering a label by clicking on a label put on the form and then changing its alignment property to "top center". I did the following and nothing happened in design view OR in runtime. Looking at the book it seemed to center after changing the alignment right in the design view.
I really am convinced I just have a newer version of visual studios than the book. Again I am using Visual Studios.NET 8 Standard Edition. Anyway hopefully someone can help me out on some of my questions. The help is greatly appreciated and I thank anyone who helps me in advance.
I am very new to using visual studios.net and just purchased about 3 days ago actually. I have very beginner skills in vb 6 and using the program for the language. The great thing is the way the program is set up its pretty easy to go from one to the other SO FAR. Obviously the only thing that gets in my way is the language.
My question might be very easy and I think i have the answer myself actually but I want to make sure. I bought a book to program in VB.NET. Going threw the book there are curtain things I can't go along with from the book.
First off declaring a "global variable" which i think is how its referred to in visual studios. Before in vb6 the code part of the program had a tab which let you switch from a small section of code to a particular object to a section which showed all the code for the program and objects together. In visual basic 6 to declare a variable which would be used for several things you would have to do it under "Option Explicit" I think it was called. On Visual Studios the book is telling me to do it under "Windows Form Designer generted code" which should load up automatically with a new project but it does not for me. My book says when you start a new project with a form and double click it the code should look like this :
Public Class Form1
Inherits System.Windows.Forms.Form
+ Windows Form Designer generated code
Private Sub Form1_Load(ByVal sender As System.Object. _
ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
but when i do it MINE reads the following:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
I asume my book just is using a older version of the program then I am which is to bad because its a little difficult to follow.
1.If this is true where would i declare a variable with a wide scope or a "global variable"?
^Thats my first question my next question is:
2. It says I could run a program off of CommandPromt if I put the filepath and then end it with "\bin" then once it loads all i have to do is type in the program with ".exe" at the end...my problem is doing the file path. When I open Command Promt it already has my "C:\Users\MyName>". I don't think its a problem but the book acts like the command prompt should start blank and ready to add a filepath from scratch. Another thing is Im not too sure why projects save so many files. With vb6 it saved the form and the module and with visual studios it saves a lot more...i think i saw "directory" in there. Again i think the book is using an older version because the start screen is different.
3. A more simple question is that my book has grids on its forms.
4. It says i can go to the help menu and look for "show start page" or something like that to customize my version how I want. It then shows when you click it you have a drop down menu and can click VB6 to make my envoirnment to look like vb6. I don't have that option in my help menu maybe someone can tell me where I can do this or give me helpful tips on things I can customize to see how i would like it.
5. Another simple question is the book had an example of centering a label by clicking on a label put on the form and then changing its alignment property to "top center". I did the following and nothing happened in design view OR in runtime. Looking at the book it seemed to center after changing the alignment right in the design view.
I really am convinced I just have a newer version of visual studios than the book. Again I am using Visual Studios.NET 8 Standard Edition. Anyway hopefully someone can help me out on some of my questions. The help is greatly appreciated and I thank anyone who helps me in advance.