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 - CSharp\PrintPreview\Form1.cs or C:\Program Files\Softelvdm\SftDirectory 3.5\Samples\Visual Studio - CSharp\PrintPreview\Form1.cs (on 32-bit Windows versions).
private void Form1_Load(object sender, System.EventArgs e) { // Connect the directory control to the print preview control axSftPrintPreview1.ContentProvider = axSftDirectory1.Window; // display directory ShowDirectory(); axSftPrintPreview1.ZoomFactor = 100; // maximize window WindowState = FormWindowState.Maximized; } private void 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; } private void 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; } private void axSftPrintPreview1_PageSetupWanted(object sender, System.EventArgs e) { axSftPrintPreview1.PageSetup(0); } private void axSftPrintPreview1_HelpWanted(object sender, AxSftPrintPreviewLib10._ISftPrintPreviewEvents_HelpWantedEvent e) { MessageBox.Show("Sorry, this sample doesn't offer a help file"); } private void axSftPrintPreview1_CloseWanted(object sender, System.EventArgs e) { ShowDirectory(); } private void menuExit_Click(object sender, System.EventArgs e) { Application.Exit(); } private void menuDirectory_Click(object sender, System.EventArgs e) { ShowDirectory(); } private void menuPreview_Click(object sender, System.EventArgs e) { ShowPreview(); }