Go Back   PPCGeeks > Windows Phones > Windows Phone Development

Notices



Reply
 
Thread Tools Display Modes
  #1  
Old 08-20-2007, 02:47 PM
sublynx's Avatar
sublynx
Lurker
Offline
 
Join Date: Aug 2007
Posts: 8
Reputation: 0
sublynx is a n00b
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
Reply With Quote
Sponsored Links
  #2  
Old 08-20-2007, 06:53 PM
Kasracer's Avatar
Kasracer
PPCGeeks Regular
Offline
 
Join Date: Aug 2007
Posts: 86
Reputation: 10
Kasracer is a n00b
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.
Reply With Quote
Reply

  PPCGeeks > Windows Phones > Windows Phone Development

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT -4. The time now is 07:28 AM.


Powered by vBulletin® ©2000 - 2010, Jelsoft Enterprises Ltd.
©2009 - PPCGeeks.com