FitFilenameToSize
           
|
  Description:
|
|
|
|
Fits a string to a control width to view in it.
|
|
|
|
|
|
|
|
|
|
|
         
|
    Syntax:
|
|
|
|
|
FileViewer1.FitFilenameToSize(ByVal Filename As String, ByVal ControlWidth As Long, ByVal ContainerHDC As Long) As String
|
|
|
|
|
|
 
|
  Adjustments:
|
|
|
|
Filename
|
The original path with Filename.
|
|
|
ControlWidth
|
The width of the new String in Pixels.
|
|
|
ContainerHDC
|
The HDC of the Control-Container
|
|
|
|
|
|
|
  Return value:
|
|
|
|
|
Returns The new String with .... to show in a control
|
|
 
|
  Example:
|
|
|
 
'fit the actual path to the size of a label Label1.Caption = FileV1.FitFilenameToSize(myPathname, Label1.Width / Screen.TwipsPerPixelX, Me.hDC)
 
|
|
             
|