Friday, July 31, 2009

Am I able to call the totals from one form in Visual Basic to another form?

I want to do a Visual Basic project that is a store. One the first 3 pages, customers can selected items that they wish to purchase and on the 4th page I want it to be a checkout page that tells them how much their grand total is that they have accumulated from the first 3 pages. How do I call the totals from the first 3 pages to create a grand total on the checkout page. If you could show me with example code would be great.

Am I able to call the totals from one form in Visual Basic to another form?
for sure you can access any thing in a form from another one . but only if you define it as public.


you can use public variables , public functions or public properties.


let assume that we wanna calculate the total in Form1 and access it from From2.





if you want to have an uncontrolled access(free read and change) it's better to use a public variable.





if you want to just read (and no changes) it's better you use public functions.





and finally if you wanna have a controlled access (read it and verify and control changes ) it's better to use public properties.





if it's not clear enough and you want more explains or samples please feel free to contact me on email address MZR_IR@YAHOO.COM


good luck.
Reply:this my friend is the answer to all your problems:





http://www.tek-tips.com/faqs.cfm?fid=577...

graphics cards

No comments:

Post a Comment