| Dart Home | PowerTCP WebServer for ActiveX | Custom Development | Reply | PowerTCP WebServer for ActiveX Topics | Forums |
| Author | Forum: PowerTCP WebServer for ActiveX Topic: VB6 - responding and stopping in same request |
| johnfagan From: london, United Kingdom Posts: 2 Member Since: 06/01/06 |
posted June 1, 2006 6:20 AM Hi all - I want to send a request to my app to close it, and also get it to respond via http before shutdown. However, if i close the app after i send the page response, but within the webserver_get routine i dont get a response (see code below). any help is much appreciated. thanks, john. Private Sub WebServer1_Get(ByVal Session As DartWebServerCtl.ISession, ByVal Request As DartWebServerCtl.IRequest, ByVal Response As DartWebServerCtl.IResponse) Dim page As New DartStream Response.Header.Add httpContentType, "text/plain", True page.Write "Closing app" Response.Status = httpOK Response.Body = page WebServer1.Stop Unload Me End Sub Private Sub Form_Load() WebServer1.RootDirectory = "c:\Temp\" WebServer1.Start 666, -1 End Sub |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 1, 2006 6:26 AM Add a Timer that is initially disabled and has an interval of 500. Instead of Unloading in the Get event, enable the Timer and put the Unload code in the Timer event. |
| johnfagan From: london, United Kingdom Posts: 2 Member Since: 06/01/06 |
posted June 1, 2006 6:46 AM Tony - you the man, i should have thought of that! many thanks. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 1, 2006 7:54 AM No problem! |
| Reply | PowerTCP WebServer for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|