Questions tagged [doevents]

106 questions
2
votes
1 answer

How do I do a Do Event timer in vba excel while still being able to change values in my worksheet?

I have a timer I am actively running through a DoEvents function. The problem is that every thirty secs I want to manually put some temperature values in my worksheet. However, if I do that while the event is running I get: Run-time error '1004':…
2
votes
2 answers

JavaScript page update while a script is running

I have a web page that does a lot of calculations as part of it's loading. I want to display a spinner bar while the page is "thinking" so that the end user knows the delay is to be expected. The way I was going to do this is to display a GIF file…
2
votes
1 answer

What are the benefits to using DoEvents over Repaint on a userform in VBA?

What are the benefits to using DoEvents over Repaint on a userform in VBA? Is it due to performance, for minimising the annoyance of things such as screen flicker, or for when you need to update more than just the form? Looking for some…
Anonymous Type
  • 3,051
  • 2
  • 27
  • 45
2
votes
1 answer

VB6 Winsock multiple TCP connections > problems with DoEvents

I made a software couple years ago using VB6 that works as a TCP server, receives multiple connections from clients. The basic Idea of the software is to listen on a specific port, accept connections from different clients and pass each connection…
2
votes
1 answer

how to make form update while function is working

I have a function that attempt to connect to a server and post information about the progress and result. but i just found out that while my function is working the application will "freeze" and since the whole connecting thing might take a while…
Soorena Aban
  • 710
  • 2
  • 10
  • 18
2
votes
0 answers

Alternative to Application.DoEvents in console application to make Forms.WebBrowser load javascripts

I'm using System.Windows.Forms.WebBrowser in console application to render a web page then invoke scripts on it. To render the web page, I use Application.DoEvents to load and execute scripts. However sometime the app hangs on calling…
2
votes
3 answers

Allow Excel to execute actions while application.Speech.Speak is active

I have a code that acts as a countdown timer(up to three timers on one sheet), and several actions occur while the timer is active. Everything is working fine right now. When any of the timers hit 0 the following snippet of code is run: If…
Dimitri M
  • 106
  • 1
  • 1
  • 9
2
votes
1 answer

VB6 viewing message queue

I work on a very old VB6 application which is still our companies main project. I had never worked in Visual Basic much less VB6 before starting on this project. I have run into alot of places that have doevents to keep the form responsive and the…
Max Young
  • 1,522
  • 1
  • 16
  • 42
2
votes
1 answer

Is DoEvents() also evil in FormClosing?

On a different question I suggested to use private void Form1_FormClosing(object sender, FormClosingEventArgs e) { while (processingLock) Application.DoEvents(); } in the FormClosing event (with processingLock becoming false immediately…
2
votes
1 answer

Page does not contain definition for BeginInvoke

I am new to coding and for one of my first projects I have to read information from a digital caliper and display it in a text box on a web application. I found code from another project some else created where they are using a windows form. I am…
2
votes
3 answers

DoEvents vs anything else --> for long COM operation

I have a WPF program where my model need to load a "Out-of-Proc" (.exe) COM component in order to achieve some validations when a user make an action on the UI. I'd like to inform the user that a long action will take place to let him know that the…
Eric Ouellet
  • 10,996
  • 11
  • 84
  • 119
2
votes
5 answers

Do Legacy VB6 Timer Ticks stack or skip if previous tick is still running

We have a (very) Legacy application written in VB6 (15 years old?). The application contains a timer with 300ms interval. The Sub called when the timer ticks executes a batch of code that talks to some SQL servers, prints some labels and so on. When…
HeavenCore
  • 7,533
  • 6
  • 47
  • 62
2
votes
2 answers

What's the proper way to wait for a .NET thread to start up?

I was reading the following on Microsoft's website within their threading tutorial: http://msdn.microsoft.com/en-us/library/aa645740(v=vs.71).aspx MSDN suggests using the following to wait for a thread to become alive: while (!oThread.IsAlive); Is…
gonzobrains
  • 7,856
  • 14
  • 81
  • 132
2
votes
1 answer

Progress Dialog hangs in Outlook add-in using DoEvents

Background: I am using a simple progress dialog in an Outlook Add-in to show progress while performing long operations. Since I cannot run code that uses Outlook objects in a separate thread, I cannot implement a more traditional background worker…
NetGeni59
  • 56
  • 4
1
vote
2 answers

WPF textbox does not react to input while in DoEvents loop

For some reason my program needs to pause in a function, while still reacting to user input. This is currently done using DoEvents in a loop. Unfortunately my textbox does not work properly while I am in the DoEvents loop. I cannot type in it. It…
Margarita
  • 11
  • 1