|
-
Jun 20th, 2000, 01:33 PM
#1
Thread Starter
Member
I was wonder if anyone knew how to make a foreign window always have focus.....I mean always Active but I could still open other foreign windows and that window still should be active.
-
Jun 20th, 2000, 06:45 PM
#2
Hi!
I don't understand exactly what you mean but try this
Code:
'declarations
Private Const HWND_TOPMOST = -1
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const SWP_FRAMECHANGED = &H20 ' The frame changed: send WM_NCCALCSIZE
Private Const SWP_DRAWFRAME = SWP_FRAMECHANGED
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
'in function
Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE Or SWP_DRAWFRAME)
This makes the specified window (in this case me - me.hwnd) always stay on top.
______________
regards,
da_bob
-
Jun 21st, 2000, 01:42 AM
#3
Thread Starter
Member
What I mean is, you know how you're working with this browser right now?? It's active because you can tell by the title bar by the color is is. Lets say you open a program, the brower will become inactive because the color will change to that light grey color. Now I'm wondering if there's a way to make that program always be active, even if I open and work with another program.
-
Jun 21st, 2000, 02:32 AM
#4
transcendental analytic
No, AFAIk, windows system can only have one window active at a time. If you want a window active all the time you could use setforegroundwindow api frequently but i'm sure that the "working with other application" part is not going to work.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 21st, 2000, 06:04 AM
#5
Yes, you cannot have two Active Windows, however, I believe you can have a window which will always be in the Foreground.
-
Jun 21st, 2000, 06:15 AM
#6
transcendental analytic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 21st, 2000, 06:18 AM
#7
Say for example you have a program running. You can also have another program running in the Foreground.
-
Jun 21st, 2000, 06:26 AM
#8
transcendental analytic
What? I mean that "two active windows" part.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 21st, 2000, 06:48 AM
#9
Yes that's right. You can have a Foregound Window that's Inactive but not two Active Windows.
-
Jun 21st, 2000, 06:55 AM
#10
transcendental analytic
No, not that, the Foreground Window IS the Active Window. A Window on top may be on top of that window but it's not the foreground window
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 21st, 2000, 06:57 AM
#11
Addicted Member
You can make a fake title bar with the same color of the system title bar, just an idea
-
Jun 21st, 2000, 07:09 AM
#12
transcendental analytic
WHAT?=! Why didn't I think about that, that's damn cleaver Mih_Flyer! LOL, We programmers should all think like you
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 22nd, 2003, 10:34 PM
#13
New Member
Hello!
I have a question here.
I have one VB program and another non-VB application (exe app) opened. My VB program is my active program. When I click a certain button, I want my non-VB program (which is not minimized and it is standing behind the active program) to be on top of the VB program (to indicate to the user that he/she must now work with the (non-VB program now).
So, how can I do that? I try looking for command setBackGround in VB but there is none. So, is there any other way?
Appreciate if someone could help. Thanks in advanced
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
|