473,770 Members | 5,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restart Program From Code

Hey all, help needed here.
I'm trying to restart the program upon clicking on the logout button. How do I recall the main() function in the code?

Thanks
Nov 16 '05 #1
1 5238
You do a Process.Start to reload your application as you are exiting. If you
mean an actual
Windows logout, and not an application exit, then you'll have to do quite a bit
more.

In Whidbey, the Windows Forms guys have added a Restart method for relaunching
the
current program and exiting the currently running instance.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"aLvInDaHoU sE" <al******@hotma il.com> wrote in message
news:20******** *************** ***********@mic rosoft.com...
Hey all, help needed here.
I'm trying to restart the program upon clicking on the logout button. How do I recall the main() function in the code?
Thanks

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11110
by: Hal Vaughan | last post by:
My program can, when directed, check a floppy for updates, verify the MD5 sums from another source, then copy the new Java classes to its own directory tree. Once it does this, I'd like to restart the program so the changes take effect. What's the best way to do this? I figure if I call the program's main class, it will run, but then I'll have 2 instances (the original and the one that's upgraded) running -- plus I'm not sure if the...
1
2075
by: mdb | last post by:
Anyone have a suggestion for how to restart my appliacation when I exit? I'm not talking about a looping batch file - I need my program to have the ability to restart or not restart. Also, I can't just use Process.Start because the program is a single-instance program, and I can't guarantee how long the shutdown process will take (possibly a few seconds). I suppose I could pass a parameter to the program in Process.Start to bypass the...
3
2781
by: ad | last post by:
I want to renew all values of Application and Session. How can I restart application in program?
3
3216
by: John A Grandy | last post by:
In ASP.NET 1.1 and/or 2.0 ..... Is it possible to configure a web-app so that replacement of an .xml file ( physically located under the virtual dir root ) with a newer version of the file causes a web-app restart ... ? Also, is a stopping and starting a website in IIS the only way to restart a web-app ? (Of course, iisreset stops and starts all web-apps on the web-server ... but
2
11415
by: Brian Worth | last post by:
I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0 was able to shut down or restart the (windows XP) machine using a series of API calls. (Getlasterror, GetCurrentProcess, OpenProcessToken, LookupPrivilegeValue, AdjustTokenPrivilegese, ExitWindowsEx. I am trying to avoid using any API calls if possible and to use managed code instead. I couldn't find any easy way of doing this but searching the Internet with...
5
11106
by: scorpion53061 | last post by:
Is there a way that anyone knows to force a vb.net program to shut down and then restart itself?
1
3400
by: Steve | last post by:
I need to restart my VB.NET 2.0 app but I need to delay the new instance's start until I know the previous instance has ended and freed up all use of its resources (DLLs). What I have is an app where the EXE is basically a shell and there are multiple DLL "plug-in" modules. Within the shell I have a "load new module" function which lets the user import new plug-ins. When an updated plug-in is loaded, I can't overwrite the DLL immediately...
0
2208
by: Emanuele | last post by:
I have write a program using MS Visual studio C++ 7.0 (platform Windows XP professional). I'm not using .NET. This program save data in a SQL server 2000 database using ADO. Everything works correctly, yet if i stop the sql service and then restart it, while the programs write records, the reconnection to the server dont't work. When the service stops i catch all the exceptions. I want try to reconnect to the database continually till...
2
2416
by: Astan Chee | last post by:
Hi, I have a python module that keeps on crashing with various windows errors (not BSOD but the less lethal windows XP popup ones). Now these are intentional and rather sporadic so I cant really solve it by attempting to fix the crash; rather what Im trying to do is make another module outside it that restarts this module every time it crashes. Is this possible? How do I do this? Or does one windows crash in one python module crash python...
0
9595
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10232
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10059
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7420
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.