Solved

Open Winform in vb.net

Posted on 2010-11-16
2
483 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
This is an explanation of a simple data model to help parse a JSON feed
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 prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

747 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