centering form - Screen object
After 2 years of threatening - I have finally started trying to code in VB .Net. I'm trying to start out with a small project and learn some of the nuances as I go. The first thing I ran into was I tried to put some declare statements at the top of my form and was told that these statements can not be outside of a namespace. How/where do I declare variables with module scope?
Oops. Subject should have been Declaring variables for module scope.
My original question dealt with centering the form on the screen but I figured that one out on my own before I hit the submit button.
Re: centering form - Screen object
Quote:
Originally posted by sodakotahusker
After 2 years of threatening - I have finally started trying to code in VB .Net. I'm trying to start out with a small project and learn some of the nuances as I go. The first thing I ran into was I tried to put some declare statements at the top of my form and was told that these statements can not be outside of a namespace. How/where do I declare variables with module scope?
Public or form scope declarations can be made anywhere below the Inherits statement of a form or the Module Module Name of a module, provided it is outside of subs, functions or events.
The normal place to make them is immediately below the Inherits statement or the Module Module Name.
The scope of declarations (which cannot be a Public declaration) made within a sub, function or event is limited to that sub, function or event.
You can amend the thread title by using the Edit facility on your first post.