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 8247
Form.Close() ?
Sunny
In article <oo********************************@4ax.com>, Us**@NoWhere.com 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.com> 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.Exit() to abandon loading.
______________________________
The Grim Reaper
"Mr. B" <Us**@NoWhere.com> wrote in message
news:oo********************************@4ax.com... 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******@icebergwireless.com> wrote: Form.Close() ?
Sunny
??? (duh on my end)... Thanks!
Bruce
With Deft Fingers, "The Grim Reaper" <gr*********@btopenworld.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.Exit() 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...
|
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...
|
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...
|
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'.
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
| |