·  Start ·  Programme ·  Codes ·  Tipps ·  ActiveX ·  Tutorials · 



Für dieses Beispiel benötigen Sie einen Label und einen CommandButton.

Private Declare Function PathCompactPath Lib "shlwapi" Alias _
"PathCompactPathA" (ByVal hDC As Long, ByVal lpszPath As String, _
ByVal dx As Long) As Long
 
Private Sub Command1_Click()
    Dim newHDC As Long, controlWidth As Long
    Dim SampleFile As String
 
    ' Nur ein Beispielpfad:
    SampleFile = "C:\Programme\VisualBasic\LangerOrdnerName\" & _
    "NocheinUnterordner\DasisteineBeispieldatei.txt"
 
    Me.ScaleMode = vbPixels
    controlWidth = Label1.Width - Me.DrawWidth
    newHDC = Me.hDC
 
    PathCompactPath newHDC, SampleFile, controlWidth
 
    Label1.Caption = SampleFile
 
End Sub
Aktualisiert: 12.02.2008, 14:11 Uhr Copyright © 2001 - 2010 by ST-software Navigation zurück  |  Navigation vorwärts  |  Zum Seitenanfang     
Ihre IP: 38.107.191.83 ·  Seite erstellt in: 0.694 Sekunden ·  Dateigröße:  2624 Bytes