Visual Basic 2010 Questions

We used Cint at college so im ok with that bit,
What i dont understand is why you are using Armytotaltxt.text in the sum? and where is form_load() located?

Thanks
 
Do you know how to put "break pints" in design view?

if so put a break point just after the last end if statement and move the mouse pointer over the variables to see the values :)
 
Oh form load is the event triggered when the form is loading(just after form_activate event)
Just double click on the form in design view and it will take you to Form_load event


EDIT:
You can even type it

Private sub Form_Load()
'put any thing here and it will run on the form load state
End sub
 
Ok i added a breakpoint, what exactly does it do,
With the army value i have added 2 groups of 10 immortals totalling up to 560 points however in the army total it is only showing me the points for one group, so 280 points.
 
Break point will stop in the middle of the execution cycle.
You can press F8 key to go step by step and see what happens to values(just move the mouse pointer on top of a variable or control)
 
Ok will do that,
Cheers for the help so far but im going to knock it on the head for tonight/Sweeney todd is on.
Will see what i can do to it in college tomorrow when the teachers around and will update this tomorrow night.

Thanks
 
ok
good luck
By the way if you are interested in programming, learn about variable naming conventions.
like when naming a control or variable to start with some letters so that it is easier to understand and debug for any one anywhere.

example:
integers - staring with int (intElite1Total)
Single - sng
double - dbl
textboxes starting with txt (txtArmytotaltxt)
comboboxes - cmb
form - frm
string - str

and so on....


Found a link
http://support.microsoft.com/kb/110264
 
Discussing naming conventions is a bit of a minefield since everyone has a different view, but Microsoft recommend using a mix of PascalCase and CamelCase for .NET development (which is similar to what Java uses). E.g.

Code:
int thisIsAnInt = 0;
string myUsefulMessage = "Hello, world.";

They discourange prefixing variable names with things like 'int', 'str' etc (which is also known as Hungarian Notation) - http://msdn.microsoft.com/en-us/library/ms229045.aspx
 
Cheers for the help so far all,
Right i am just trying to use a previoudly declared from a sub in another sub now in order to set it back to 0 when the button is pressed.
I have set both subs i want to use as Public but still it says that the variable has not been declared?

Thanks
 
Me again,
Right now i am using a combo box, however i am trying to give each option a value as i cannot use it as a text value.
For example Autarch is one of the options from the combo box.
If the user was to select Autarch how would i create an IF statement from this, i cannot do IF HQ1 = Autarch as it is not an integer.

Thanks
 
Back
Top Bottom