PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > Windows Mobile Development
Register Community Search

Notices


Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-20-2007, 02:47 PM
sublynx's Avatar
Lurker
Offline
 
Join Date: Aug 2007
Posts: 8
Reputation: 0
sublynx is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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
  #2 (permalink)  
Old 08-20-2007, 06:53 PM
Kasracer's Avatar
PPCGeeks Regular
Offline
 
Join Date: Aug 2007
Posts: 86
Reputation: 10
Kasracer is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Closed Thread

  PPCGeeks > Windows Mobile > Windows Mobile Development


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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 06:10 AM.


Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com