Solved

Open Winform in vb.net

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. 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 : Go t…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

691 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