...
Every Visual Basic programmer is familiar with the idea of an interactive designer. For example, User-Defined Forms and UserControls are created and edited using VB6's intrinsic GUI designer. The GUI designer allows the programmer to interactively edit a visual representation of the Form or UserControl and then stores most of the information in mostly text-based files (.frm/.ctl) files. In addition to its GUI designer, Visual Basic allows third party component developers to create their own interactive component designers. These Third-Party Designers (3PDs) require the installation the third-party product. They allow the programmer to interactively edit a visual representation of their components and store design-time information in mostly proprietary binary format. This is somewhat similar to, but worse generally more obscure than, the problem of complex proprietary setting third-party control information stored in for forms and controls in binary frx and ctx files.
Info |
---|
VB6 also has intrinsic DataReports |
...
, DataEnvironments, WebDocuments, and PropertyPages all with their own custom designers. These types are rarely used in the codes we have seen so they are not fully supported by gmBasic at this time. |
Third-party designers typically create two types of files:
...
In order to process a 3PD subclass, the dsx files must be converted to a text format that gmBasic can read, interpret, and load.
This article describes how different types of custom designer APIs are handled.
ActiveReports
...
article describes how different types of custom designer APIs are handled.
ActiveReports
Original VB6 | Generated DSX.RPT file |
---|
The dsr file has very little information in it besides the name of the designer subclass and a reference to the dsx file containing the detailed of the subclass structure. Code Block |
---|
| VERSION 5.00
Begin {9EB8768B-CDFA-44DF-8F3E-857A8405E1DB} Contact_Call_Log_Counts
Caption = "Company Check Form"
ClientHeight = 11115
ClientLeft = 60
ClientTop = 345
ClientWidth = 15240
StartUpPosition = 3 'Windows Default
_ExtentX = 26882
_ExtentY = 19606
SectionData = "Contact_Call_Log_Counts.dsx":0000 <---
End
Attribute VB_Name = "Contact_Call_Log_Counts"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False |
| After running the makedsr process with gmStudio I have a text file (*.dsr.rpt) containing the detailed structure of the designer subclass that can be loaded by gmBasic. Code Block |
---|
| Begin DDActiveReports2.ActiveReport Contact_Call_Log_Counts
Version = 2.0
Begin DDActiveReports2.Section ReportHeader
Type = "ReportHeader"
Name = "ReportHeader"
Height = "0"
KeepTogether = "-1"
End
Begin DDActiveReports2.Section PageHeader
Type = "PageHeader"
Name = "PageHeader"
Height = "1095"
KeepTogether = "-1"
Begin DDActiveReports2.Label Label1
Type = "AR.Label"
Name = "Label1"
Left = "0"
Top = "0"
Width = "4800"
Height = "360"
Caption = " INSURANCE COMPANY"
Multiline = "0"
ClassName = "Normal"
Style = "font-size: 14.5pt; font-weight: bold;"
End
Begin DDActiveReports2.Label State_Contract
Type = "AR.Label"
Name = "State_Contract"
Left = "720"
Top = "810"
Width = "5670"
Height = "270"
Caption = "STATE"
Multiline = "0"
ClassName = "Normal"
Style = "font-size: 12pt; font-weight: bold; text-align: right;"
End
Begin DDActiveReports2.Label Label6
Type = "AR.Label"
Name = "Label6"
Left = "6690"
Top = "810"
Width = "960"
Height = "270"
Caption = "COUNT"
Multiline = "0"
ClassName = "Normal"
Style = "font-size: 12pt; font-weight: bold;"
End
Begin DDActiveReports2.Line Line6
Type = "AR.Line"
Name = "Line6"
X1 = "0"
Y1 = "1080"
X2 = "11550"
Y2 = "1080"
LineWeight = "2"
AnchorBottom = "0"
End
Begin DDActiveReports2.Label Report_Title
Type = "AR.Label"
Name = "Report_Title"
Left = "0"
Top = "420"
Width = "10860"
Height = "330"
Caption = "CONTACTS MADE BY STATE"
Multiline = "0"
ClassName = "Normal"
Style = "font-size: 14.5pt; font-weight: bold;"
End
End
Begin DDActiveReports2.Section Detail
Type = "Detail"
Name = "Detail"
Height = "270"
KeepTogether = "-1"
Begin DDActiveReports2.Shape Shape45
Type = "AR.Shape"
Name = "Shape45"
Left = "11220"
Top = "13050"
Width = "0"
Height = "30"
BackColor = "0"
LineWeight = "2"
End
Begin DDActiveReports2.Field Report_Field
Type = "AR.Field"
Name = "Report_Field"
DataField = "Report_Field"
Left = "690"
Top = "0"
Width = "5730"
Height = "270"
ClassName = "Normal"
Style = "font-size: 12pt; text-align: right;"
End
Begin DDActiveReports2.Field Report_Count
Type = "AR.Field"
Name = "Report_Count"
DataField = "Report_Count"
Left = "6690"
Top = "0"
Width = "840"
Height = "270"
ClassName = "Normal"
Style = "font-size: 12pt; text-align: right;"
End
Begin DDActiveReports2.DataControl DC_Report
Type = "AR.DataControl"
Name = "DC_Report"
Left = "11010"
Top = "0"
Width = "210"
Height = "120"
Visible = "0"
LockType = "1"
End
End
Begin DDActiveReports2.Section PageFooter
Type = "PageFooter"
Name = "PageFooter"
Height = "0"
KeepTogether = "-1"
End
Begin DDActiveReports2.Section ReportFooter
Type = "ReportFooter"
Name = "ReportFooter"
Height = "330"
KeepTogether = "-1"
Begin DDActiveReports2.Field Sum_Count
Type = "AR.Field"
Name = "Sum_Count"
DataField = "Report_Count"
Left = "6690"
Top = "60"
Width = "840"
Height = "270"
SummaryType = "1"
SummaryFunc = "0"
SummaryRunning = "0"
ClassName = "Normal"
Style = "font-size: 12pt; text-align: right;"
End
Begin DDActiveReports2.Line Line7
Type = "AR.Line"
Name = "Line7"
X1 = "6690"
Y1 = "30"
X2 = "7560"
Y2 = "30"
LineWeight = "2"
AnchorBottom = "0"
End
End
End
|
|
...
Note: The process for converting ActiveReports dsx files to dsx.rpt files only words works for ActiveReports v2 format files. Fortunately, the vendor offers an Upsizer.
...