PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Windows Mobile Development (http://forum.ppcgeeks.com/forumdisplay.php?f=9)
-   -   vb.net console application question. (http://forum.ppcgeeks.com/showthread.php?t=7411)

sublynx 08-20-2007 02:47 PM

vb.net console application question.
 
I am under the assumption that when creating an application, if you choose to use a standard application with a form, it will be closed if you choose to close all running applications or if you use the [close all] button in spb pocket plus. To get around this im trying to write a console application. My problem is im completely new to writing console applications, and am having a rough time keeping my program running. Im sure this is a newbie question, but anyone who has the simple answer please reply. Here is some sample code with all the extra procedure code cleaned out to explain what i want to do.
----------------------------------------------------------------------------------

Imports Microsoft.WindowsMobile
Imports Microsoft.WindowsMobile.Status
Imports Microsoft.WindowsMobile.PocketOutlook

Module Module1

Friend WithEvents DisplayRotation As New SystemState(SystemProperty.DisplayRotation)

Sub Main()
here i simply want to wait, untill the event DIsplayRotation is fired, which will automatically call the sub below. I just need it to wait for it.
End Sub


Sub CheckDisplayRotation(ByVal Sender As Object, ByVal Args As ChangeEventArgs) Handles DisplayRotation.Changed

End Sub
End Module

Kasracer 08-20-2007 06:53 PM

You don't want to use a console application. The reason the Windows forms app will stay open is because it's event driven and waits for the next event where as the console runs sequentially. It's hard to keep the console app open.

I would recommend using an actual Windows Forms application minus the form.

I haven't done a .Net mobile application in a while but a service, if available, could work better for you.


All times are GMT -4. The time now is 05:52 AM.

Powered by vBulletin® ©2000 - 2026, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0