473,779 Members | 2,062 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do i process logoff operation

i'm using VS 2005 to make the window form authen application. there is
a logon status to make use of logoff procedure when the user click on
it. however if the user didn't click at logoff control, how do i
determine the event of the closing application to process internal
logoff procedure ???

appreciate all ideas
:)

Jun 18 '07 #1
2 1755
You can process your form's FormClosing event [1] to be informed when the
user has requested the form close by various means. You won't get this event
if the application is terminated abnormally (like an exception occured, etc.).

[1]
http://msdn2.microsoft.com/en-us/lib...ng(vs.80).aspx

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"spncc" wrote:
i'm using VS 2005 to make the window form authen application. there is
a logon status to make use of logoff procedure when the user click on
it. however if the user didn't click at logoff control, how do i
determine the event of the closing application to process internal
logoff procedure ???

appreciate all ideas
:)

Jun 18 '07 #2
On Jun 18, 9:24 am, Peter Ritchie [C# MVP] <PRS...@newsgro ups.nospam>
wrote:
You can process your form's FormClosing event [1] to be informed when the
user has requested the form close by various means. You won't get this event
if the application is terminated abnormally (like an exception occured, etc.).

[1]http://msdn2.microsoft .com/en-us/library/system.windows. forms.form.fo.. .

--
Browsehttp://connect.microso ft.com/VisualStudio/feedback/and vote.http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#

"spncc" wrote:
i'm using VS 2005 to make the window form authen application. there is
a logon status to make use of logoff procedure when the user click on
it. however if the user didn't click at logoff control, how do i
determine the event of the closing application to process internal
logoff procedure ???
appreciate all ideas
:)- Hide quoted text -

- Show quoted text -
Sorry Peter, i'm doing web application. i can't find that event in
the web page. Or can i make it up ?

Jun 18 '07 #3

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

Similar topics

2
2405
by: Spam sucks | last post by:
Hello, If somebody could help me with this one it would be very nice, the story: I need to check if a user is online or not at the moment i am doing a user logoff with javascript but this is not browser proof so it doesn't work all the time. or doing it with a for() statement that writes every 20 sec the last unix time to a database, this doesn't work because the for() statements stops executing the rest of the page so that doesn't...
1
5094
by: Arun Goel | last post by:
Hi all, I have set up rmiregistry.exe to run as service on Windows 2000 Server .. I set it up using "srvany.exe". It is running fine, but when I logoff, it stops.I did a lot of research but I am not able to find out what is the problem. I have "Interact with active desktop" unchecked. If I login after logoff, then rmiregistry is not responding though it shows the rmiregistry as "started" in "controlPanel->Admin->services". If I restart...
8
2767
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think this would be simple enough if the ASP didn't have any user input, but it does.
2
4584
by: Michael | last post by:
Hi, I was creating a trigger to fire when a user ends a session, but I see that you could have it fire on a SCHEMA event : CREATE TRIGGER "SRU"."TEST" BEFORE LOGOFF ON "SRU".SCHEMA or a DATABASE event :
4
7195
by: Kurt | last post by:
Hi I am using CDO 1.21 from C# in order to iterate through the entries in a users outlook address book (as OOM was too slow). Basically I take the Name field from each "message" and insert it into a ListBox. I shall paste my code at the end, and describe my problem first If I call my MAPI.Sessions Logoff method when I have finished using it, then this method takes between 1 and 5 minutes to execute, but after that everything is fine If...
18
4893
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE) p.stdin.write("hostname\n") however, it doesn't seem to work. I think the cmd.exe is catching it.
8
3453
by: Jm | last post by:
Hi All I have an app that when running if a user selects logoff or shutdown from the start menu, it will close itself but not logoff windows or shutdown. From what i have found so far its most likely something ive declared in my program that is preventing the logoff, i have tried closing and disposing forms and sql connections, is there anything else i should be looking for ? Or some way to step through it to find what is causing this ...
3
2277
by: =?Utf-8?B?Zmh1bnRlcg==?= | last post by:
I have a Windows Service that should pop a windows form right before logoff, for the user to enter some information. I got things working fairly well except that the user does not get to see the form before logoff. But I know that it run properly because when I log back in the form is there and works fine. So the form opened and run, but windows was already in the "logoff" screen with no desktop showing, so I missed the form. Is there any...
1
2727
by: =?Utf-8?B?ZGpjYXNlbGV5?= | last post by:
I'm trying to write a service that will sit on the domain controller (or, if this proves to be impossible, to be rolled to all connecting Windows machines). It needs to get notification of each logon and logoff, capturing username & IP address. I've currently got a test application to check the inputs & outputs and the business logic is using EventLog_OnEntryWritten to trap 538's & 540's. Unfortunately (and peculiarly) a physical logon...
0
10306
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...
1
10074
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,...
0
9930
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...
0
8961
agi2029
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...
0
6724
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();...
0
5373
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...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
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
3
2869
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.