Questions tagged [doevents]
106 questions
0
votes
1 answer
Wait after showing MDI child form - alternative to DoEvents
A co-worker made some improvements to my app, but at the same time, he changed the whole app to use MDI child forms. So where I used to be able to use ShowDialog() to make the subroutine wait until the new form closed to continue, now I can't. I…

Odin Sonnah
- 11
- 4
0
votes
0 answers
Cursor doesn't hold wait status
while scanning thru the datable I want the cursor to be a wait cursor and showing the progress of the scan
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Cursor.Current = Cursors.WaitCursor
For k = 0 To…

shemmy
- 7
- 4
0
votes
2 answers
Does using multiple DoEvents in a nested loop make any sense in Excel VBA?
I have a procedure which can run very long. Yesterday it took 14 hours to complete. This piece of code is looping over the values of a column, which holds filenames of images, and searches through an array that holds all the files including the path…

Stephan
- 463
- 2
- 7
- 22
0
votes
1 answer
VBA: Code Pauses For Varying Lengths of Time With DoEvents
I have a procedure that generates reports based on user input provided on a user-form. I have implemented error handling, as one should, but one of my error handlers is not playing well with DoEvents. The issue is that my main sub LoopGenrtReport,…

rickmanalexander
- 599
- 1
- 6
- 17
0
votes
1 answer
How to pass booleon back from Worker_ProgressChanged to Worker_DoWork
I'm using a Background worker to read values in and to pass values to Worker_ProgressChanged, to update UI.
In Worker_DoWork:
while (agi.DvmReadyToRead) // wait for digipot to be adjusted before reading in worker
{
Thread.Sleep(20);
…

chasher
- 149
- 11
0
votes
1 answer
DoEvents delay varies for timer in Word VBA
I used DoEvents to provide a 1 second delay in the VBA execution, to display the countdown in timer properly.
The code used was:
time2 = Now + TimeValue("00:00:01")
Do Until Now >= time2
DoEvents
Loop
I used the above code within another Do…

Adhiraj G Shaji
- 9
- 3
0
votes
0 answers
There must be a way to refresh the PowerPoint (2016) screen without DoEvents, GotoSlide, or .AddShape
My program constantly updates a shape's position, based on another manipulable shape. Without DoEvents, GotoSlide, .AddShape, or increasing slideshowwindow, the screen will not refresh, and will only show the end result of the shape's position. I…

Math Helper
- 21
- 4
0
votes
1 answer
Excel/VBA DoEvents and control return
I am trying to make a macro that returns at least some partial control to the user when it runs. The macro behavior cannot be changed dangerously if the user edits cells, as there is few dependent content.
I am using this method to allow the user to…

Epiquin
- 23
- 7
0
votes
1 answer
backgroundworker in infinite loop
Except doevent() is another way that, in this infinite loop run another control in form.
I wanted to do it with backgroundworker, but I failed.
private void button1_Click(object sender, EventArgs e)
{
while (true)
{
…

Mehdi_Csharp
- 9
- 1
0
votes
0 answers
Is there an equivalent doEvents() for R language
I am a web developer/SQL guy, who is tasked at providing help desk support for a gaggle of statisticians using various statistics languages which is not my forte.
I have an R stat guy who is processing a large dataset. Processing will take days. …
0
votes
2 answers
On a blocking background worker and Application.DoEvents
I am trying to cancel a background worker if its currently running, and then start another.
I tried this first, there are more checks for cancel in the functions...
private void StartWorker()
{
if (StartServerGetIP.IsBusy) {…

Azymptote
- 1
- 2
0
votes
1 answer
Too fast executions for sorting and formatting? (VBA)
I am in the end of my script formatting cells (mainly interior colors depending on cell value) and sorting the rows with regards to those cells' values.
If I run the whole script in break mode (one line at a time) it executes the procedure…

Smartskaft2
- 468
- 3
- 16
0
votes
3 answers
Make MS Access wait a long time/ trigger at a certain time (VBA)
I want to run an MS Access function only once a day at a certain time - 6 a.m. The computer (Windows 2010) runs the whole day. What is the easiest and nevertheless least ressource consuming way. E. g. I could put a loop in the VBA code of MS Access…

JuppOOOK
- 31
- 2
0
votes
1 answer
Excel VBA macro taking too long to run
I have the below code where I am trying to take one file, delete and the raw data in it and then saving it as a new file. Both the files are fairly large and close to about 100mb in size. Hence, the below part of the code where i am trying to copy…

Johnson
- 1
- 1
- 1
0
votes
0 answers
Read Serial Port with doevent vb.net
I want receive datas commands on RS232 with VB.net
Currently my code work well, but except if no data are received, the userForm can't be used, because the code is in serialport.read continuously.
How to do to allow user to access the form. I…

morbak
- 317
- 4
- 17