| View previous topic :: View next topic |
| Author |
Message |
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: Apr 11th, 2004 06:59 PM Post subject: |
|
|
i have an owner form and an owned form. i want the owned form to stick to the bottom-right corner of the owner form
a regular form doesn't have a move event (only resize) and that's what the subclassing is for...
but no matter what i did i couldn't get the windows to draw together when the owner form is moved.
i tried wm_move,wm_moving,wm_enter/exitsizemove with a loop but nothing works.
the owned form is like dragged after it's owner
hope this is better:) _________________ "you should make amends with you" (Incubus) |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Apr 11th, 2004 07:21 PM Post subject: |
|
|
How about using the SetParent API? _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: Apr 12th, 2004 02:10 AM Post subject: |
|
|
make it a child window? it wouldn't work since i need it to be just outside the bottom-right corner and if it's a child window it only draws itself in the borders of his parent, no?
you know Winamp right? (who doesnt...) i want something like the way the Playlist window is dragged with the Player window in Winamp. _________________ "you should make amends with you" (Incubus) |
|
| Back to top |
|
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: Apr 12th, 2004 11:06 AM Post subject: |
|
|
your thoughts? _________________ "you should make amends with you" (Incubus) |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Apr 12th, 2004 03:07 PM Post subject: |
|
|
Something like this? _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: Apr 12th, 2004 04:05 PM Post subject: |
|
|
yup, just like that but without the little jumps...
here's your code with a little change so you can really see the jumps: _________________ "you should make amends with you" (Incubus)
Last edited by Gilad_r on Apr 12th, 2004 04:20 PM; edited 1 time in total |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Apr 12th, 2004 04:17 PM Post subject: |
|
|
So that is what you wanted? _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: Apr 12th, 2004 04:25 PM Post subject: |
|
|
have a look at the attached code above. _________________ "you should make amends with you" (Incubus) |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Apr 12th, 2004 04:52 PM Post subject: |
|
|
I dunno... With the WM_MOVE message it's better than the WM_MOVING message but still not perfect if you move the window fast...
EDIT : The MoveWindow API makes it a bit better I think but not all that much... _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: Apr 14th, 2004 04:02 AM Post subject: |
|
|
ok, i'm still working on it but this method works best so far: _________________ "you should make amends with you" (Incubus) |
|
| Back to top |
|
shivdasn Regular

Joined: 19 Jun 2005 Posts: 58 Location: India
|
Posted: Jun 20th, 2005 07:19 AM Post subject: Re: Static Controls... |
|
|
| Tsudeki wrote: | Okay maybe they aren't static..but they certainly stay in the same spot(though they do move per se...anyway)...here's what I'm having problems with..
I want to keep a control in the upper right hand corner of my program and I want it to stay there when the form is resized. I've thought of using a picture box and aligning it to the right but that may cause problems with what I need it for though I'm not going to rule out the picture box, so..any suggestions are welcome ^^;
Thanks in advance.. |
Simple. On the Resize event type the following:
control1.top = 0 'will always stick to the top.
control1.left = form1.left+form1.width-control1.width
try this. It SHUD work (tho i havnt tried it. just applied logic.)
do tell me if it works (or not) |
|
| Back to top |
|
|