Minimum requirements: vb
Download: source code
Screenshot:

Project: Standard EXE
Controls: Label1 (label)
Code:
Dim i As Integer 'size of space
Dim iCap As Integer 'size of caption
Private Const txt = "This is the test" 'form caption text
Private Sub Form_Load()
With Label1
.AutoSize = True
.FontName = "MS Sans Serif"
.FontBold = True
.FontSize = 8
.Caption = " "
i = .Width - 15
.Caption = txt
iCap = .Width - 15
.Visible = False
End With
End Sub
Private Sub Form_Resize()
If WindowState <> vbMinimized Then
If Width < iCap + 1300 Then Width = (iCap + 1300)
Caption = String((Width - (iCap + 1300)) / (2 * i), " ") & txt
End If
End Sub
No comments:
Post a Comment