| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
vb.net timer_elapsed launch form
|
Original Message
|
Name: n22p
Date: March 31, 2005 at 07:29:05 Pacific
Subject: vb.net timer_elapsed launch formOS: win 2000CPU/Ram: 256 |
Comment: Hey I'm new to .NET and am working VB.NET... I have an application that that run from a module so the first form that would be seen is hidden in the system tray. There is a timer that when elapsed checks for a the existance of a file. When that file is found I would like to pop a form. The form pops fine on interval when the file is found but then once displayed seems to freeze up, i can still click the system tray icon for the first frame, nothing on the second messForm (message form) All messageboxes seen below are aids in seeing whats going on they all display correctly. Here is some code. Any ideas would be helpful! Public Sub Timer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer.Elapsed Try If File.Exists(fullpath) Then popMessageForm() End If Catch obEx As Exception Throw obEx End Try End Sub Public Sub popMessageForm() dim messForm As New messageForm MsgBox("popmessageForm start") messForm.Visible = True messForm.Focus() MsgBox("before show") messForm.Show() messForm.Activate() messForm.BringToFront() messForm.Main() MsgBox("end popmessage") End Sub Thanks for any help!
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: n22p
Date: March 31, 2005 at 07:42:59 Pacific
|
Reply: (edit)i failed to mention before that the popmessage() sub routine works in other areas of the project ::ex:: Sub Main() ...foo popMessageForm() ...bar End Sub ::works like i would like... something im missing about the timers.timer? thanks
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: n22p
Date: April 1, 2005 at 07:49:07 Pacific
|
Reply: (edit)Solution found! timer was as system.timers.timer not a System.Windows.Forms.Timer using a system.windows.forms.timer_tick instead of system.timers.timer_elapsed event for a pop made the form not freeze. Thanks for the help.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home