not easy like that...
the flexgrid is place in a separated form...
the form isn't related to the user control, this way, isn't related to the
text box..
the text box is at (0,0) , but the user control where it's placed is in
another position on the mdi child form...
so i must get the user control position to just then place the flexgrid.
scaleleft and scaletop returns 0, both...
usercontrol.extender.left / .top returns some value that is not right...
>>>> hey there...
>>>>
[quoted text clipped - 38 lines]
> FlexGrid1.Left = TextBox1.Left
> FlexGrid1.Top = TextBox1.Top + TextBox1.Height
> not easy like that...
>
[quoted text clipped - 8 lines]
> scaleleft and scaletop returns 0, both...
> usercontrol.extender.left / .top returns some value that is not right...
First, I do not think you should use a MDI-form.
Set position of any forms with below API.
If you are using childforms or forms been set with
SetParent API, SetWindowsPos API won't work
unless using the const SWP_NOZORDER.
-I found out that. Do you have the KPD-Team
API guide, then use the SetParent API as shown
in their example - if you are still using it. But
use below to set positions. When not child forms
change SWP_NOZORDER with SWP_SHOWWINDOW
or SW_SHOWNORMAL.
Course, change 0, 0, Me.ScaleWidth, Me.ScaleHeight
to suite your needs.
/senn
Const SWP_NOZORDER = &H4
Const SW_SHOWNORMAL = 1
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, _
ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As
Long, _
ByVal cy As Long, ByVal wFlags As Long)
SetWindowPos mWnd, HWND_TOPMOST , 0, 0, Me.ScaleWidth, Me.ScaleHeight,
SWP_NOZORDER