Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function PrintFormSize()
- 'Formular1
- Debug.Print "Formular1"
- Debug.Print "H " & Forms!Formular1.Form.WindowHeight
- Debug.Print "W " & Forms!Formular1.Form.WindowWidth
- Debug.Print "W2 " & Forms!Formular1.Form.Width
- Debug.Print "L " & Forms!Formular1.Form.WindowLeft
- Debug.Print "T " & Forms!Formular1.Form.WindowTop
- Debug.Print vcbcrlf
- 'ab hier beziehen sich die Masse auf auf Formular1.Window...
- 'Formular2Container
- Debug.Print "Formular2Container"
- Debug.Print "H " & Forms!Formular1.Form.Formular2Container.Height
- Debug.Print "W " & Forms!Formular1.Form.Formular2Container.Width
- Debug.Print "L " & Forms!Formular1.Form.Formular2Container.Left
- Debug.Print "T " & Forms!Formular1.Form.Formular2Container.Top
- Debug.Print vcbcrlf
- 'Formular 3 cntainer
- Debug.Print "Formular3Container"
- Debug.Print "H " & Forms!Formular1.Form.Formular2Container.Form.Formular3Container.Height
- Debug.Print "W " & Forms!Formular1.Form.Formular2Container.Form.Formular3Container.Width
- Debug.Print "L " & Forms!Formular1.Form.Formular2Container.Form.Formular3Container.Left
- Debug.Print "T " & Forms!Formular1.Form.Formular2Container.Form.Formular3Container.Top
- Debug.Print vcbcrlf
- End Function
- Public Function Resize_Forms()
- On Error Resume Next 'Ist hier erlaubt weil extreme Auflösungen zu fehlern führen können width ist integer nicht long
- Dim MainFormHeight As Integer
- Dim MainFormWidth As Integer
- Dim MainFormLeft As Integer
- Dim MainFormTop As Integer
- Dim ContainerForm2Height As Integer
- Dim ContainerForm2Width As Integer
- Dim ContainerForm2Left As Integer
- Dim ContainerForm3Height As Integer
- Dim ContainerForm3Width As Integer
- Dim ContainerForm3Left As Integer
- Dim ContainerForm3Top As Integer
- 'Formular1 Haupt Formular
- MainFormHeight = Forms!Formular1.Form.WindowHeight
- MainFormWidth = Forms!Formular1.Form.WindowWidth
- MainFormLeft = Forms!Formular1.Form.WindowLeft
- MainFormTop = Forms!Formular1.Form.WindowTop
- 'ab hier beziehen sich die Masse auf auf Formular1.Window...
- 'Formular2Container Subformular 1 in Hauptformular
- ContainerForm2Height = MainFormHeight * 0.9
- ContainerForm2Width = MainFormWidth * 0.9
- Forms!Formular1.Form.Formular2Container.Height = ContainerForm2Height
- Forms!Formular1.Form.Formular2Container.Width = ContainerForm2Width
- ContainerForm2Left = (MainFormWidth - ContainerForm2Width) / 2.5
- Forms!Formular1.Form.Formular2Container.Left = ContainerForm2Left
- Forms!Formular1.Form.Formular2Container.Top = 225
- 'Formular 3 cntainer Subformular 2 in Subformular 1
- ContainerForm3Height = ContainerForm2Height * 0.9
- ContainerForm3Width = ContainerForm2Width * 0.9
- ContainerForm3Top = Forms!Formular1.Form.Formular2Container.Top + 1200
- Forms!Formular1.Form.Formular2Container.Form.Formular3Container.Height = ContainerForm3Height - ContainerForm3Top
- Forms!Formular1.Form.Formular2Container.Form.Formular3Container.Width = ContainerForm3Width
- Forms!Formular1.Form.Formular2Container.Form.Formular3Container.Left = (ContainerForm2Width - ContainerForm3Width) / 2.5
- Forms!Formular1.Form.Formular2Container.Form.Formular3Container.Top = ContainerForm3Top
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement