Controlli - Scrive left, height, top, width






Dim Obj As Object
Dim Index As String

Screen.MousePointer = 11
Open App.Path & "\ListaOggetti.txt" For Output As #1
On Error Resume Next

Print #1, "me.Height = " & Me.Height
Print #1, "me.Left = " & Me.Left
Print #1, "me.top = " & Me.Top
Print #1, "me.Width = " & Me.Width




For Each Obj In Me
' If TypeOf Obj Is TextBox Then

If Obj.Index <> 0 Then
Index = "(" & Obj.Index & ")"
Else
Index = ""
End If

If Err.Number <> 0 Then
Index = ""
Err.Clear
End If



Print #1, Obj.Name & Index & ".Height = " & Obj.Height
Print #1, Obj.Name & Index & ".Left = " & Obj.Left
Print #1, Obj.Name & Index & ".top = " & Obj.Top
Print #1, Obj.Name & Index & ".Width = " & Obj.Width


' End If

Next
Close #1

shell "Notepad.exe " & App.Path & "\ListaOggetti.txt", vbMaximizedFocus










( controlliscriveleftheighttopwidth.html )- by Paolo Puglisi - Modifica del 17/12/2023