|
-
Jul 11th, 2000, 10:36 AM
#1
Thread Starter
Hyperactive Member
Is there anyway through a form ontop without using API.....my program limits a users time....when time is up it throughs form1 ontop...howeveri f someone is on internet explorer for example....it overlaps form1..... any suggestions?
-RaY
VB .Net 2010 (Ultimate)
-
Jul 11th, 2000, 12:21 PM
#2
When you use the word "through" (as in I walked through the park), do you really mean "throw" (as in throw the ball)?
The real question is why do you want to avoid using the APIs?
-
Jul 12th, 2000, 07:27 AM
#3
Thread Starter
Hyperactive Member
Hehe
Sorry i meant throw, i don't want to avoid using API, it's just that when I get help from you guys. Its for the newer version of VB.....Everytime theres a byval, there is either a kernerl32, user32 or something 32 and its not supported by VB 3.0, so the code is useless to me. Got what im saying? Iv'e tried dropping the 32 to just "user" it works sometimes but not all. Think you can help me? Is there sendkeys to go to IE and minimize or better yet any program on top of form1......
Quick side question, zorder wouldnt work because that just puts that form as top most in "YOUR" program, correct?
-RaY
VB .Net 2010 (Ultimate)
-
Jul 12th, 2000, 07:44 AM
#4
Hyperactive Member
Doesn't have VB3 an API viewer??
As far as I know, a lot of API's can be "downgraded" by removing the 32, and change long to integer. I'm not sure about the byval if that has to be changed (don't think so)
-
Jul 12th, 2000, 09:47 AM
#5
Quick side question, zorder wouldnt work because that just puts that form as top most in "YOUR" program, correct?
Yes, that's correct.
-
Jul 12th, 2000, 02:33 PM
#6
these are vb 2 & 3 API's
Code:
' in a module
Declare Sub SetWindowPos Lib "User" (ByVal hWnd%, ByVal hWndInsertAfter%, ByVal X%, ByVal Y%, ByVal cx%, ByVal cy%, ByVal wFlags%)
Const HWND_NOTOPMOST = -2
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Const SWP_NOACTIVATE = &H10
Const HWND_TOPMOST = -1
Sub OnTop(frm As Form, blnTF$)
If blnTF = "True" Then
SetWindowPos frm.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE
Else
SetWindowPos frm.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE
End If
End Sub
' in form_load
ontop Me, "True"
this works, I had to use strings instead of boolean, but I dont know how to declare booleans or even if they exist in vb3.
[Edited by denniswrenn on 07-12-2000 at 03:47 PM]
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
|