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 crazyidane (0 replies)
-
Problem handling Redirects with MSXML2.XMLHTTP
by brandoncampbell (2 replies)
-
vbinputbox pauses code while it waits on response. How can I reproduce that?
by brandoncampbell (1 replies)
-
Sending SMS in VB 6
by sirobnole (6 replies)
-
Comboxbox listindex in ActiveX Control
by brandoncampbell (1 replies)
This thread is for discussions of Shorten a Source File.