Rojohn » 20.07.2005 (Ср) 10:22
Sub Me_Resize()
Dim valLen As Long
On Error Resume Next
lblUserName.Move Me.ScaleWidth - lblUserName.Width - cmdExitMe.Height * 0.5, 0
lblUser.Move lblUserName.Left - lblUser.Width - cmdExitMe.Height * 0.5, lblUserName.Height * 0.1
PicSave.Move Me.ScaleWidth * 0.5 - PicSave.Width * 0.5, lblUserName.Height
PicNSave.Move PicSave.Left, PicSave.Top
lblValSave.Move Me.ScaleWidth * 0.5 - lblValSave.Width * 0.5, lblUserName.Height + PicSave.Height
cmdExitMe.Move Me.ScaleWidth - cmdExitMe.Height * 0.5 - cmdExitMe.Width, Me.ScaleHeight - cmdExitMe.Height * 2.5
cmdSaveGROVD.Move cmdExitMe.Left - cmdSaveGROVD.Width - cmdExitMe.Height, cmdExitMe.Top
FrameGROVD.Move cmdExitMe.Height * 0.5, lblValSave.Top + lblValSave.Height, Me.ScaleWidth - cmdExitMe.Height, Me.ScaleHeight - lblUserName.Height - PicSave.Height - cmdExitMe.Height * 4.5
Select Case valSxem
Case 1
valLen = (FrameGROVD.Height - cbRayon.Height * 4 - txtTitle.Height * 2) / 8
lblRegion.Move cmdExitMe.Height, valLen * 2
lblRayon.Move cmdExitMe.Height, lblRegion.Top + lblRegion.Height + valLen
lblMR.Move cmdExitMe.Height, lblRayon.Top + lblRayon.Height + valLen
lblTitle.Move cmdExitMe.Height, lblMR.Top + lblMR.Height + valLen
lblAdr.Move cmdExitMe.Height, lblTitle.Top + lblTitle.Height + valLen
lblPhone.Move cmdExitMe.Height, lblAdr.Top + lblAdr.Height + valLen
Case 2
valLen = (FrameGROVD.Height - cbRayon.Height * 4 - txtTitle.Height * 2) / 8
lblRegion.Move cmdExitMe.Height, valLen * 2
lblRayon.Move cmdExitMe.Height, lblRegion.Top + lblRegion.Height + valLen
lblNasPun.Move cmdExitMe.Height, lblRayon.Top + lblRayon.Height + valLen
lblTitle.Move cmdExitMe.Height, lblNasPun.Top + lblNasPun.Height + valLen
lblAdr.Move cmdExitMe.Height, lblTitle.Top + lblTitle.Height + valLen
lblPhone.Move cmdExitMe.Height, lblAdr.Top + lblAdr.Height + valLen
Case 3
' MaxWidth = lblMR.Width
valLen = (FrameGROVD.Height - cbRayon.Height * 5 - txtTitle.Height * 2) / 9
lblRegion.Move cmdExitMe.Height, valLen * 2
txtRegion.Move cmdExitMe.Height * 1.5 + lblMR.Width, valLen * 2, Me.ScaleWidth - lblMR.Width - cmdExitMe.Height * 3
lblRayon.Move cmdExitMe.Height, lblRegion.Top + lblRegion.Height + valLen, txtRegion.Width
cbRayon.Move cmdExitMe.Height * 1.5 + lblMR.Width, lblRayon.Top, txtRegion.Width * 0.6
cbRayon1.Move cmdExitMe.Height * 1.5 + lblMR.Width + cbRayon.Width, cbRayon.Top, txtRegion.Width * 0.4
lblNasPun.Move cmdExitMe.Height, lblRayon.Top + lblRayon.Height + valLen
cbNasPun.Move cmdExitMe.Height * 1.5 + lblMR.Width, lblNasPun.Top, cbRayon.Width
cbNasPun1.Move cmdExitMe.Height * 1.5 + lblMR.Width + cbNasPun.Width, cbNasPun.Top, cbRayon1.Width
lblMR.Move cmdExitMe.Height, lblNasPun.Top + lblNasPun.Height + valLen
cbMR.Move cmdExitMe.Height * 1.5 + lblMR.Width, lblMR.Top, cbNasPun.Width
cbMR1.Move cmdExitMe.Height * 1.5 + lblMR.Width + cbMR.Width, lblMR.Top, cbNasPun1.Width
lblTitle.Move cmdExitMe.Height, lblMR.Top + lblMR.Height + valLen
txtTitle.Move cmdExitMe.Height * 1.5 + lblMR.Width, lblTitle.Top, txtRegion.Width
lblAdr.Move cmdExitMe.Height, lblTitle.Top + lblTitle.Height + valLen
txtAdr.Move cmdExitMe.Height * 1.5 + lblMR.Width, lblAdr.Top, txtTitle.Width
lblPhone.Move cmdExitMe.Height, lblAdr.Top + lblAdr.Height + valLen
txtPhone.Move cmdExitMe.Height * 1.5 + lblMR.Width, lblPhone.Top, txtAdr.Width
Case 4
valLen = (FrameGROVD.Height - cbRayon.Height * 4 - txtTitle.Height * 2) / 8
lblRegion.Move cmdExitMe.Height, valLen * 2
lblRayon.Move cmdExitMe.Height, lblRegion.Top + lblRegion.Height + valLen
lblNasPun.Move cmdExitMe.Height, lblRayon.Top + lblRayon.Height + valLen
lblTitle.Move cmdExitMe.Height, lblNasPun.Top + lblNasPun.Height + valLen
lblAdr.Move cmdExitMe.Height, lblTitle.Top + lblTitle.Height + valLen
lblPhone.Move cmdExitMe.Height, lblAdr.Top + lblAdr.Height + valLen
End Select
End Sub
Sub FormResize()
Me_Resize
End Sub
Из Case почти доделан только 3.