Results 1 to 4 of 4

Thread: Remove a Processe's MainWindow Titlebar

  1. #1

    Thread Starter
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551

    Remove a Processe's MainWindow Titlebar

    Hello,

    I'm working with launching external processes and putting them into containers inside my program. I've got this part working (albeit reluctantly with the SetParent API)...

    Anyways, now i'd like to do a few things to the window... Keep in mind, i didn't make this program... I'd like to accomplish 2 things actually... The first is to Remove the top titlebar of the window. I think there is some kind of API to do this... I don't mind using the API if there is no other way, but regardless, i wouldn't know which API to use for this...

    And secondly, I'd like to be able to disable/hide a button on the form... how would i do this?

    Again, i realize these things may and probably will require me to use some api's.. i'm fine with that if there is no .NET equivalent way to do it... i do have the window's handle that i want to remove the titlebar/captionbar/whatever you want to call it from...

    thanks for the help!

  2. #2
    Lively Member
    Join Date
    Sep 2002
    Posts
    100
    I think in pre-.net you would use the SendMessage API so I search for an equivalent.

    Mitchel

  3. #3
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    To add a button to another window you can simply create it and then call SetParent() on it with the other windows handle as the parent. You'll probably also want to set its position and visibility.
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Use SetWindowLongPtr to play with the window styles and extended window styles.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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