I want to write a winform program to implement following behaviour when the program exits,I will write some log infomation in a log file so I write some code in Form_Closing Function,It works fine when I click X on the window.But when I shutdown the computer before I close the program,It seems Form_Closing Event is not fired,so the log information is not saved into file.I checked many articles on MSDN And Google,It all says,this event will be triggered when shutting down the computer,I also tried to handle the WM_QUERYENDSESSION message,it did not work either. Can Anyone give some suggestions and help? thanks
jdnx
Posts
-
Questions About Form Closing Event In winform -
Problem Of Sending HTML Email With JMailI have a problem of sending html email with JMail. The Oodes is like the following [CODE] IMessage oMessage = new MessageClass(); oMessage.From = xxx; oMessage.FromName = xxx; oMessage.Charset = "UTF-8"; oMessage.Subject = xxx; oMessage.AddRecipient(xxx, "", ""); oMessage.AppendHTML(xxx); oMessage.Send(xxx); [/CODE] I do not get any error message when the program runs,nor do I receive the reply from mail server about sending failure,but the mail does not reach the recipient email address. Because the program runs in my own company,the mail server is exchange 2003,it does not need smtp authentication,if I do not send html format email but ordinary text email,it works. Why is that,Does the problem lie in Code sector or Exchange server settings,Thanks!
-
C# ComboBox QuestionsDoes anybody know how to solve this problem Please Help! Thanks!!
-
C# ComboBox QuestionsThanks For Help I know I can set these properties,but I want to know how to set the properties to meet my requirements to let the combobox control's edit control part work like odinary edit control
-
C# ComboBox QuestionsI am writing a C# windows program There is a very strange problem about C# comboBox Control That is the combobox control's edit control can not deal with mouse operation itself,nor can it deal with the standard operations the edit control can do,such as cut paste copy(actually it does not have the context menu like edit control),Why is that,Is it because I do not make some right property settings in combobox control or this control actually can not deal with that ,I should do it in my own codes,Please Help Great Thanks -- modified at 21:04 Friday 31st March, 2006
-
How To Implement ADSL Dialing in Win2KHow To Implement ADSL Dialing in Win2K -------------------------------------------------------------------------------- I learned from other articles to use RASDial Function to Implement Dialing ,but it seems that It can not apply to ADSL Dialing,Is that true How Can I Implement ADSL Dialing ps: Another Question about CFtpConnection if I got a file handle from this and want to resume downloading a file but it seemed that CInternetFile's Seek Function can not succeed ,how can I implement Rusuming downloading using CFtpConnection
-
Questions About CHtmlView and A Web Browsing ProgramSelf Pushing up the problem for help,thanks
-
Questions About CHtmlView and A Web Browsing ProgramI wrote a Web Browsing Program,there are several problems I can not solve,so please help,thanks a lot Here is my program's picture(sorry that the language is in Chinese,but it has nothing to do with my questions) http://pic.lyglyg.com/yourpic/2005/08/05/c4db079c35bdd1843a4ad893a4016ab8.jpg[^]First ,what the black arrow points is a CComboxBox Control which is located on my CToolbar,My problem is how can I set my url address directly into the edit control of the Combobox control,It seems to me that I can only do this through 2 ways,first add the url into the listbox of combobox and select it so the url will appear in edit box ,or use clipboard to first copy url to clipboard and use combobox's paste function to add it to edit box(without add it to list box),but can I do it directly Second,can I achieve this like type in address in the edit box and press ENTER,then Show the page.It seems to me that the combobox didn't respond the Enter in edit box.Is there some ways to do that Third:the red arrow pointed is CHtmlView Class,it handles page showing well,but how can I deal with this : when I clicked an address,it will pop up a new window,what I want to do is show the address of the new window just in the origin window,Is that possible
-
Questions About CFtpFileFind ClassFirst Thank you for help Then If what you said is right,Does that mean using this method I can not deal with those files/dirs with a space in its name,No Alternative ways??
-
Questions About CFtpFileFind ClassThere is a question very confusing to me I studied from MSDN sample codes about CFtpFileFind Class and I want to show all files(including directories) in one ftp site so I use such codes like CFtpFileFind FF(...) BOOL bCont=FF.FindFile(_T("*")); if(bCont) while(FF.GetNextFile()) { //classify files or dirs and do different things; //of course when meeting dirs do recursive proc; } But the result is that it can list all files and dirs in some ftp sites but in other sites it will return some "." ".." dirs and lost some dirs. I do not know why this happens,Please help PS: When I wrote the ftp program,I called CInternetFile's GetLength Function but it can not return correct file length,also very strange,Can somebody Help,Thanks!!