Put this declare statement in a module, you will then be able to call sleep in any forms code.
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'example 5 second wait
Call Sleep(5000)
Have you tried using the member access operator "!"?
rstCus.MoveFirst
For loops = 1 to rstCus.recordcount
IF rstCus!LastName = mlname AND rst!FirstName = mfname THEN
... do something ...
rstCus.MoveNext
END IF
Next loops
The MSFlexGrid component has an AddItem method. For example: create a form with a MSFlexGrid and a command button. Put the below code in the buttons click event.
Private Sub Command1_Click()
Dim x As Integer
For x = 1 To 10
MSFlexGrid1.AddItem (x)
Next x
End Sub
This should add a...
I have a form that contains a command button and a ListView control. I want the ListView to receive a down arrow when the user clicks on the command button. Any ideas?
As far as I know compiling VB source code is a one way ticket. There are decompiliers that can take an exe and generate assembly from it. But, after VB compiles an exe the information that would be needed to regenerate the source code simply no longer exists.
I hope somebody can prove me...
There are a couple of ways you can do this. You can simply use the filecopy command and give it any path/filename you want. To restore it you can again use the filecopy command. Or, you can use the compact database method of the database engine as follows:
Private Sub cmdBackup_Click()...
If you want your timer to do something say at 5 minutes you can do something like this:
1) create a global variable (ie. DIM TimeToAct As int) and set its value to 0.
2) put a timer on the form and set the timer event at 60000 mS. AKA 1 minute.
3) In the timer event:
TimetoAct = TimeToAct +...
Yes. I assume that you are using VB with an Access MDB file. If you create the MDB file in Access 2000, use the database utilities to save it as prior Access version. Use a data control and in the Connect property of the data control specify "Access" not "Access 2000"...
I have written a progran that displays a DirListBox and a FileListBox so the user can select files. Hidden files can be displayed by simply setting the Hidden property of the FileListBox to true. The DirListBox does not have a hidden property. Is there a way to get the DirListBox to show...
I have written a program that uses plgblt (parallagram block tranfer) to rotate the picture in an image control. It works OK under Windows 2000 but the W98 API does not support it. Does anyone know of a W98 equivalent?
Asside from the obvious answer of using a bigger disk, LS120 or Zip100/250, you might consider using PKZip or WinZip. The command line pkzip program has an option for spanning multiple disks. From within Vb you could use the shell statement to use it.
When a form is loaded the resize event fires. Use code in the resize event handler to set the height and width properties of the grid. Also make the border style of the form resizeable.
Private Sub Form_Resize()
'set error trap to prevent dragging of mouse above or to the left of...
The Windows Explorer should be in the Windows folder. The Windows folder may not be "C:\Windows". You can use the environ funtion to return the windows folder:
MsgBox (Environ("windir"))
I have found it easy to run a program that resides on another machine but, I take it that you want to tell the other machine to run a program. If the other machine is running a telnet server you can do something like the below.
First: Generate a command script using whatever telnet package you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.