|
-
Oct 20th, 2007, 07:14 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Timer control
Maybe someone can tell me for which control library file belong Timer ?
-
Oct 20th, 2007, 07:18 PM
#2
-
Oct 20th, 2007, 07:28 PM
#3
Re: Timer control
 Originally Posted by Lauriux1
Maybe someone can tell me for which control library file belong Timer ? 
Timer is one of the intrisic controls (also there is a built-in Timer function) so what difference would it make to know the library name?
-
Oct 20th, 2007, 07:31 PM
#4
Thread Starter
Hyperactive Member
Re: Timer control
I guess that Msvbvm60.dll is not defoult Windows XP file ? I'm right ?
-
Oct 20th, 2007, 07:57 PM
#5
Re: Timer control
 Originally Posted by Lauriux1
I guess that Msvbvm60.dll is not defoult Windows XP file ? I'm right ? 
No, but it is a default VB6 file that should have gotten installed when you installed the software. Did you install VB6 from a legal, manufacturer's disc?
-
Oct 20th, 2007, 08:25 PM
#6
Re: Timer control
 Originally Posted by Lauriux1
I guess that Msvbvm60.dll is not defoult Windows XP file ? I'm right ? 
According to MS VB runtime files are distributed with every post Win98 OS.
However, it might not come with developer's license so as Hack said if you want to develop in VB (any version) you must install it from legal media.
-
Oct 21st, 2007, 07:15 AM
#7
Thread Starter
Hyperactive Member
Re: Timer control
Yes I know that!
I just want to know is there a big chance that people who will use my program will get an error like "Missing Msvbvm60.dll"
Or Msvbvm60.dll file is in all Windows XP by defoult???
-
Oct 21st, 2007, 07:23 AM
#8
Re: Timer control
It should be included in the setup and installation package that you create when you roll your app out.
-
Oct 21st, 2007, 11:39 AM
#9
Thread Starter
Hyperactive Member
Re: Timer control
Maybe someone can recommend an good code based timer (short code) ?
-
Oct 21st, 2007, 12:19 PM
#10
Re: Timer control
See post #41 here, but as Hack suggested you really should create an installation package. You are only asking for trouble otherwise. Is there some reason you don't want to create an installation package?
-
Oct 21st, 2007, 01:06 PM
#11
Thread Starter
Hyperactive Member
Re: Timer control
 Originally Posted by MartinLiss
See post #41
Post #14 not #41
 Originally Posted by MartinLiss
Is there some reason you don't want to create an installation package?
Yes I can put Msvbvm60.dll to resources of my program but I already have MSCOMCTL.OCX, TABCTL32.OCX, COMDLG32.OCX there and I don't want make it more heavy than it is now.
 Originally Posted by MartinLiss
You are only asking for trouble otherwise.
I just want to make an delay function and for some reasons I don't want use Sleep API, that’s why I need a timer.
But if someone have some ideas how to make an delay function without timer then please post this ideas here.
-
Oct 21st, 2007, 01:12 PM
#12
Re: Timer control
Code:
Dim dClock As Double
dClock = Timer
While Timer < dclock + 1 ' "Wait" 1 second
DoEvents
Wend
-
Oct 21st, 2007, 01:32 PM
#13
Thread Starter
Hyperactive Member
Re: Timer control
Thanks MartinLiss
But what is fundamental difference between:
Code:
Dim dClock As Double
dClock = Timer
While Timer < dclock + 1 ' "Wait" 1 second
DoEvents
Wend
and
Code:
Dim Start As Long
Start = Timer
Do While Timer < Start + 1 ' "Wait" 1 second
DoEvents
Loop
-
Oct 21st, 2007, 01:36 PM
#14
Re: Timer control
Using a Long rather than a Double limits you to whole numbers. In other words this wouldn't do what you wanted.
Code:
Dim Start As Long
Start = Timer
Do While Timer < Start + .5 ' "Wait" .5 second
DoEvents
Loop
I should say however that Do/Loop is better then While/Wend.
-
Oct 21st, 2007, 01:49 PM
#15
Thread Starter
Hyperactive Member
-
Oct 21st, 2007, 01:51 PM
#16
Re: Timer control
To mark a thread resolved, click on Thread Tools, and click the 'Mark Thread Resolved' menu item.
-
Oct 21st, 2007, 02:02 PM
#17
Re: Timer control
Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
· dwMilliseconds
Specifies the time, in milliseconds, for which to suspend execution. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. A value of INFINITE causes an infinite delay.
______________________________________________________________________
Declare Function SleepEx Lib "kernel32" Alias "SleepEx" (ByVal dwMilliseconds As Long, ByVal bAlertable As Long) As Long
· dwMilliseconds
Specifies the time, in milliseconds, that the delay is to occur. A value of zero causes the function to return immediately. A value of INFINITE causes an infinite delay.
· bAlertable
Specifies whether the function may terminate early due to an I/O completion callback function or an APC. If bAlertable is FALSE, the function does not return until the time-out period has elapsed. If an I/O completion callback occurs, the function does not return and the I/O completion function is not executed. If an APC is queued to the thread, the function does not return and the APC function is not executed.
If bAlertable is TRUE and the thread that called this function is the same thread that called the extended I/O function (ReadFileEx or WriteFileEx), the function returns when either the time-out period has elapsed or when an I/O completion callback function occurs. If an I/O completion callback occurs, the I/O completion function is called. If an APC is queued to the thread (QueueUserAPC), the function returns when either the timer-out period has elapsed or when the APC function is called.
-
Oct 21st, 2007, 03:09 PM
#18
Re: Timer control
 Originally Posted by Lauriux1
Yes I can put Msvbvm60.dll to resources of my program but I already have MSCOMCTL.OCX, TABCTL32.OCX, COMDLG32.OCX there and I don't want make it more heavy than it is now.
All VB6 applications require MSVBVM60.DLL to run! It's one of the foundation files for the VB run-time, without it your application will simply not run.
-
Oct 21st, 2007, 08:40 PM
#19
Re: [RESOLVED] Timer control
Please before you go off in the wrong direction please read Installation Problems You will need more than just that file for your app to run.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|