473,394 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Can't start timer from Visio event handler

Eli
I'm developing a Visual Basic .Net app that interacts with
Visio 2002. I have an event handler in VB to handle the
Visio "SelectionChanged" event. This event handler is
called when the event is fired. However, the handler
quits when it tries to enable my timer.

Private Sub oVisioApp_SelectionChanged(ByVal Window As
Microsoft.Office.Interop.Visio.Window) Handles
oVisioApp.SelectionChanged

Debug.WriteLine("Timer starting...") ' Prints correctly
Me.Timer1.Enabled = True ' Funtion exits, timer off
Debug.WriteLine("Timer on") ' Doesn't print!

End Sub

The first debug output is printed correctly, but the
function quits when it tries to enable the timer.

I've tried the same code in other Visio event handlers and
got the same results.

In addition to not being able to start the timer, I also
cannot dynamically add a textbox control to a panel from
this event handler. It fails in the same way that it
fails when trying to start the timer.

Me.Panel1.Controls.AddRange(New
System.Windows.Forms.Control() {tb})

Where tb is a new textbox.

Any ideas appreciated.
-Eli
Jul 21 '05 #1
0 1477

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David | last post by:
Hi There! I'm using Timer control to record how long my application perform certain tasks. However, apparently Timer control is not doing its' job (i.e. Not firing Tick event) while my...
3
by: Mr. B | last post by:
My current app has a timer that I kick ON in my Form1_Load as follows: ' Set Up the Timer Function Dim t As New System.Timers.Timer(12000) ' 1000 = 1 Second t.Enabled = True ' False to Turn OFF...
11
by: avivgur | last post by:
Hello, I have devised a console application that uses a System.Timers.Timer and its Elapsed event. The problem is that I want the program to continue to run so that each time the event is raised,...
12
by: Crirus | last post by:
Hi! I havea control that display messages... I added a timer to it Every time a noew mesaage should be displayed I do the following: Private sub ShowMsg(message as string) Me.lblStatus.Text...
0
by: Eli | last post by:
I'm developing a Visual Basic .Net app that interacts with Visio 2002. I have an event handler in VB to handle the Visio "SelectionChanged" event. This event handler is called when the event is...
3
by: ken | last post by:
Hello, I can't figure out how to solve this problem. I modified the timer example given in the help section. It increments a count every 3 millisecond in order to simulate a tank being filled with...
12
by: Marc | last post by:
Hi, How can i increase the mousehover event timer? AddHandler NewBtn.MouseHover, AddressOf Shownotes Private Sub Shownotes(ByVal sender As System.Object, ByVal e As System.EventArgs)...
16
by: Peter Oliphant | last post by:
Note that although this involves SAPI, it is more a question about Timers and event handlers. I wrote a Speech Recognize handler (SAPI), and put some code in it to enable a Timer. It would not...
5
by: shashwat_k11 | last post by:
Hi, I am writing web service and I want to read a file only once when I start the web service. How can I do that? Which event fires exactly onece when we launch web service? I am reading...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.