|
by: ZoombyWoof |
last post by:
Hi.
I'm pretty new to C# so this may seem like the dumbest question
today, but I'm stuck.
I have a small application, one Form that opens a connection to
a database in its constructor. If the connection goes wrong I
display a messagebox and I want the application to end after the user
clicks OK.
I cant make that happen.....
If I use Application.Exit in my constructor the form still lives,
if I do a this.dispose the program crashes and...
|
by: Chuck |
last post by:
Hello everybody,
I need to abort execution during start up, while the constructor called by
Application.Run is executing.
If the database fails to connect during my application's startup I want to
display a message (no problem here) and then abort the program. However,
after the attached code executes I end up with my main form and a wait
cursor! If I click on the X the form closes. Boss doesn't think an
unhandled exception will...
|
by: orekin |
last post by:
Hi There
I have been trying to come to grips with Application.Run(),
Application.Exit() and the Message Pump and I would really appreciate
some feedback on the following questions .. There are quite a few
words in this post but the questions are actually quite similar and
should be fairly quick to answer ...
(1) What is Happening with the Threads
|
by: Ioannis Vranos |
last post by:
I am currently reading a chapter involving multithreading, and some sample code calls
Environment::Exit() to terminate the application with all threads.
What is the difference from Application::Exit()? Does Application::Exit() terminate only
the main thread and background threads, and not the foreground threads?
|
by: Dan Keeley |
last post by:
Hi,
I have some code which needs to do close down the application
and i'm trying to fire it in the catch of a try.
However it doesnt work. The application does not exit!
Any ideas?
Thanks,
|
|
by: Bob Day |
last post by:
Using VS 2003, VB.net...
I am confused about the Application.Exit method, where the help states "This
method does not force the application to exit." Aside from the naming
confusion, how do I force the application to exit? See **** below for my
comments/questions in a simple example.
****In Sub Main, the Application.Exit works as expected, other sub main code
is ignored, and when the end sub is reached the application shuts down....
|
by: vul |
last post by:
I start the application with Application.Run(New MDIMain) in Sub Main.
MDIMain is the mdi form which loads and then calls Login form.
I'm using Application.Exit to terminate my VB 2005 application on Login
screen if user clicks on Cancel button.
When I do this I get a sound as MessageBox produces. I do not see any
messages, but VB environment works abnormally after that. It doesn't switch
modules until I minimize it and maximize again or...
|
by: JIM.H. |
last post by:
Here is the code I am having problem:
static void Main(string args)
{
bool isPar = false;
if ((args.Length == 1)) {
if ((args(0).ToUpper() == "MYPAR")) {
isPar = true;
|
by: =?Utf-8?B?VGFvZ2U=?= |
last post by:
Hi All,
When I use applcation.exit() in winForm application, the form closed, but
the process is still going!! ( The debug process is still running if debug in
VS IDE). Environment.Exit(0) works fine. But how to do in such following
scenario: if I need to give 2 option for user,1. Quit 2. Restart. In Quit
option, I use Environment.Exit(0) to confirm the process will be stopped. In
Restart option, I can't use Environment.Exit(0) , because...
|
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...
|
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: 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: 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: 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: 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: 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...
|