Click here to Skip to main content
15,885,896 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Help making a listbox appear when I write something Pin
Rylogy25-Oct-04 11:12
Rylogy25-Oct-04 11:12 
GeneralHelp modifying text Pin
Rylogy23-Oct-04 3:06
Rylogy23-Oct-04 3:06 
GeneralRe: Help modifying text Pin
Dennis C. Dietrich23-Oct-04 4:21
Dennis C. Dietrich23-Oct-04 4:21 
GeneralRe: Help modifying text Pin
Rylogy23-Oct-04 4:26
Rylogy23-Oct-04 4:26 
GeneralRe: Help modifying text Pin
Rylogy23-Oct-04 4:33
Rylogy23-Oct-04 4:33 
GeneralRe: Help modifying text Pin
Rylogy23-Oct-04 4:39
Rylogy23-Oct-04 4:39 
GeneralHalt Sequence Pin
Red Sunday22-Oct-04 11:28
Red Sunday22-Oct-04 11:28 
GeneralRe: Halt Sequence Pin
Dennis C. Dietrich22-Oct-04 13:01
Dennis C. Dietrich22-Oct-04 13:01 
Hi Red!

I'm trying to find a safe way to put a delay of 4 seconds in my code in VB 6.0 (NOT .NET).

First, don't use While...Wend to loop. Use a Do loop instead (see also How to Use Looping Structures in Visual Basic for Applications[^]). Second, don't use a loop at all. You can use Task-Manager to quickly find out that your loop will lead to 100% CPU usage. Use the API function Sleep instead.
Option Explicit
Public Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Integer)

Public Sub Wait()
    Sleep 4000
End Sub

You can find more about Sleep and an API function called SetWaitableTimer (which might solve your re-draw problem) in the article How To Use SetWaitableTimer With Visual Basic[^].

Best regards
Dennis
GeneralRe: Halt Sequence Pin
Fade (Amit BS)24-Oct-04 19:21
Fade (Amit BS)24-Oct-04 19:21 
GeneralDatatable copy Pin
cooldev22-Oct-04 11:27
cooldev22-Oct-04 11:27 
GeneralRESTRICTING WEBSITE ON IE Pin
MalikRizwan22-Oct-04 7:12
MalikRizwan22-Oct-04 7:12 
GeneralMath Operators Pin
Desi Bravo22-Oct-04 6:47
Desi Bravo22-Oct-04 6:47 
GeneralRe: Math Operators Pin
Colin Angus Mackay23-Oct-04 14:09
Colin Angus Mackay23-Oct-04 14:09 
GeneralRe: Math Operators Pin
Desi Bravo23-Oct-04 15:03
Desi Bravo23-Oct-04 15:03 
GeneralDisplaying photo from access Pin
stevemwangi22-Oct-04 5:22
stevemwangi22-Oct-04 5:22 
GeneralRe: Displaying photo from access Pin
mmcdonald22-Oct-04 9:05
mmcdonald22-Oct-04 9:05 
GeneralCommunication Pin
Daminda21-Oct-04 18:22
Daminda21-Oct-04 18:22 
GeneralRe: Communication Pin
Ray Cassick21-Oct-04 18:47
Ray Cassick21-Oct-04 18:47 
GeneralArrays and Converting String to Double Pin
ConfusedStudent21-Oct-04 16:08
ConfusedStudent21-Oct-04 16:08 
GeneralRe: Arrays and Converting String to Double Pin
Ray Cassick21-Oct-04 18:51
Ray Cassick21-Oct-04 18:51 
GeneralRe: Arrays and Converting String to Double Pin
ConfusedStudent24-Oct-04 13:45
ConfusedStudent24-Oct-04 13:45 
GeneralRe: Arrays and Converting String to Double Pin
Ray Cassick24-Oct-04 14:11
Ray Cassick24-Oct-04 14:11 
GeneralHelp Please - Get the source code Pin
tdaigs21-Oct-04 14:31
tdaigs21-Oct-04 14:31 
GeneralOracleClient Connection Strings Pin
sdornan21-Oct-04 10:49
sdornan21-Oct-04 10:49 
Generalworks in vb 6.0 not dot net Pin
SveFro21-Oct-04 9:57
SveFro21-Oct-04 9:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.