Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Open Winform in vb.net

Posted on 2010-11-16
2
Medium Priority
?
514 Views
Last Modified: 2013-12-24
Hello
   Can anyone give me solution To open windows form in vb.net by creating Form object without trigger any Event.My Code Sample Given below it open the form but close witinin second

Module Dotlib2
    Sub main()
        Dim obj1 As New BackUP
        obj1.Show()    
    End Sub
End Module
0
Comment
Question by:gopalhazel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
kraiven earned 2000 total points
ID: 34153219
Your obj1 is out of scope at the end of Sub Main. That's why it closes - you need to be doing something with it or maybe return obj1 to the caller. If you want to use the form just within the Sub Main then open it with ShowDialog() rather than Show(), do your work and then close it, this will keep the Sub Main "alive" until you've finished with the form.
0
 

Author Closing Comment

by:gopalhazel
ID: 34153657
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question