Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi! How do I make a window clien 1

Status
Not open for further replies.

BaDi

Programmer
May 14, 2002
32
0
0
NL
Hi!

How do I make a window client of my application's window?

Thanx in advance!

 

Do you mean an MDI?? Like a child window??


John Stephens
 
Yeah, making the window a child-window. So it wil minimize with my app.'s window.. and stuff like that.

Any idea?
 
1.Create an MDI form in your project. You can only have one of these.
2. In each of the forms which are to be children set the MDIChild property to true.
 
Ok, this is with child windows created in VB as well.
But if I have a window of another app. eg. MSWord
I would like to make this window Client of my app's window.
 
You may also want to take a look at the SetParent API Call. It allows you to set the Parent Window of any window to another window.

Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Thanx!

But now, when I do this the external window doesn't really behave like a child window should do. It does minimize when I minimize my form.. only a fraction later. And when I maximize my form again, the external window maximizes first and then my form is placed on top. Also: the external window doesn't stay in the borders of my form.

What can I do to make it a perfect Client window?

Thanx in advance!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top