for example
while i<10000
doEvents
print i
i=i+1
wend
now in every loop it will leave cpu for other waiting processes on DoEvents statement, and will print i when it will get cpu again.
use GetForeGroundWindow Api to retrieve handle of active window. and use getWindowText for caption.
See this example code
Public Declare Function GetForegroundWindow Lib "user32" () As Long
Public Declare Function GetWindowText Lib "user32" Alias...
Following code will load "c:\picture.bmp" image in 1st column of 1st row of flex grid (Grd).
'Code
Grd.Row = 0
Grd.Col = 0
Set Grd.CellPicture = LoadPicture("c:\picture.bmp")
To change location of db file for specific table
rpt1.Database.Tables(1).Location = "c:\abc.mdb"
Or
Assign recordset to table, recordset can be popultated from
any datasource
e-g assume Rs as ADODB.Recordset
rpt1.Database.Tables(1).SetDataSource Rs
Here is a complete sample code for sleep function of kernel32 library .just copy and past to your new vbproject
'This project needs a button
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Me.Caption = "Your system will...
johnwm, why you post the reference of API help in this thread?I am still thinking....
for gladiator5: a code to do this.
If image1.Left + image1.Width >= image2.Left _
And image1.Left <= image2.Left + image2.Width _
And image1.Top <= image2.Top + image2.Height _
And image1.Top...
You can also use setParent API Function. using this function you can open forms in any control or form without using MDI. even in a frame or picture boxes.let me know If you have not solved the problem still, I will post the code to open forms in a main form using this API.
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.