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 8264
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: 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: Pratik kapadia |
last post by:
when i try to load my asp pages i always have to face error .like " The
server has encountered an error while loading an application during the
processing of your request. Please refer to the event log for more
detail information. Please contact the server administrator for
assistance."
if any one knows the solution please reply me on chiky9992000@yahoo.com
*** Sent via Developersdex http://www.developersdex.com ***
|
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: 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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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: 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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |