Solved

Open Winform in vb.net

Posted on 2010-11-16
2
484 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
2 Comments
 
LVL 3

Accepted Solution

by:
kraiven earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

914 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now