Solved

Open Winform in vb.net

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

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

Suggested Solutions

Title # Comments Views Activity
The Best Website Creation Tools 14 119
asp Google Map 2 89
AvlTree-Node Data type 4 44
IntelliJ and Eclipse Neon 2 installations 4 63
This article will show, step by step, how to integrate R code into a R Sweave document
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.
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 …

738 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