Results 1 to 8 of 8

Thread: stumped on this one PUNK program ! ! !

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    IL
    Posts
    39

    Post

    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

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Location
    North Yorkshire
    Posts
    102

    Post

    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

  3. #3
    Hyperactive Member Steve Stunning's Avatar
    Join Date
    Jul 1999
    Location
    Fairfax, Virginia
    Posts
    314
    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.
    Steve Stunning

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    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?

  5. #5
    Hyperactive Member TiPeRa's Avatar
    Join Date
    Apr 2001
    Location
    In between
    Posts
    464
    I have the window handle: 00000CD4
    Now how do I use SetParent?

    Thanks

  6. #6
    Hyperactive Member Steve Stunning's Avatar
    Join Date
    Jul 1999
    Location
    Fairfax, Virginia
    Posts
    314
    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
    Steve Stunning

  7. #7
    Addicted Member
    Join Date
    Oct 2000
    Posts
    137

    Question How about the Module?

    Yo dude, do u have the BAS file (module) for that app?

  8. #8
    Addicted Member
    Join Date
    Feb 2001
    Posts
    253
    ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    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
  •  



Click Here to Expand Forum to Full Width