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\Visual Studio - VB.NET\PrintPreview\Form1.vb or C:\Program Files\Softelvdm\SftDirectory 3.5\Samples\Visual Studio - VB.NET\PrintPreview\Form1.vb (on 32-bit Windows versions).
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Connect the directory control to the print preview control AxSftPrintPreview1.ContentProvider = AxSftDirectory1.Window ' display directory ShowDirectory() AxSftPrintPreview1.ZoomFactor = 100 ' maximize window WindowState = FormWindowState.Maximized End Sub Private Sub ShowDirectory() ' Show the SftDirectory control AxSftDirectory1.Visible = True AxSftDirectory1.Enabled = True AxSftDirectory1.Dock = DockStyle.Fill PerformLayout() AxSftDirectory1.Focus() ' Disable & hide the print preview control AxSftPrintPreview1.Visible = False AxSftPrintPreview1.Enabled = False End Sub Private Sub ShowPreview() ' Show the print preview control AxSftPrintPreview1.Visible = True AxSftPrintPreview1.Enabled = True AxSftPrintPreview1.Dock = DockStyle.Fill PerformLayout() AxSftPrintPreview1.Focus() ' Disable & hide the SftDirectory control AxSftDirectory1.Visible = False AxSftDirectory1.Enabled = False End Sub Private Sub AxSftPrintPreview1_PageSetupWanted(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftPrintPreview1.PageSetupWanted AxSftPrintPreview1.PageSetup(0) End Sub Private Sub AxSftPrintPreview1_HelpWanted(ByVal sender As Object, ByVal e As AxSftPrintPreviewLib10._ISftPrintPreviewEvents_HelpWantedEvent) Handles AxSftPrintPreview1.HelpWanted MessageBox.Show("Sorry, this sample doesn't offer a help file") End Sub Private Sub AxSftPrintPreview1_CloseWanted(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftPrintPreview1.CloseWanted ShowDirectory() End Sub Private Sub menuExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuExit.Click Application.Exit() End Sub Private Sub menuDirectory_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuDirectory.Click ShowDirectory() End Sub Private Sub menuPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuPreview.Click ShowPreview() End Sub End Class