![]() |
Viewing VB's Automated code
hello, how are you and stuff? Stuck? ..same as me then, nah simple really i guess for a more experienced users of vb.net, not sure if anyone would like to help but i would appreciate it a hell of a lot.
im new to .net, moving over from vb6 and i have a slight glitch in writing code in this fan-dabby-dosey enviroment; i need to declare a string, but do it globally, but simply dont know how to view the code that VB automatically starts to write from the second you open a form, the Inherit Windows.System etc..and other than the one or two ( must of been 'mis-clicks' ) times i actually Seen this code with my own eyes, the rest of the time its totally hidden to me. for example, i have a form> add controls > view code, i get the Form_Load code or the code specific to the control i double clicked. how do i view the vb specific/automated code? btw; i have searched the msdn library and also the online msdn, google cant help either. Thanks if anyone has even an incline to the answer. JohnWesley |
I believe you are looking for the designer code?
1.) open solution explorer 2.) select the control or project you want to see the designer code for (note, this does not work with the solution selected, only project or control/form) 3.)up on the top title bar of your solution explorer there are some little icons, if you hover over them one of them will have a tooltip that says "Show All Files", click this one and your control/form will now have a "+" beside it in the solution explorer tree view and when you drop it down, the designer code will be there. |
another thing I should tell you, there is a thing called partial classes now, which means the same class can be in two or more files. so if you want to declare a global, you don't even need to do it in the designer code, just do it at the top of your class in the main codebehind vb file.
|
-curls up in a ball and feels dumb for a few hours-
Great stuff melbolt, thanks, though last night at around 1 AM i tiredly stumbed across this button and found the designer code (Eurika!). thanks alot for your explanation, and thanks alot for the tip on the declarations; seems handy. Thanks again for your help. |
| All times are GMT -5. The time now is 8:23 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC