Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

newbie: windows form designer generated code

Solved!
Go to solution

Hi,

I am new to MeasStudio and VB.   Currently using MS VB08 with  NI's MeasStudio 8.5.  I am redoing Ni's example "BasicSignalGeneration."  Unfortunately, with the User Interface and Main form completed I am unable to compile and run the program.  I realized a large section of code is missing, namely the section "Windows Form Designer generated code."   My question is how do I generate this section?  Is this not generated by the VB?  I tried a cut and past operation, but that was unsuccessful 😞

 

When starting the project, I chose VB Ni Windows Application template.  

 

Thanks,

 

 

0 Kudos
Message 1 of 6
(15,027 Views)
Solution
Accepted by topic author Agent K

Agent K,

 

The Windows Form Designer generated code is code that is generated when you use the Design view of your project where you see the user interface of your program.  When you drag and drop controls on there and modify their properties, the Design view generates the code in that "Windows Form Designer generated code" section.  How did you create your user interface file?  If you started from scratch with a VB NI Windows Application project and then dragged the controls on the Design view, that code should have been generated.

Eric B.
National Instruments
0 Kudos
Message 2 of 6
(15,014 Views)

Hi Eric,

 

Sorry, I created the user interface by grabbing the relevant controls from the tool box. I then double cliked on the control to place the code.   In looking over the code for the form, did not see the "Windows From Designer Generated Code." I am wondering if I am missing a view or a setting?  Also, I do not see the  "Windows From Designer Generated Code" for not Measurement Studio Application (i.e. VB2008 Hello World).  

 

Oops, sorry about the solution button. I am a rather new to this forum.

 

thanks,


Agent K wrote:

Hi,

I am new to MeasStudio and VB.   Currently using MS VB08 with  NI's MeasStudio 8.5.  I am redoing Ni's example "BasicSignalGeneration."  Unfortunately, with the User Interface and Main form completed I am unable to compile and run the program.  I realized a large section of code is missing, namely the section "Windows Form Designer generated code."   My question is how do I generate this section?  Is this not generated by the VB?  I tried a cut and past operation, but that was unsuccessful 😞

 

When starting the project, I chose VB Ni Windows Application template.  

 

Thanks,

 


 

 

0 Kudos
Message 3 of 6
(14,980 Views)

Agent K,

 

Sorry about the misleading information.  I just created a new VB project and placed down a Measurement Studio Waveform Graph and couldn't find the designer code myself.  Turns out in Visual Basic, Visual Studio hides that code by default.  To see it, click the "Show All Files" button at the top of the Solution Explorer (next to the refresh button).  You should then be able to expand the Form1.vb file and see the Form1.Designer.vb file that has all of the Windows Form Designer generated code.

Eric B.
National Instruments
0 Kudos
Message 4 of 6
(14,962 Views)

hello!

 

i cant find the view designer button for my form even

thou the view code button exists in the solution explorer.

 

for eg im able to find code.Designer.vb but not code.vb[Design].

Pls help out asap!!!

 

Thanks,

clueless

 

 

0 Kudos
Message 5 of 6
(14,913 Views)

shrads,

 

 Are you using an NI example or code you created yourself?  If it is code you created yourself, you have to make sure you created a Windows Forms application or an NI Windows Application when you created your project.  You should be able to right-click anywhere in the code and select "View Designer" from the context menu if there is a designer associated with the code.  You should also be able to right-click on "Code.vb" in the solution explorer and select "View Designer" as well.

Eric B.
National Instruments
0 Kudos
Message 6 of 6
(14,889 Views)