backanim

  JR-FileViewer
Properties   Methods   Events
   

jrsoftlogo

            FitFilenameToSize

           

  Description:

Fits a string to a control width to view in it.

         

  ico_syntax   Syntax:

FileViewer1.FitFilenameToSize(ByVal Filename As String, ByVal ControlWidth As Long, ByVal ContainerHDC As Long) As String

 

  ico_einstellungen Adjustments:

Filename

The original path with Filename.

ControlWidth

The width of the new String in Pixels.

ContainerHDC

The HDC of the Control-Container

ico_weitere   Return value:


Returns The new String with .... to show in a control

 

  ico_einstellungen Example:

     

    'fit the actual path to the size of a label
    Label1.Caption = FileV1.FitFilenameToSize(myPathname, Label1.Width /
    Screen.TwipsPerPixelX, Me.hDC)