INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

VB.Net - Import "Embedded" Windows Form into Visual Studio

VB.Net - Import "Embedded" Windows Form into Visual Studio

(OP)
Hello,

I have a VB.net application within a single .vb file which contains windows form code which was modified manually (despite the 'It can be modified using the Windows Form Designer. Do not modify it using the code editor.' message).

I would like to somehow import this code into Visual Studio so that I can work with windows form designer to modify the form layout.

1. How can I get Visual Studio to recognize that I have a windows form in my .vb code?
2. Can the resulting code remain in the single .vb file or do I need to have a form.designer.vb code separate from the application code once I do so?

Thanks,
Jeff

RE: VB.Net - Import "Embedded" Windows Form into Visual Studio

Try this:

Create a project in Visual Studio. In the Solution Explorer (usually on the right side), right-click on the project name and select Add -> Existing Item... from the context menu. In the Add Existing Item dialog that pops up, navigate to the .vb file and select it, then click Add. You should now be able to modify the form.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!

RE: VB.Net - Import "Embedded" Windows Form into Visual Studio

(OP)
Jebenson,

I tried your suggestion, but when I right click on my added .vb item in the solution explorer and pick "View Designer" all I see is a blank form - not the form that is defined in the added code.

Jeff

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close