Where is the rest of my Form Class? Where is main?

S

Siegfried Heintze

How does the partial class feature work with Visual Studio (VS) and VB.NET?
Does VB have the keyword partial like C# does? I don't see it in my wizard
generated WinForm application.

In C#, I see that VS inserts the keyword partial and puts the main program
in a different source code file. I think it does this with VB too but I
cannot find it.

I want to edit the constructor for the form class that the wizard
generated -- but I don't see that in VS 2005. Where is that source code
file?

One of the things I want to do is add a tool tip. I was suprised I did not
find that in the properties window.

Thanks,
Siegfried
 
A

Armin Zingler

Siegfried Heintze said:
How does the partial class feature work with Visual Studio (VS) and
VB.NET? Does VB have the keyword partial like C# does? I don't see
it in my wizard generated WinForm application.

In C#, I see that VS inserts the keyword partial and puts the main
program in a different source code file. I think it does this with
VB too but I cannot find it.

At the top in the solution explorer click the icon "show all file". Click
the "+" next to FormX.vb. Open FormX.Designer.vb.
I want to edit the constructor for the form class that the wizard
generated -- but I don't see that in VS 2005. Where is that source
code file?

The constructor is still invisible, but if you type "Sub New <enter>", a
call to Initializecomponent is inserted and you can add additional code (all
in FormX.vb)
One of the things I want to do is add a tool tip. I was suprised I
did not find that in the properties window.

I don't know.


Armin
 
G

Guest

With your project selected in the solution explorer, click the "Show All
Files" icon at the top. Hit the '+' sign next to the form and open the
<formname>.designer.vb file.
BUT - you don't want to make any changes in here!
There is no 'constructor' defined in here, so just put it in the normal
place. Just be sure to call:
MyBase.New()
InitializeComponent()

You want to add a tool tip to what? No ToolTipText Property?
 
L

Lloyd Sheen

Armin Zingler said:
At the top in the solution explorer click the icon "show all file". Click
the "+" next to FormX.vb. Open FormX.Designer.vb.


The constructor is still invisible, but if you type "Sub New <enter>", a
call to Initializecomponent is inserted and you can add additional code
(all in FormX.vb)


I don't know.


Armin

Add a tooltip control to your form. This will cause a new property to show
for all controls that would support tooltips. Not very intuitive but this
is the dot.net way of extending existing controls.

Hope this helps
Lloyd Sheen
 
A

Armin Zingler

Lloyd Sheen said:
Add a tooltip control to your form. This will cause a new property
to show for all controls that would support tooltips. Not very
intuitive but this is the dot.net way of extending existing
controls.

But I don't need a tooltip. :)


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top