This section provides different options to upgrade other controls that are common in VB6 applications and that don’t fit in any of the other sections.
As with the previous options, all these components have two alternatives when upgrading them to .NET, one is to upgrade using COM Interop and the second one is to use .NET components.
1. Accusoft
1.1. To Accusoft .NET Version
General Description:
This solution converts the Accusoft VB6 library to the Accusoft.NET component.
Class
Maps to
AccusoftISISXpress7.ISISXpress
Accusoft.ISISXpressSdk.IsisXpress
AccusoftISISXpress7.ISX_SaveFileType
Accusoft.ISISXpressSdk.FileTypeInfo
AccusoftISISXpress7.ISX_ScanSetting
Accusoft.ISISXpressSdk.ScanSettingInfo
AccusoftISISXpress7.ISX_SetupOptions
Accusoft.ISISXpressSdk.SetupOptions
AccusoftImagXpress13.ImagXpress
Accusoft.ImagXpressSdk.ImageXView
AccusoftImagXpress13.enumAutoSize
Accusoft.ImagXpressSdk.AutoResizeType
AccusoftImagXpress13.enumZoomFit
Accusoft.ImagXpressSdk.ZoomToFitType
Original VB6 code:
Begin AccusoftImagXpress13Ctl.ImagXpress ImagXpress1 ...EndBegin AccusoftISISXpress7Ctl.ISISXpress ISISXpress1 ...EndPrivate Sub Command2_Click() Me.ISISXpress1.CreateDib =True Me.ISISXpress1.CreateFiles =True Dim driver AsString Dim scanner AsString Dim r AsString r = Me.ISISXpress1.Root Me.ISISXpress1.Cancel Me.ISISXpress1.Cancel True Me.ISISXpress1.Cancel False Me.ISISXpress1.CancelImmediateEnd SubPrivate Sub Form_Load() Me.ImagXpress1.FileName ="Tulips.jpg" Me.ImagXpress1.ZoomFactor =1 Me.ImagXpress1.ZoomToFit ZOOMFIT_BEST Me.ImagXpress1.DrawTextString 100,100,"This is a sample",0 Dim n AsInteger n = ImagXpress1.PageNbr MsgBox n n = ImagXpress1.Pages MsgBox n ImagXpress1.AutoSize = ISIZE_BestFit MsgBox ImagXpress1.FileName ImagXpress1.SaveFileEnd SubPrivate Sub ISISXpress1_FeederEmpty(ByVal PageNumber As Long, StopScan AsBoolean) MsgBox PageNumberEnd Sub
C# code:
publicAccusoft.ImagXpressSdk.ImageXView ImagXpress1;publicAccusoft.ImagXpressSdk.ImagXpress ImagXpress1_Component;publicAccusoft.ISISXpressSdk.IsisXpress ISISXpress1;...this.ImagXpress1=newAccusoft.ImagXpressSdk.ImageXView();this.ImagXpress1_Component=newAccusoft.ImagXpressSdk.ImagXpress();this.ISISXpress1=newAccusoft.ISISXpressSdk.IsisXpress();...privatevoidCommand2_Click(Object eventSender,EventArgs eventArgs){this.ISISXpress1.Output.CreateDib=true;this.ISISXpress1.Output.CreateFiles=true;string driver ="";string scanner ="";string r =this.ISISXpress1.Output.Root;this.ISISXpress1.Scanner.Cancel();this.ISISXpress1.Scanner.Cancel(true);this.ISISXpress1.Scanner.Cancel(false);this.ISISXpress1.Scanner.Cancel(true);}//UPGRADE_WARNING: (2080) Form_Load event was upgraded to Form_Load method and has a new behavior. private void Form_Load()
{this.ImagXpress1.Image=Accusoft.ImagXpressSdk.ImageX.FromFile(ImagXpress1_Component,"Tulips.jpg");this.ImagXpress1.ZoomFactor=1;this.ImagXpress1.ZoomToFit(Accusoft.ImagXpressSdk.ZoomToFitType.FitBest);Graphics graphics =this.ImagXpress1.Image.GetGraphics(); graphics.DrawString("This is a sample", new Font(SystemFonts.DefaultFont.Name, SystemFonts.DefaultFont.Size), new SolidBrush(Color.Black), 100, 100);
this.ImagXpress1.Image.ReleaseGraphics(true);int n =ImagXpress1.Image.Page;MessageBox.Show(n.ToString(),AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly())); n =ImagXpress1.Image.PageCount;MessageBox.Show(n.ToString(),AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly()));ImagXpress1.AutoResize=Accusoft.ImagXpressSdk.AutoResizeType.BestFit; MessageBox.Show(ImagXpress1.Image.Filename, AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly()));
//UPGRADE_ISSUE: (2064) AccusoftImagXpress13.ImagXpress method ImagXpress1.SaveFile was not upgraded.ImagXpress1.SaveFile();}privatevoidISISXpress1_FeederEmpty(object eventSender,Accusoft.ISISXpressSdk.FeederEmptyEventArgs eventArgs){int PageNumber =eventArgs.PageNumber;bool StopScan =eventArgs.StopScan;MessageBox.Show(PageNumber.ToString(),AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly()));}
VB.NET code:
Public WithEvents ImagXpress1 As Accusoft.ImagXpressSdk.ImageXViewPublic WithEvents ImagXpress1_Component As Accusoft.ImagXpressSdk.ImagXpressPublic WithEvents ISISXpress1 As Accusoft.ISISXpressSdk.IsisXpress...Me.ImagXpress1 =NewAccusoft.ImagXpressSdk.ImageXView()Me.ImagXpress1_Component =NewAccusoft.ImagXpressSdk.ImagXpress()Me.ISISXpress1 =NewAccusoft.ISISXpressSdk.IsisXpress()...Private Sub Command2_Click(ByVal eventSender AsObject, ByVal eventArgs As EventArgs) Handles Command2.Click Me.ISISXpress1.Output.CreateDib =True Me.ISISXpress1.Output.CreateFiles =True Dim driver AsString="", scanner AsString="" Dim r AsString= Me.ISISXpress1.Output.Root Me.ISISXpress1.Scanner.Cancel() Me.ISISXpress1.Scanner.Cancel(True) Me.ISISXpress1.Scanner.Cancel(False) Me.ISISXpress1.Scanner.Cancel(True)End Sub'UPGRADE_WARNING: (2080) Form_Load event was upgraded to Form_Load method and has a new behavior.'Private Sub Form_Load() Me.ImagXpress1.Image = Accusoft.ImagXpressSdk.ImageX.FromFile(ImagXpress1_Component,"Tulips.jpg") Me.ImagXpress1.ZoomFactor =1 Me.ImagXpress1.ZoomToFit(Accusoft.ImagXpressSdk.ZoomToFitType.FitBest) Dim graphics As Graphics = Me.ImagXpress1.Image.GetGraphics() graphics.DrawString("This is a sample", New Font(SystemFonts.DefaultFont.Name, SystemFonts.DefaultFont.Size), New SolidBrush(Color.Black), 100, 100)
Me.ImagXpress1.Image.ReleaseGraphics(True) Dim n AsInteger= ImagXpress1.Image.Page MessageBox.Show(CStr(n), My.Application.Info.Title) n = ImagXpress1.Image.PageCount MessageBox.Show(CStr(n), My.Application.Info.Title) ImagXpress1.AutoResize = Accusoft.ImagXpressSdk.AutoResizeType.BestFit MessageBox.Show(ImagXpress1.Image.Filename, My.Application.Info.Title)'UPGRADE_ISSUE: (2064) AccusoftImagXpress13.ImagXpress method ImagXpress1.SaveFile was not upgraded.' ImagXpress1.SaveFile()End SubPrivate Sub ISISXpress1_FeederEmpty(ByVal eventSender As object, ByVal eventArgs As Accusoft.ISISXpressSdk.FeederEmptyEventArgs) Handles ISISXpress1.FeederEmpty
Dim PageNumber AsInteger= eventArgs.PageNumber Dim StopScan AsBoolean= eventArgs.StopScan MessageBox.Show(CStr(PageNumber), My.Application.Info.Title)End Sub
1.2. To COM Interop
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
Begin AccusoftImagXpress13Ctl.ImagXpress ImagXpress1 ...EndBegin AccusoftISISXpress7Ctl.ISISXpress ISISXpress1 ...EndPrivate Sub Command2_Click() Me.ISISXpress1.CreateDib =True Me.ISISXpress1.CreateFiles =True Dim driver AsString Dim scanner AsString Dim r AsString r = Me.ISISXpress1.Root Me.ISISXpress1.Cancel Me.ISISXpress1.Cancel True Me.ISISXpress1.Cancel False Me.ISISXpress1.CancelImmediateEnd SubPrivate Sub Form_Load() Me.ImagXpress1.FileName ="Tulips.jpg" Me.ImagXpress1.ZoomFactor =1 Me.ImagXpress1.ZoomToFit ZOOMFIT_BEST Me.ImagXpress1.DrawTextString 100,100,"This is a sample",0 Dim n AsInteger n = ImagXpress1.PageNbr MsgBox n n = ImagXpress1.Pages MsgBox n ImagXpress1.AutoSize = ISIZE_BestFit MsgBox ImagXpress1.FileName ImagXpress1.SaveFileEnd SubPrivate Sub ISISXpress1_FeederEmpty(ByVal PageNumber As Long, StopScan AsBoolean) MsgBox PageNumberEnd Sub
C# code:
publicAxAccusoftImagXpress13.AxImagXpress ImagXpress1;publicAxAccusoftISISXpress7.AxISISXpress ISISXpress1;...this.ImagXpress1=newAxAccusoftImagXpress13.AxImagXpress();this.ISISXpress1=newAxAccusoftISISXpress7.AxISISXpress();...privatevoidCommand2_Click(Object eventSender,EventArgs eventArgs){this.ISISXpress1.CreateDib=true;this.ISISXpress1.CreateFiles=true;string driver ="";string scanner ="";string r =this.ISISXpress1.Root; //UPGRADE_ISSUE: (2064) AccusoftISISXpress7.ISISXpress method ISISXpress1.Cancel was not upgraded.this.ISISXpress1.Cancel(true); //UPGRADE_ISSUE: (2064) AccusoftISISXpress7.ISISXpress method ISISXpress1.Cancel was not upgraded.this.ISISXpress1.Cancel(true); //UPGRADE_ISSUE: (2064) AccusoftISISXpress7.ISISXpress method ISISXpress1.Cancel was not upgraded.this.ISISXpress1.Cancel(false);this.ISISXpress1.CancelImmediate();}//UPGRADE_WARNING: (2080) Form_Load event was upgraded to Form_Load method and has a new behavior. private void Form_Load()
{this.ImagXpress1.FileName="Tulips.jpg";this.ImagXpress1.ZoomFactor=1;this.ImagXpress1.ZoomToFit(AccusoftImagXpress13.enumZoomFit.ZOOMFIT_BEST);this.ImagXpress1.DrawTextString(100,100,"This is a sample",Convert.ToUInt32(0));int n =ImagXpress1.PageNbr;MessageBox.Show(n.ToString(),AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly())); n =ImagXpress1.Pages;MessageBox.Show(n.ToString(),AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly()));ImagXpress1.CtlAutoSize=AccusoftImagXpress13.enumAutoSize.ISIZE_BestFit;MessageBox.Show(ImagXpress1.FileName,AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly()));ImagXpress1.SaveFile();}private void ISISXpress1_FeederEmpty(Object eventSender, AxAccusoftISISXpress7._IISISXpressEvents_FeederEmptyEvent eventArgs)
{ MessageBox.Show(eventArgs.pageNumber.ToString(), AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly()));
}
VB.NET code:
Public WithEvents ImagXpress1 As AxAccusoftImagXpress13.AxImagXpressPublic WithEvents ISISXpress1 As AxAccusoftISISXpress7.AxISISXpress...Me.ImagXpress1 =NewAxAccusoftImagXpress13.AxImagXpress()Me.ISISXpress1 =NewAxAccusoftISISXpress7.AxISISXpress()...Private Sub Command2_Click(ByVal eventSender AsObject, ByVal eventArgs As EventArgs) Handles Command2.Click Me.ISISXpress1.CreateDib =True Me.ISISXpress1.CreateFiles =True Dim driver AsString="", scanner AsString="" Dim r AsString= Me.ISISXpress1.Root'UPGRADE_ISSUE: (2064) AccusoftISISXpress7.ISISXpress method ISISXpress1.Cancel was not upgraded.' Me.ISISXpress1.Cancel()'UPGRADE_ISSUE: (2064) AccusoftISISXpress7.ISISXpress method ISISXpress1.Cancel was not upgraded.' Me.ISISXpress1.Cancel(True)'UPGRADE_ISSUE: (2064) AccusoftISISXpress7.ISISXpress method ISISXpress1.Cancel was not upgraded.' Me.ISISXpress1.Cancel(False) Me.ISISXpress1.CancelImmediate()End Sub'UPGRADE_WARNING: (2080) Form_Load event was upgraded to Form_Load method and has a new behavior. Private Sub Form_Load()'
Me.ImagXpress1.FileName ="Tulips.jpg" Me.ImagXpress1.ZoomFactor =1 Me.ImagXpress1.ZoomToFit(AccusoftImagXpress13.enumZoomFit.ZOOMFIT_BEST) Me.ImagXpress1.DrawTextString(100,100,"This is a sample", Convert.ToUInt32(0)) Dim n AsInteger= ImagXpress1.PageNbr MessageBox.Show(CStr(n), My.Application.Info.Title) n = ImagXpress1.Pages MessageBox.Show(CStr(n), My.Application.Info.Title) ImagXpress1.CtlAutoSize = AccusoftImagXpress13.enumAutoSize.ISIZE_BestFit MessageBox.Show(ImagXpress1.FileName, My.Application.Info.Title) ImagXpress1.SaveFile()End SubPrivate Sub ISISXpress1_FeederEmpty(ByVal eventSender As Object, ByVal eventArgs As AxAccusoftISISXpress7._IISISXpressEvents_FeederEmptyEvent) Handles ISISXpress1.FeederEmpty
MessageBox.Show(CStr(eventArgs.pageNumber), My.Application.Info.Title)End Sub
2. ActiveBarLibrary
2.1. To DevExpress.XtraBars
Convert ActiveBar2Library.ActiveBar2 classes to DevExpress.XtraBars.BarManager.
By using this option the converted application will not have any reference to the COM Component.
Private Sub Form_Load() Dim X1 As Color = Me.ActiveBarHelper1.GetForeColor(Me.ActiveBar1) Dim X2 AsString= Me.ActiveBarHelper1.GetFont(Me.ActiveBar1).Name Me.ActiveBar1.ShowShortcutInScreenTips =False Me.ActiveBar1.ToolTipController.Active =TrueEnd Sub
2.2. To COM Interop
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
Private Sub Form_Load()... X1 = Me.ActiveBar1.ForeColor X2 = Me.ActiveBar1.Font Me.ActiveBar1.DisplayKeysInToolTip =False Me.ActiveBar1.DisplayToolTips =TrueEnd Sub
Private Sub Form_Load() Dim X1 As Color = Me.ActiveBarHelper1.GetForeColor(Me.ActiveBar1) Dim X2 AsString= Me.ActiveBarHelper1.GetFont(Me.ActiveBar1).Name Me.ActiveBar1.ShowShortcutInScreenTips =False Me.ActiveBar1.ToolTipController.Active =TrueEnd Sub
3. Component One Elastic
3.1. To System.Windows.Forms.Panel
This option will port the legacy COM control into the resulting application as a System.Windows.Forms.Panel control.
By using this option the converted application will not have any reference to the COM Component.
Original VB6 code:
Begin VB.Form Form1 ... Begin C1SizerLibCtl.C1Elastic C1Elastic1 ... EndEndPrivate Sub Form_Load() Dim ctl As C1Elastic Set ctl = C1Elastic1 ctl.Align = asFill ctl.Width =200 ctl.Top =3000 ctl.Enabled =FalseEnd Sub
Partial ClassForm1 ... Public WithEvents C1Elastic1 As System.Windows.Forms.Panel ... Private Sub InitializeComponent() ... Me.C1Elastic1 = New System.Windows.Forms.Panel() ...Private Sub Form_Load() Dim ctl As Panel = C1Elastic1 ctl.Dock = DockStyle.Fill ctl.Width = 200 ctl.Top = 3000 ctl.Enabled = FalseEnd Sub
3.2. To ComponentOne controls
This option will port the legacy COM control into the resulting application as a System.Windows.Forms.Panel control, along with a C1SizerLight control attached to the resulting form which handles the proportional resizing of all the controls in the form, including the mapped panel.
By using this option the converted application will not have any reference to the COM Component.
Original VB6 code:
Begin VB.Form Form1 ... Begin C1SizerLibCtl.C1Elastic C1Elastic1 ... EndEndPrivate Sub Form_Load() Dim ctl As C1Elastic Set ctl = C1Elastic1 ctl.Align = asFill ctl.Width =200 ctl.Top =3000 ctl.Enabled =FalseEnd Sub
Partial ClassForm1 ... Public WithEvents C1Elastic1 As System.Windows.Forms.Panel Dim c1sizerlight As C1.Win.C1Sizer.C1SizerLight ... Private Sub InitializeComponent() ... Me.C1Elastic1 = New System.Windows.Forms.Panel() Me.c1sizerlight = New C1.Win.C1Sizer.C1SizerLight(Me.components) ...Private Sub Form_Load() Dim ctl As Panel = C1Elastic1 ctl.Dock = DockStyle.Fill ctl.Width = 200 ctl.Top = 3000 ctl.Enabled = FalseEnd Sub
3.3. To COM Interop
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
Private Sub Form_Load()... X1 = Me.ActiveBar1.ForeColor X2 = Me.ActiveBar1.Font Me.ActiveBar1.DisplayKeysInToolTip =False Me.ActiveBar1.DisplayToolTips =TrueEnd Sub
Partial ClassForm1 ... Public WithEvents C1Elastic1 As System.Windows.Forms.Panel Dim c1sizerlight As C1.Win.C1Sizer.C1SizerLight ... Private Sub InitializeComponent() ... Me.C1Elastic1 = New System.Windows.Forms.Panel() Me.c1sizerlight = New C1.Win.C1Sizer.C1SizerLight(Me.components) ...Private Sub Form_Load() Dim ctl As Panel = C1Elastic1 ctl.Dock = DockStyle.Fill ctl.Width = 200 ctl.Top = 3000 ctl.Enabled = FalseEnd Sub
4. Component One Tab
4.1. To System.Windows.Forms.TabControl
This option will port the legacy COM control into the resulting application as a System.Windows.Forms.TabControl control.
By using this option the converted application will not have any reference to the COM Component.
Original VB6 code:
Private Sub Form_Load() Dim ctl As C1Tab Dim boolValue AsBoolean Dim numTab AsInteger Set ctl = C1Tab1 ctl.Align = asFill ctl.Width =200 ctl.Top =3000 ctl.Enabled =False ctl.CurrTab =4 ctl.AddTab "Hola2", Me.C1Tab1.NumTabs numTab = ctl.NumTabs boolValue = ctl.TabVisible(1) boolValue = ctl.TabEnabled(1) ctl.AttachPageToTab Me.Command2, Me.C1Tab1.NumTabs -1 ctl.Move 1000,1000,1000,1000End Sub
Private Sub Form_Load() Dim ctl As TabControl = C1Tab1 ctl.setAlign(DockStyle.Fill) ctl.Width =200 ctl.Top =3000 ctl.Enabled =False ctl.SelectedIndex =4 ctl.TabPages.Insert(Me.C1Tab1.TabCount,"Hola2") Dim numTab AsInteger= ctl.TabCount Dim boolValue AsBoolean= ctl.TabPages(1).Visible boolValue = ctl.TabPages(1).Enabled ctl.TabPages(Me.C1Tab1.TabCount -1).Controls.Add(Me.Command2) Me.Command2.Dock = DockStyle.Fill ctl.SetBounds(67,67,67,67)End Sub
4.2. To COM Interop
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
Private Sub Form_Load() Dim ctl As C1Tab Dim boolValue AsBoolean Dim numTab AsInteger Set ctl = C1Tab1 ctl.Align = asFill ctl.Width =200 ctl.Top =3000 ctl.Enabled =False ctl.CurrTab =4 ctl.AddTab "Hola2", Me.C1Tab1.NumTabs numTab = ctl.NumTabs boolValue = ctl.TabVisible(1) boolValue = ctl.TabEnabled(1) ctl.AttachPageToTab Me.Command2, Me.C1Tab1.NumTabs -1 ctl.Move 1000,1000,1000,1000End Sub
Implements ObjectControlPrivate Sub ObjectControl_Activate()End SubPrivateFunctionObjectControl_CanBePooled()AsBoolean ObjectControl_CanBePooled =TrueEnd FunctionPrivate Sub ObjectControl_Deactivate()End Sub
Public Class clsLogon Inherits System.EnterpriseServices.ServicedComponentPrivate Sub ObjectControl_Activate() Implements COMSVCSLib.ObjectControl.Activate End SubPrivate Function ObjectControl_CanBePooled() As Boolean Implements COMSVCSLib.ObjectControl.CanBePooled Return True End FunctionPrivate Sub ObjectControl_Deactivate() Implements COMSVCSLib.ObjectControl.Deactivate End Sub
5.2. To COM Interop
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
Implements ObjectControlPrivate Sub ObjectControl_Activate()End SubPrivateFunctionObjectControl_CanBePooled()AsBoolean ObjectControl_CanBePooled =TrueEnd FunctionPrivate Sub ObjectControl_Deactivate()End Sub
PublicClassclsLogonImplementsCOMSVCSLib.ObjectControlPrivate Sub ObjectControl_Activate() Implements COMSVCSLib.ObjectControl.ActivateEnd SubPrivate Function ObjectControl_CanBePooled() As Boolean Implements COMSVCSLib.ObjectControl.CanBePooledReturn TrueEnd FunctionPrivate Sub ObjectControl_Deactivate() Implements COMSVCSLib.ObjectControl.DeactivateEnd Sub
6. CRAXDRT_CRVIEWERLibCtl
6.1. To CrystalReports
By using this option the converted application will not have any reference to the COM Component.
Map CRAXDRT and CRVIEWERLibCtl classes and enums to CrystalReports equivalents.
Private Sub Form_Load() Dim objReport As CRAXDRT.Report objReport = objApplication.OpenReport(App.Path &"Report.rpt",1) objReport.DiscardSavedDataEnd Sub
Private Sub Form_Load() Dim tempReport AsNewCrystalDecisions.CrystalReports.Engine.ReportDocument() tempReport.Load(My.Application.Info.DirectoryPath &"Report.rpt") Dim objReport As CrystalDecisions.CrystalReports.Engine.ReportDocument = tempReport objReport.Refresh()End Sub
6.2. To COM Interop
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Original VB6 code:
Private Sub Form_Load() Dim objReport As CRAXDRT.Report objReport = objApplication.OpenReport(App.Path &"Report.rpt",1) objReport.DiscardSavedDataEnd Sub
Private Sub Form_Load() Dim objReport As CRAXDRT.Report = objApplication.OpenReport(My.Application.Info.DirectoryPath &"Report.rpt",1) objReport.DiscardSavedData()End Sub
7. CrystalReport
7.1. To CrystalReport.NET
Conversion of CrystalReport for Windows Forms using a helper class.
General Description:
CrystalReport is a business intelligence application, marketed to small and medium businesses. It allows the user to generate reports based on databases generated within Visual Basic.
Deployment Note:
The VBUC converts the CrystalReport OCX to a helper class.
This feature will take the legacy COM control and create an interoperability code wrapper to make it visible from the managed code. This means the control's functionality will remain the same since it will use the same binary, but the resulting application will depend on the legacy control.
Private Sub Form_Load() Dim newSidbEdit As CSTextLibCtl.sidbEdit newSidbEdit.Text ="Hello" newSidbEdit.Enabled =True newSidbEdit.Visible =True newSidbEdit.TabIndex =4End Sub
Private Sub Form_Load() Dim newSidbEdit As MaskedTextBox newSidbEdit.Text ="Hello" newSidbEdit.Enabled =True newSidbEdit.Visible =True newSidbEdit.TabIndex =4End Sub
8.2. To ComponentOne C1Input controls
By using this option, the converted application will not have any reference to the COM Component.
This option maps:
CSTextLib classes to a Component One Winforms control equivalent.