|
-
Feb 16th, 2000, 12:57 PM
#1
Thread Starter
Member
I'm writing a program to deal with another necessary, but very anoying program. This annoying program I DID NOT write. This annoying program is very resiliant and very well made. It has no title bar, it can't be minimized or moved off screen. I can't load it with a Shell vbHidden either. (Because I can't just run the program hidden, then close the program and reload it visible without loosing valuable data.) It isn't even run from the executing program, instead you double click on one exe, and it loads from another exe somewhere else. Now what I want to do is be able to use this program, but not have to look at it. I can't minimize it, and I can't figure out how to hide it. My last option is CAN I WRITE A PROGRAM IN WICH THIS PUNK PROGRAM LOADS INTO MY FORM? IN ESSENCE TRAPPING THIS PUNK PROGRAM INTO SOMETHING I CAN DEAL WITH!! How do I do that? Where do I start? Any other Ideas? I am stumped
-
Feb 17th, 2000, 12:26 PM
#2
Lively Member
Hi,
you'll need to use the API to do this...
(1) find out what the window is called using Spy++ (or similar)
(2) once you know it's name, you can then used FindWindowEx to get it's handle
(3) Use SetParent to set this handles parent to be the window that you want to put it into
Don't forget to set it's parent handle back again before you exit your application otherwise strange ***** happens.
hope this helps
cheers
Andy
-
Apr 22nd, 2001, 12:38 PM
#3
Hyperactive Member
I had the same problem with those ad banner programs. I simply wrote a program that captured the program using hwnd and had it placed into my own form. This worked great and allowed the program to work while I minimized it.
-
Apr 22nd, 2001, 01:04 PM
#4
PowerPoster
Originally posted by Steve Stunning
I had the same problem with those ad banner programs. I simply wrote a program that captured the program using hwnd and had it placed into my own form. This worked great and allowed the program to work while I minimized it.
That sounds like a cool app. Any chance you can wing it this way?
-
Apr 22nd, 2001, 01:06 PM
#5
Hyperactive Member
I have the window handle: 00000CD4
Now how do I use SetParent?
Thanks
-
Apr 22nd, 2001, 01:23 PM
#6
Hyperactive Member
This is the main body of the code I used that did the magic
hwnd = FindWindowLike(0, "SurfBar 1.1.2", "ThunderRT6FormDC")
If hwnd = 0 Then
RetVal = Shell("c:\program files\alladvantage.com\viewbar\viewbar.exe", 1)
End If
Do
hwnd = FindWindowLike(0, "AllAdvantage.com", "*32770")
Loop Until hwnd <> 0
If hwnd <> 0 Then
MoveWindow hwnd, 1, 1, 199, 62, True
MoveWindow hwnd, 1, 1, 1299, 82, True
SetParent hwnd, Form1.hwnd
Loop
-
Apr 22nd, 2001, 02:35 PM
#7
Addicted Member
How about the Module?
Yo dude, do u have the BAS file (module) for that app?
-
Apr 22nd, 2001, 02:48 PM
#8
Addicted Member
Last edited by smashtheqube; Jan 11th, 2019 at 01:38 AM.
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
|