473,783 Members | 2,574 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

possible Nube question about system messages - please help

Is there anyway to hold the base.WndProc(re f m) until after the Logout()
function finishes loading a webpage??

I'm working on shutting down an app that runs in the system tray, I have no
problems shutting down, but I have problems saving data first.

if the base.WndProc(re f m) is placed at the top, it closes, but the system
does not continue to shutdown and it does not save the data via the Logout()
funtion.
If the base.WndProc(re f m) is placed at the bottom, it closes correctly, but
doesn't seem to perform the Logout function, I don't believe that it is
waiting for the webpage to load.

protected override void WndProc(ref Message m)
{
//base.WndProc(re f m); ----------placed at the top position
switch(m.Msg)
{
case WM_SYSCOMMAND:

switch(m.WParam .ToInt32()){

case SC_SCREENSAVE:
Logout();
break;

case SC_MONITORPOWER :
Logout();
break;

default:
break;
}
break;

case WM_QUERYENDSESS ION:
this.flagBoolea n1 = true; //do i really want to shut down?
Logout();
break;

case WM_WTSSESSION_C HANGE:
this.flagBoolea n1 = true; //do i really want to shut down?
Logout();
break;

}
base.WndProc(re f m); // placed at the bottom position
}

the Logout() function consists of a call to a website.

my understanding of messages is not very good, and i haven't been able to
find a good way to learn about them.

Nov 17 '05 #1
0 1080

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

Similar topics

65
5394
by: perseus | last post by:
I think that everyone who told me that my question is irrelevant, in particular Mr. David White, is being absolutely ridiculous. Obviously, most of you up here behave like the owners of the C++ language. A C++ interface installation IS ABOUT THE C++ LANGUAGE! The language does not possess the ability to handle even simple file directory manipulation. Those wise people that created it did not take care of it. So, BOOST is a portable...
14
3168
by: Matt | last post by:
Any progammers looking for a killer app to develop? How about a voice enabled forum? One of the most powerful, exciting, and engrossing experiences on the Internet is the Forum. The first great Internet forums were the Usenet newsgroups. Usenet is still a powerful force, but many different types of forums are also very popular (such as message boards like Vbulliten and XMBforum). I love forums. Love em love em love em. My web site...
1
1879
by: sparks | last post by:
I have done a LOT of databases in access 97 but I am new to access 2000. We are S L O W L Y converting over. Yesterday I had a 97 database that I had to run the converter to 2000 and everything works fine. I thought this is not tooo bad so far. BUT everyone else in the co that got a copy and converted it on their system had big problems. First when they ran the database a vb code view window was open in the background. Second some of...
5
1571
by: sugaray | last post by:
Right now, the code I wrote below seems works fine, i know it's definitely not the best solution, so if there are better solutions to eschew from using goto statements to jump out of multiple loops ? and any other suggestions or good ideas that are pertain to construct a more powerful and common interactive menu system is also welcomed, and if there's any primitive but better interactive system that is written in C suitable for educational...
1
1092
by: Thoraxx | last post by:
I have been thrown in the the cSharp grinder and I'm lost, I have t connect to a web service and sent is some data, well I can connect jus fine thanks to some very busy friends. Now that I'm not getting an errors when I build the web page, I need to build dynamic array base off a connection to an orcale db. How do I make a connection to orcale, and how do I make a dynamic arra based on the sql results? "Please help OB1 your our last...
2
1426
by: Joshua Tan | last post by:
hey there, I really need some help with this. I have a web application running on Windows 2000 Server , IIS5.0 , .Net Framework 1.1 I have a file.aspx, file.aspx.cs and file.aspx.resx I tried changing some simple code in the .cs but the changes do not reflect on the webpage. Someone told me I need to recompile. Is there anywork around?
13
2552
by: Alison Givens | last post by:
....... that nobody knows the answer. I can't imagine that I am the only one that uses parameters in CR. So, my question again: I have the following problem. (VB.NET 2003 with CR) I have a report with a multiple-value discrete value and a rangevalue. The report shows fine in the viewer, but when I hit the export to pdf
9
3840
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
9
2324
by: Homer | last post by:
Hi, I've posted this question before but didn't get anywhere with it. Please help me out if you know of a solution for it. I got "InnerException: Unable to connect to remote server"..."No connection could be made because the target machine actively refused it" when I attempted to send an email through my Intranet app that is written in asp.net 2.0. The smtp server is a local server and it uses Port 25. The Authentication is set to...
0
9643
marktang
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...
0
9480
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,...
0
10147
jinu1996
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...
0
8968
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
6737
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
5379
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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
2877
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.