Library code snippets
Shorten a Source File
By Nick Avery, published on 14 Jul 2001
Shorten a Sorce File
This makes a lable named labPicture shorten its file locations useing "...".
Private Sub labPicture_Change()
Dim Xstr As String
labPicture.AutoSize = True
If labPicture.Width >= 4050 Then
Xstr = Right(labPicture.Caption, Len(labPicture.Caption) - 3)
If Left(Xstr, 3) = "..." Then
Xstr = Right(Xstr, Len(Xstr) - 4)
End If
Do Until Left(Xstr, 1) = ""
Xstr = Right(Xstr, Len(Xstr) - 1)
Loop
labPicture.Caption = Left(labPicture.Caption, 3) & "..." & Xstr
End If
ListView1.Picture = LoadPicture(labPicture.Tag)
End Sub
Related articles
Related discussion
-
Run-time error '91'
by converter2009 (1 replies)
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
This thread is for discussions of Shorten a Source File.