VB.net 2003 (standard)
In my application, within FORM1_LOAD, I check for various things (ie valide
user names, files, etc.). What I want to do is upon an event such as "No
Valide User Name Found" to pop up a warning message about the event and then
close the application.
I can do everything I want with the exception of a clean shut down during the
Form1_Load.
Back in VB6, I did this by:
Unload Me
Exit Sub
How do I do this in VB.net? I tried "Unload.Me" but it returns an error as
the application continues to try to run.
I'm sure it's a simple thing... but I've not found any reference to this in
all my books.
Regards,
Bruce 6 2619
Form.Close() ?
Sunny
In article <oo************ *************** *****@4ax.com>, Us**@NoWhere.co m says... VB.net 2003 (standard)
In my application, within FORM1_LOAD, I check for various things (ie valide user names, files, etc.). What I want to do is upon an event such as "No Valide User Name Found" to pop up a warning message about the event and then close the application.
I can do everything I want with the exception of a clean shut down during the Form1_Load.
Back in VB6, I did this by:
Unload Me Exit Sub
How do I do this in VB.net? I tried "Unload.Me" but it returns an error as the application continues to try to run.
I'm sure it's a simple thing... but I've not found any reference to this in all my books.
Regards,
Bruce
* Mr. B <Us**@NoWhere.c om> scripsit: In my application, within FORM1_LOAD, I check for various things (ie valide user names, files, etc.). What I want to do is upon an event such as "No Valide User Name Found" to pop up a warning message about the event and then close the application.
\\\
Public Module Program
Public Sub Main()
If ... Then
Application.Run (New MainForm())
End If
End Sub
End Module
///
In the project properties, select 'Sub Main' as startup object.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
I'd use Herfried's method. But if you absolutely have to load the form
first to check your validations, then you can use Me.Close() and/or
Application.Exi t() to abandon loading.
_______________ _______________
The Grim Reaper
"Mr. B" <Us**@NoWhere.c om> wrote in message
news:oo******** *************** *********@4ax.c om... VB.net 2003 (standard)
In my application, within FORM1_LOAD, I check for various things (ie
valide user names, files, etc.). What I want to do is upon an event such as "No Valide User Name Found" to pop up a warning message about the event and
then close the application.
I can do everything I want with the exception of a clean shut down during
the Form1_Load.
Back in VB6, I did this by:
Unload Me Exit Sub
How do I do this in VB.net? I tried "Unload.Me" but it returns an error
as the application continues to try to run.
I'm sure it's a simple thing... but I've not found any reference to this
in all my books.
Regards,
Bruce
With Deft Fingers, hi************* **@gmx.at (Herfried K. Wagner [MVP]) wrote: \\\ Public Module Program Public Sub Main() If ... Then Application.Run (New MainForm()) End If End Sub End Module ///
In the project properties, select 'Sub Main' as startup object.
Much appreciated!
Bruce
With Deft Fingers, Sunny <su******@icebe rgwireless.com> wrote: Form.Close() ?
Sunny
??? (duh on my end)... Thanks!
Bruce
With Deft Fingers, "The Grim Reaper" <gr*********@bt openworld.com> wrote: I'd use Herfried's method. But if you absolutely have to load the form first to check your validations, then you can use Me.Close() and/or Application.Ex it() to abandon loading.
Good point! Thank you!
Bruce This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Christophe Halatek |
last post by:
Hi NG,
sometimes I bekome a "Server Application Error" on my w2k Server when call a
ASP page
The server has reached the maximum recovery limit for the application during
the processing of your request. Please contact your Administrator
The only thing to do is to restart the server... :-(
|
by: Karuppasamy |
last post by:
Hi
I am trying to use the Logging Module provided by Microsoft Application Blocks for .Net .
I installed everything as per the Instructions given in the 'Development Using the Logging Block'.
But when i am trying to run the sample, i am getting the following error in the Event Viwer.
Kindly help me on this.
|
by: carmen |
last post by:
I need to launch application-2 from application-1 and close application-1.
My code is
CreateProcess ("app2",0,0,0,0,0,0,0,0,0);
Application.Exit();
but application-1 is not terminate since I see its name in the "Start" line.
Any ideas? Thank you.
|
by: Chetna Joshi |
last post by:
We have created a Web Application in ASP.NET using VB.NET. We have also
created a Web Setup Project for installing the Web application on the target
machine. I need help on creating a shortcut to the first page of the
application in the target machine's program menu. I have tried using "User's
Program Menu". But there is no option to open a web page (start page of the
application) using the "User's Program Menu". Does anyone know a solution...
|
by: Nusret Bajric |
last post by:
Hello,
I have a problem with starting a COM application from my ASP.NET application
on
the server machine. I get an error with a message permission denied during
creation of COM object.
If I start an application alone (without call through another COM DLL), it
does nothing (no process activity).
The application starts without problems from normal desktop application.
| |
by: jack |
last post by:
I am getting this error on my web server runnint ASP.NET on Windows 2003, it
kills the serving web pages. The only way to get the web pages to start
serving is to restart the server. I can't find what is causing this.
Any Help would be great!!!
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1012
|
by: Mr. B |
last post by:
VB.net 2003 (standard)
In my application, within FORM1_LOAD, I check for various things (ie valide
user names, files, etc.). What I want to do is upon an event such as "No
Valide User Name Found" to pop up a warning message about the event and then
close the application.
I can do everything I want with the exception of a clean shut down during the
Form1_Load.
|
by: Russ Green |
last post by:
I am currently developing an application in VB.NET that uses the Microstation's object model via COM Interop.
I have a problem regarding multiple instances of the Microstation application (ustation.exe) and calling the COM object in multiple forms in my application.
The Microstation Application object is demnsioned in Common.mod
Public oMSTN As MicroStationDGN.Application
My application is entered in StartUp.mod and there is a...
|
by: Simon Verona |
last post by:
I'm looking to build a "kiosk" style of application in vb.net (using
winforms)...
Writing the application itself is no problem.
What I want to do though is have the PC set so that the application runs
automatically on system startup - is completely modal - no alt-tab's
allowed. I don't want to have the start button or even want the "explorer"
item running at all. I want my application to be the only thing running.
|
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...
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |