Questions tagged [doevents]

106 questions
0
votes
6 answers

.net 2010 calling DoEvents (yes I want to) from inside a custom control library

I have a custom control's library. Now there's a control which looks like a panel, and when it opens up I want to animate its vertical growing like this: For h As Single = 0 To finalHeight Step 0.5 Me.Height = CInt(h) ' HERE I WANT TO CALL…
vulkanino
  • 9,074
  • 7
  • 44
  • 71
0
votes
1 answer

VBA DoEvents() in Access or an alternative

I am reading about options that will allow me to run a macro without locking down my session of Access until it is done running. I have some VBA macros for Access that execute SQL SELECT and UPDATE statements and can take almost an hour to run. This…
cjones
  • 8,384
  • 17
  • 81
  • 175
0
votes
1 answer

Interface Controls for DoEvent in Excel

I have a macro to loop through a range and return emails to .Display based on the DoEvents element within my module. I iterate that: row_number = 1 'And Do DoEvents row_number = row_number +1 'Then a bunch of formatting requirements Loop Until…
user3794203
  • 205
  • 2
  • 7
  • 23
0
votes
2 answers

Application.DoEvents Never Exits

I'm working on a legacy application which has sprinklings of Application.DoEvents here and there. I'm fully aware that this is frowned upon due to re-entrancy issues, but re-factoring isn't currently an option. An issue has started to occur where…
Paul Green
  • 19
  • 4
0
votes
3 answers

Avoid Application.DoEvents() in C#

A lot of good programmers (including a lot of good members of Stackoverflow) are against using Application.DoEvents() whatever the circumstances are. Actually it is even supported with plenty of articles in the net, like this one, this famous debate…
chouaib
  • 2,763
  • 5
  • 20
  • 35
0
votes
2 answers

Timer - alternative implementation to DoEvents

I am new to C#, and I needed to use a timer for a small application that I use for monitoring a piece of hardware. I found some reference code for timer, but it uses DoEvents(). Since, I run the timer for a long time, sometimes days and hours, I…
The Vivandiere
  • 3,059
  • 3
  • 28
  • 50
0
votes
3 answers

Threading makes Windows form unresponsive anyway, yet people boycott DoEvents(). How to agree those things?

Don't use DoEvents(). Use threads! That mantra is roaming around the internet including SO. Okey so I created a short proof of concept where I tried to use only Threads. So basically what button should do is trigger moving the blue box downwards. It…
Mike
  • 842
  • 1
  • 9
  • 31
0
votes
0 answers

Do Events causing exception how to trace

I have a code where Application.DoEvents is causing problems and throwing exceptions. When a modal popup is opened and application has to wait for user activity , this code is written to execute in a loop to process background tasks until user's…
0
votes
1 answer

Alternative to calling Application.DoEvents() in a loop needed

The c# code below is by no means ideal and I'm really just looking for advice and suggestions as to how I could best refactor this and make the code safer. Basically there is a class variable that stores the security check stage value (initialised…
Jack
  • 33
  • 1
  • 8
0
votes
2 answers

How to use DoEvents in QTP 11?

I am trying to use DoEvents in my QTP script - but getting error - Type mismatch: 'DoEvents' Below is my script: Const STILL_ACTIVE = &H103 Const PROCESS_QUERY_INFORMATION = &H400 Const SYNCHRONIZE = &H100000 Extern.Declare micHwnd, "CloseHandle",…
Krishna
  • 27
  • 1
  • 1
  • 9
0
votes
2 answers

Form hanging while running listbox query

My form is hanging for several seconds every time the user goes to a new record. The recordset for a listbox on the form is a query. The form is hanging until that query finishes and the listbox is populated. My users need to be able to scroll…
likearock83
  • 31
  • 1
  • 5
0
votes
1 answer

How do I avoid the dreaded Application.DoEvents() when multithreading

So I've been reading a lot of articles that have been discouraging the use of Application.DoEvents() and even saying that it should never be used but I can't seem to find a good alternative for my scenario... The application that I am working on…
RobPio
  • 137
  • 8
0
votes
2 answers

Application.DoEvents Takes long time

i have s Sub() like this, to download HTML page using GeckoWebBrowser wb1 = Nothing wb1 = New Gecko.GeckoWebBrowser wb1.Navigate(v_url) totalticks = 0 loadtimer.Start() Do If m_stop = True Then Exit Do If wb1.IsBusy =…
user2280232
  • 155
  • 2
  • 8
0
votes
2 answers

Using the Application.DoEvents()

I am facing a problem that Application.DoEvents() can solve. The problem is that WebBrowser suppose to navigate to a url asnychronously but it does't, and when I use Application.DoEvents() it solves that, I think this happens because the application…
Matan Givoni
  • 1,080
  • 12
  • 34
-1
votes
1 answer

DoEvents() hanging

How do I delete this question? I originally thought that the issue was related to DoEvents, but as it turns out, it is not. I have reposted the question here: http://goo.gl/VpAEK with a more appropriate description of the problem. Thanks - I…
eejai42
  • 736
  • 2
  • 12
  • 24