473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Restarting a program or Modal box without buttons in vbnet?

18
I am making a program which opens textfiles, initiates a bunch of variables and opens the file for editing.

I want to be able to close one text file and open another with the variables at their original settings.

I think it would be easier just to completely exit the program and reopen it, so I created another form which only contains the new() sub

Expand|Select|Wrap|Line Numbers
  1.     Public Sub New()
  2.         MyBase.New()
  3.  
  4.         'This call is required by the Windows Form Designer.
  5.         InitializeComponent()
  6.  
  7.         'Add any initialization after the InitializeComponent() call
  8.         While Not bool
  9.             Dim form1 As New Form1()
  10.             bool = form1.ShowDialog()
  11.         End While
  12.     End Sub
I want form1 to be a modal form where the accept or reject is passed by a click in the file menu rather than through a button. Any ideas?

The other idea (easier) is to just restart the program with a me.restart() type command, but I don't know how to do that or what command i would use?
Mar 19 '08 #1
2 1141
Sick0Fant
121 100+
I can't believe that it would ever be considered good coding practice, but you can just "call" your form_load event.
Mar 19 '08 #2
Sick0Fant
121 100+
Also, there *is* a Me.Restart() method! Who'da thunk it.
Mar 22 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Art | last post by:
NEWBIE ALERT! Esteemed List Participants and Lurkers: (System: P-II 350, 192 meg, Win98 SE, Python 2.2.3, wxPythonWIN32-2.4.1.2-Py22.exe) I'm having a lot of fun getting started with Python...
5
by: ChrisR | last post by:
Hi all Ive have a Main Form with Command Buttons down the Left hand side, that open various forms. Clicking on a button opens a Sub Form which is moved to take up 3/4s of the right of the main...
5
by: DS | last post by:
Anyone know the difference between the 2 and/or what the different combinations of them produce. Thanks DS
8
by: tshad | last post by:
I am using Andy Smiths Dialog windows, which work really well. My only problem is I am trying to make the Dialogs Modal. Someone mentioned putting <base target="_self"> into the head section...
0
by: homsar | last post by:
I've seen many posts discussing the options we have when using modal windows within a web based application. Often times it seems the greatest hurdle is simply getting the modal window to post back...
2
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post by:
Hi, I am wondering why the .NET Framework is quite different from Win32 API when it comes to displaying system modal message boxes. Consider the four following types of system modal message...
0
by: yabighelen | last post by:
HELP!!!!! I have to write a program that does this: Create a program that encrypts and decrypts a message... Inputs: A typed message Output: When the encrypt button is clicked the input...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
5
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
Hi all Have a couple of issues with the modal popup extender (asp.net 3.5, vb.net, visual studio 2008): I have created a user control (e-mail enquiry form) which is designed to accept text...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.