This is a part of file selectors, and here I made a class to be used more easily.
In example is a dialog that can be zoomed, without using any window style. So we can draw anything.
The window to zoom need to fix the scale from a most used font size. Then we can expand it without loosing width/height ratio and always fixed the scale to that font size we have choose.
We can expand to the right (optional) without scale. So with one move we can scale and expand as we wish. The dialog never loose at the minimum right expansion the form basic ratio.
New example;
Last edited by georgekar; Nov 1st, 2014 at 05:24 PM.
Reason: Update the example
in Private Sub Target_MouseMove in MoverResizer class change from line 81
Code:
If (X - prevx + target.Left < Screen.Width - 300) And (Y - prevy + target.Top < Screen.Height - 300) Then
If (target.Top + (Y - prevy) < 0) Then prevy = Y + target.Top
If (target.Left + (X - prevx) < 0) Then prevx = X + target.Left
target.Move X - prevx + target.Left, Y - prevy + target.Top
End If
so now we don't have a right jump to the dialog when we push it to the left side of screen.
Last edited by georgekar; Nov 1st, 2014 at 02:50 PM.
Reason: now is good