Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21246

Positioning Form based on Control Position from Caller Form

$
0
0
Hi, i'm making new Active X for Calendar Control.
my goal is making as same as datetimepicker control

i put command button in usercontrol that call a form that have monthview control, and i have trouble to put the form exactly at the bottom of commandbutton.
i have used

Code:

   
frmMonth.Move UserControl.Parent.Left + UserControl.Extender.Left + UserControl.Extender.Width, UserControl.Parent.Top + UserControl.Extender.Top + UserControl.Extender.Height

but it's not displayed in correct position, since the Title bar height of parent form is not calculated (cmiiw). and also i'm not considering of controls been placed inside another container (Extender) :rolleyes: :confused:

so, i guess, it's much more better if i could just get the real screen position of the usercontrol and sum it with usercontrol height


Thank you very much :wave:

i have google it, but i haven't find any solution yet :cry:

Viewing all articles
Browse latest Browse all 21246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>