Click here to Skip to main content
15,894,825 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionVB.Net 2005 - Displaying Forms In LandScape format - Sourabh Das - Urgent Pin
Dot Net Jantu4-Sep-09 22:11
Dot Net Jantu4-Sep-09 22:11 
AnswerRe: VB.Net 2005 - Displaying Forms In LandScape format - Sourabh Das - Urgent Pin
Richard MacCutchan4-Sep-09 23:28
mveRichard MacCutchan4-Sep-09 23:28 
GeneralRe: VB.Net 2005 - Displaying Forms In LandScape format - Sourabh Das - Urgent Pin
Dot Net Jantu5-Sep-09 0:47
Dot Net Jantu5-Sep-09 0:47 
GeneralRe: VB.Net 2005 - Displaying Forms In LandScape format - Sourabh Das - Urgent Pin
Richard MacCutchan5-Sep-09 3:43
mveRichard MacCutchan5-Sep-09 3:43 
Questioni want to play that movie client computer.but i don't know how to play those incoming bytes runtime. Pin
aemindia_r4-Sep-09 19:46
aemindia_r4-Sep-09 19:46 
Questionstore date to database Pin
mahendravarman n3-Sep-09 15:12
mahendravarman n3-Sep-09 15:12 
AnswerRe: store date to database Pin
Aman Bhullar3-Sep-09 19:17
Aman Bhullar3-Sep-09 19:17 
QuestionWake Up PDA with CeRunAppAtTime Pin
Simon Ashford2-Sep-09 10:33
Simon Ashford2-Sep-09 10:33 
I have wrote an app in vb to run at 30 min intervals on a HTC 6500 with WM6.

I have used the CeRunAppAtTime function to close the app and reopen in 30 mins time, this works fine up until the device goes into suspend mode. However once you press the power button it runs the app (even though the time has passed).

I have tried SetSystemPowerState to turn back on if in suspend mode, e.g.

SetSystemPowerState(Nothing, POWER_STATE_ON, POWER_FORCE)

However I'm struggling to understand where i need to call the SetSystemPowerState in my code (as shown below). Any help with this would be much appreciated as its driving me bonkers!!!



Source Code:

Dim FullAppName As String = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase

Dim AppPathOnly As String = System.IO.Path.GetDirectoryName(FullAppName)

Dim NewDate As Date

Dim wakeuptime As SYSTEMTIME

Public Structure SYSTEMTIME

Dim wYear As Short

Dim wMonth As Short

Dim wDayOfWeek As Short

Dim wDay As Short

Dim wHour As Short

Dim wMinute As Short

Dim wSecond As Short

Dim wMilliseconds As Short

End Structure

Private Sub scheduleapp()

NewDate = Now

'take the current time and date and add some hours, minutes, and seconds

NewDate = DateAdd(DateInterval.Hour, 0, NewDate)

NewDate = DateAdd(DateInterval.Minute, 30, NewDate)

NewDate = DateAdd(DateInterval.Second, 0, NewDate)

'populate systemtime structure with our new date

With wakeuptime

.wDay = NewDate.Day

.wDayOfWeek = NewDate.DayOfWeek

.wHour = NewDate.Hour

.wMilliseconds = NewDate.Millisecond

.wMinute = NewDate.Minute

.wMonth = NewDate.Month

.wSecond = NewDate.Second

.wYear = NewDate.Year

End With

If CeRunAppAtTime(FullAppName, wakeuptime) Then

MessageBox.Show("Set to wakeup in 30 mins")

Me.Timer1.Interval = txtSetTimedWakeUp.Text

Me.Timer1.Enabled = True

Application.Exit()

Else

MessageBox.Show("Call to CeRunAppAtTime failed")

End If

End Sub

Private Sub cancelschedule()

'Make a call to cancel the scheduled app

Dim cancelapp As Boolean = CeRunAppAtTime(FullAppName, Nothing)

End Sub
QuestionRegexp for date? Pin
Michael Pauli2-Sep-09 9:34
Michael Pauli2-Sep-09 9:34 
AnswerRe: Regexp for date? Pin
Michael Pauli2-Sep-09 9:46
Michael Pauli2-Sep-09 9:46 
AnswerRe: Regexp for date? Pin
annathor2-Sep-09 20:39
annathor2-Sep-09 20:39 
GeneralRe: Regexp for date? Pin
Michael Pauli2-Sep-09 21:00
Michael Pauli2-Sep-09 21:00 
AnswerRe: Regexp for date? Pin
Gideon Engelberth3-Sep-09 2:51
Gideon Engelberth3-Sep-09 2:51 
GeneralRe: Regexp for date? Pin
Michael Pauli3-Sep-09 3:32
Michael Pauli3-Sep-09 3:32 
AnswerRe: Regexp for date? Pin
Pete O'Hanlon3-Sep-09 4:23
mvePete O'Hanlon3-Sep-09 4:23 
Questionconnection string error Pin
vishal lele2-Sep-09 1:54
vishal lele2-Sep-09 1:54 
AnswerRe: connection string error Pin
Eddy Vluggen2-Sep-09 3:21
professionalEddy Vluggen2-Sep-09 3:21 
QuestionCannot start a .NET assembly after password change Pin
A. Delcroix2-Sep-09 1:27
A. Delcroix2-Sep-09 1:27 
QuestionError 1053: The service did not respond to the start or control request in a timely fashion. Pin
khayyam221-Sep-09 20:25
khayyam221-Sep-09 20:25 
AnswerRe: Error 1053: The service did not respond to the start or control request in a timely fashion. Pin
Aman Bhullar1-Sep-09 20:31
Aman Bhullar1-Sep-09 20:31 
GeneralRe: Error 1053: The service did not respond to the start or control request in a timely fashion. Pin
khayyam221-Sep-09 20:35
khayyam221-Sep-09 20:35 
GeneralRe: Error 1053: The service did not respond to the start or control request in a timely fashion. Pin
khayyam221-Sep-09 21:11
khayyam221-Sep-09 21:11 
GeneralRe: Error 1053: The service did not respond to the start or control request in a timely fashion. Pin
khayyam221-Sep-09 21:12
khayyam221-Sep-09 21:12 
Questionchange label text at runtime Pin
rashid20091-Sep-09 19:55
rashid20091-Sep-09 19:55 
AnswerRe: change label text at runtime Pin
Aman Bhullar1-Sep-09 20:34
Aman Bhullar1-Sep-09 20:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.