start position of child form
-
How do i set the start position of the childform that i open from my main form? I dont' want it to be in the center of the parent form or FormStartPosition.CenterParent. i want it to be set at 218,28 of the parent form :-D :laugh: ;p :^) :sigh:
-
How do i set the start position of the childform that i open from my main form? I dont' want it to be in the center of the parent form or FormStartPosition.CenterParent. i want it to be set at 218,28 of the parent form :-D :laugh: ;p :^) :sigh:
You need to set it manually, which means you need to set it AFTER you show the form. Otherwise, the framework moves it on you. So, you need to get the position of the parent form top and left, and add 218,28 to it Christian Graus - Microsoft MVP - C++
-
You need to set it manually, which means you need to set it AFTER you show the form. Otherwise, the framework moves it on you. So, you need to get the position of the parent form top and left, and add 218,28 to it Christian Graus - Microsoft MVP - C++
Right,got that, but how do i refrence that to the parent form? would it help if i better explain? i've got my parent form set to load at the same point based on where you closed it. the problem i'm having is trying to refrence the location of 218,28 of the parent form, since the form isn't allways going to be located at 0,0, it maybe located on screen two or three of a multi-screen system, and the user has to move across to system.drawing.point(218,28) just to reach the new form... not sure, maybe i'm just missing your point...no punn intended pretty much i've tried everthing i can think of(yes, very limited) and the most i've found to even come close was this.PointToClient. this was nice, it moved the new form in relation to the parent form, but the problem is it often disappears based on the parent form...basically it didn't work correctly ever. :-D :laugh: ;p :^) :sigh:
-
Right,got that, but how do i refrence that to the parent form? would it help if i better explain? i've got my parent form set to load at the same point based on where you closed it. the problem i'm having is trying to refrence the location of 218,28 of the parent form, since the form isn't allways going to be located at 0,0, it maybe located on screen two or three of a multi-screen system, and the user has to move across to system.drawing.point(218,28) just to reach the new form... not sure, maybe i'm just missing your point...no punn intended pretty much i've tried everthing i can think of(yes, very limited) and the most i've found to even come close was this.PointToClient. this was nice, it moved the new form in relation to the parent form, but the problem is it often disappears based on the parent form...basically it didn't work correctly ever. :-D :laugh: ;p :^) :sigh:
The parent form has a Left property and a Top property. At least, I think it does :-) I'd take those, and add the values to that. And, if you set the owner of the child form to be the parent, the code can go in the child form, it can move itself when it is first shown, and check it's owners position as a starting point. Christian Graus - Microsoft MVP - C++
-
The parent form has a Left property and a Top property. At least, I think it does :-) I'd take those, and add the values to that. And, if you set the owner of the child form to be the parent, the code can go in the child form, it can move itself when it is first shown, and check it's owners position as a starting point. Christian Graus - Microsoft MVP - C++
Actually, that was one of the things that i didn't think of at the time of writing that last post, i actually had just testing that before you replied... having some difficulty as i having to make sure everything is in its proper place...oh syntax..... i'll post my results in a few...hopefully! :-D :laugh: ;p :^) :sigh:
-
Actually, that was one of the things that i didn't think of at the time of writing that last post, i actually had just testing that before you replied... having some difficulty as i having to make sure everything is in its proper place...oh syntax..... i'll post my results in a few...hopefully! :-D :laugh: ;p :^) :sigh:
hey, yah, as simple as it was, that was the solution.... why is it easier to think of the hard(or complicated) solutions before thinking of the simple ones? must just be me.... :confused: :-D :laugh: ;p :^) :sigh: