J
Jon Slaughter
I'm tryign to display my own title bar. I've created a window without one
but with a menu. The menu though is located in the upper left corner and I
need to move it down. I need to set the client windows location but I can't
seem to get the menu to move as it always starts at the upper left of the
form. I want basically to have the form work exactly like its suppose to but
implement my own title bar. i.e., I don't want to have to position the menu
manually as this is not done when I add a title bar to the form.
But no matter what I try the menu always just ends up in the starting in the
upper left corner. I'm sure I can set the menu's location manually but I
want it to use the same feature it does when windows handles the title bar.
I guess what I'm asking is how does window create a title bar for the form
so that the menu bar or client area does not interfer with it? If I set the
client area to be something > 0 of the non-client area I still get the same
results.
i.e.
I create a class that inherits Windows.Forms.
I create a new property ClientRectangle that is suppose to override the
original so I can set it.
I then set it to be something such as (20,40,100,100). Hence the menu
should, if this worked properly, paint itself in the client area and start
at 20,40 and not 0,0
What am I doing thats wrong? I just want to get the menu's location(the
upper right corner of the menu) to give me room to paint my title bar. But I
want to do this transparently and in the same fashion that windows does it.
Thanks,
Jon
but with a menu. The menu though is located in the upper left corner and I
need to move it down. I need to set the client windows location but I can't
seem to get the menu to move as it always starts at the upper left of the
form. I want basically to have the form work exactly like its suppose to but
implement my own title bar. i.e., I don't want to have to position the menu
manually as this is not done when I add a title bar to the form.
But no matter what I try the menu always just ends up in the starting in the
upper left corner. I'm sure I can set the menu's location manually but I
want it to use the same feature it does when windows handles the title bar.
I guess what I'm asking is how does window create a title bar for the form
so that the menu bar or client area does not interfer with it? If I set the
client area to be something > 0 of the non-client area I still get the same
results.
i.e.
I create a class that inherits Windows.Forms.
I create a new property ClientRectangle that is suppose to override the
original so I can set it.
I then set it to be something such as (20,40,100,100). Hence the menu
should, if this worked properly, paint itself in the client area and start
at 20,40 and not 0,0
What am I doing thats wrong? I just want to get the menu's location(the
upper right corner of the menu) to give me room to paint my title bar. But I
want to do this transparently and in the same fashion that windows does it.
Thanks,
Jon