SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
This sample illustrates SftDirectory and SftPrintPreview/OCX to print and preview file/folder listings.
The source code is located at C:\Program Files (x86)\Softelvdm\SftDirectory 3.5\Samples\VB6\PrintPreview\Form1.frm or C:\Program Files\Softelvdm\SftDirectory 3.5\Samples\VB6\PrintPreview\Form1.frm (on 32-bit Windows versions).
Option Explicit Private Sub AppExit_Click() End End Sub Private Sub Form_Resize() SftPrintPreview1.Move 0, 0, ScaleWidth, ScaleHeight SftDirectory1.Move 0, 0, ScaleWidth, ScaleHeight End Sub Private Sub Form_Load() ' Connect the directory control to the print preview control SftPrintPreview1.ContentProvider = SftDirectory1.Window ' display directory Form1.Show Form1.SetFocus ViewDirectory_Click SftPrintPreview1.ZoomFactor = 100 End Sub Private Sub ViewDirectory_Click() ' Show the SftDirectory control SftDirectory1.Visible = True SftDirectory1.Enabled = True SftDirectory1.SetFocus ' Disable & hide the print preview control SftPrintPreview1.Visible = False SftPrintPreview1.Enabled = False End Sub Private Sub Preview_Click() ' Disable & hide the SftDirectory control SftDirectory1.Visible = False SftDirectory1.Enabled = False ' Show the print preview control SftPrintPreview1.Enabled = True SftPrintPreview1.Visible = True SftPrintPreview1.SetFocus ' In case the SftDirectory control changed, we have to reformat everything SftPrintPreview1.Restart restartSftPrintPreviewComplete End Sub Private Sub SftPrintPreview1_PageSetupWanted() SftPrintPreview1.PageSetup 0 End Sub Private Sub SftPrintPreview1_HelpWanted(ByVal HelpName As String) MsgBox ("Sorry, this sample doesn't offer a help file") End Sub Private Sub SftPrintPreview1_CloseWanted() ViewDirectory_Click End Sub