CenterCaption




CenterCaption ("Questa e' la Caption")

Sub CenterCaption(text)
Form1.ScaleMode = 4
textwid = TextWidth(text)
forwid = Form1.ScaleWidth
half = forwid / 2
center = Int(half - (textwid / 2))
Rem Adds the required amount of blank spaces

For lop = 1 To half + (center / 2)
a = a + " "
Next lop

Form1.Caption = a & text
Form1.ScaleMode = 1
End Sub Copiare il codice su General > sezione Dichiarazioni,
e sul form_load type










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