Skip to content

Commit 9daa724

Browse files
committed
version update
Added transparency background support Modified API calls for compatibility with Windows Dev Lib Replaced BytesFromPicture function with native PictureToByteArray function New icons for forms and ribbon menus Minor code cleanup
1 parent 6b9a953 commit 9daa724

36 files changed

+172
-106
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The resulting imported form and code may have to be tweaked in **twinBASIC** to
1717

1818
<img src="https://github.com/GCuser99/VBA-UserForm-to-twinBASIC/blob/main/images/nested_controls.png" alt="NestedControls" width=95% height=95%>
1919

20-
**Example**: Comparison of VBA UserForm (left) and converted twinBASIC form (right)
20+
**Example**: Comparison of VBA UserForm (left) and converted twinBASIC form with VisualStyles=False (right)
2121

2222
## Requirements:
2323

dist/tBUserFormConverter_win32.dll

452 KB
Binary file not shown.

dist/tBUserFormConverter_win64.dll

616 KB
Binary file not shown.

dist/tBUserformConverterSetup.exe

54.1 KB
Binary file not shown.

images/VBIDE Menu.png

-1.62 KB
Loading

images/converter dialog.png

-11.8 KB
Loading
255 KB
Loading

src/Resources/CONTROLS/CheckBox

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"MousePointer": "vbDefault",
3939
"Name": "Check1",
4040
"OLEDropMode": "vbOLEDropNone",
41+
"Opacity": 100,
4142
"Padding": 2,
4243
"Picture": [],
4344
"PictureAlignment": "vbAlignTop",
@@ -49,6 +50,7 @@
4950
"Tag": null,
5051
"ToolTipText": null,
5152
"Top": 47,
53+
"TransparencyKey": -1,
5254
"UseMaskColor": false,
5355
"Value": "vbUnchecked",
5456
"Visible": true,

src/Resources/CONTROLS/ComboBox

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"Name": "Combo1",
4040
"OLEDragMode": "vbOLEDragManual",
4141
"OLEDropMode": "vbOLEDropNone",
42+
"Opacity": 100,
4243
"RightToLeft": false,
4344
"Sorted": false,
4445
"Style": "vbComboDropdown",
@@ -48,6 +49,7 @@
4849
"Text": null,
4950
"ToolTipText": null,
5051
"Top": 52,
52+
"TransparencyKey": -1,
5153
"Visible": true,
5254
"VisualStyles": true,
5355
"WhatsThisHelpID": 0,

src/Resources/CONTROLS/CommandButton

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"MousePointer": "vbDefault",
4040
"Name": "CommandButton1",
4141
"OLEDropMode": "vbOLEDropNone",
42+
"Opacity": 100,
4243
"Padding": 2,
4344
"Picture": [
4445
],
@@ -51,6 +52,7 @@
5152
"Tag": "",
5253
"ToolTipText": null,
5354
"Top": 118.666666666667,
55+
"TransparencyKey": -1,
5456
"UseMaskColor": false,
5557
"Visible": true,
5658
"VisualStyles": true,

src/Resources/CONTROLS/Form

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"Palette": "",
4949
"PaletteMode": "vbPaletteModeHalftone",
5050
"Picture": "",
51-
"PictureDpiScaling": true,
51+
"PictureDpiScaling": true,
5252
"RightToLeft": false,
5353
"ScaleHeight": 4500,
5454
"ScaleLeft": 0,

src/Resources/CONTROLS/Frame

+2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@
3131
"MousePointer": "vbDefault",
3232
"Name": "Frame1",
3333
"OLEDropMode": "vbOLEDropNone",
34+
"Opacity": 100,
3435
"RightToLeft": false,
3536
"TabIndex": 3,
3637
"Tag": null,
3738
"ToolTipText": null,
3839
"Top": 37,
40+
"TransparencyKey": -1,
3941
"Visible": true,
4042
"VisualStyles": true,
4143
"WhatsThisHelpID": 0,

src/Resources/CONTROLS/HScrollBar

+2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
"MouseIcon": [],
2323
"MousePointer": "vbDefault",
2424
"Name": "HScroll1",
25+
"Opacity": 100,
2526
"RightToLeft": false,
2627
"SmallChange": 1,
2728
"TabIndex": 7,
2829
"TabStop": true,
2930
"Tag": null,
3031
"Top": 81,
32+
"TransparencyKey": -1,
3133
"Value": 0,
3234
"Visible": true,
3335
"VisualStyles": true,

src/Resources/CONTROLS/Image

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"DragIcon": [],
1818
"DragMode": "vbManual",
1919
"Enabled": true,
20-
"Height": 140,
20+
"Height": 94,
2121
"Index": -1,
22-
"Left": 61,
22+
"Left": 66,
2323
"MouseIcon": [],
2424
"MousePointer": "vbDefault",
2525
"Name": "Image1",
@@ -30,10 +30,10 @@
3030
"Stretch": false,
3131
"Tag": null,
3232
"ToolTipText": null,
33-
"Top": 55,
33+
"Top": 51,
3434
"Visible": true,
3535
"WhatsThisHelpID": 0,
36-
"Width": 171,
36+
"Width": 146,
3737
"_className": "Image",
3838
"_clsid": "{33AD4F90-6699-11CF-B70C-00AA0060D393}",
3939
"_paintedByParent": true

src/Resources/CONTROLS/ListBox

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"Name": "List1",
4242
"OLEDragMode": "vbOLEDragManual",
4343
"OLEDropMode": "vbOLEDropNone",
44+
"Opacity": 100,
4445
"RightToLeft": false,
4546
"Sorted": false,
4647
"Style": "vbListBoxStandard",
@@ -49,6 +50,7 @@
4950
"Tag": null,
5051
"ToolTipText": null,
5152
"Top": 86,
53+
"TransparencyKey": -1,
5254
"Visible": true,
5355
"VisualStyles": true,
5456
"WhatsThisHelpID": 0,

src/Resources/CONTROLS/OptionButton

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"MousePointer": "vbDefault",
3535
"Name": "Option1",
3636
"OLEDropMode": "vbOLEDropNone",
37+
"Opacity": 100,
3738
"Padding": 2,
3839
"Picture": [],
3940
"PictureAlignment": "vbAlignTop",
@@ -45,6 +46,7 @@
4546
"Tag": null,
4647
"ToolTipText": null,
4748
"Top": 62,
49+
"TransparencyKey": -1,
4850
"UseMaskColor": false,
4951
"Value": false,
5052
"Visible": true,

src/Resources/CONTROLS/TextBox

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"NumbersOnly": false,
4646
"OLEDragMode": "vbOLEDragManual",
4747
"OLEDropMode": "vbOLEDropNone",
48+
"Opacity": 100,
4849
"PasswordChar": null,
4950
"RightToLeft": false,
5051
"ScrollBars": "vbSBNone",
@@ -57,6 +58,7 @@
5758
"TextHintAlways": true,
5859
"ToolTipText": null,
5960
"Top": 58,
61+
"TransparencyKey": -1,
6062
"Visible": true,
6163
"VisualStyles": true,
6264
"WhatsThisHelpID": 0,

src/Resources/CONTROLS/UpDown

+2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
"MousePointer": "vbDefault",
2323
"Name": "UpDown1",
2424
"OLEDropMode": "vbOLEDropNone",
25+
"Opacity": 100,
2526
"Orientation": "ccOrientationVertical",
2627
"TabIndex": 4,
2728
"TabStop": true,
2829
"Tag": null,
2930
"Top": 223,
31+
"TransparencyKey": -1,
3032
"Value": 0,
3133
"Visible": true,
3234
"VisualStyles": true,

src/Resources/CONTROLS/VScrollBar

+2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
"MouseIcon": [],
2323
"MousePointer": "vbDefault",
2424
"Name": "VScroll1",
25+
"Opacity": 100,
2526
"RightToLeft": false,
2627
"SmallChange": 1,
2728
"TabIndex": 11,
2829
"TabStop": true,
2930
"Tag": null,
3031
"Top": 183,
32+
"TransparencyKey": -1,
3133
"Value": 0,
3234
"Visible": true,
3335
"VisualStyles": true,

src/Resources/ICON/About_32.ico

4.19 KB
Binary file not shown.
4.19 KB
Binary file not shown.
4.19 KB
Binary file not shown.

src/Resources/IMAGES/About_16.bmp

822 Bytes
Binary file not shown.
202 Bytes
Binary file not shown.
246 Bytes
Binary file not shown.

src/Sources/About.tbform

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"ScaleTop": 0,
5858
"ScaleWidth": 4680,
5959
"ShowInTaskbar": true,
60-
"StartupPosition": "vbStartUpScreen",
60+
"StartUpPosition": "vbStartUpScreen",
6161
"TabFocusAutoSelect": false,
6262
"Tag": null,
6363
"Top": 0,
@@ -77,7 +77,7 @@
7777
"showGrid": true,
7878
"showOutlines": false
7979
},
80-
"__lastUpdateMarker": 902329495,
80+
"__lastUpdateMarker": 3004003600,
8181
"_children": [
8282
{
8383
"Alignment": "vbLeftJustify",
@@ -172,6 +172,7 @@
172172
"MousePointer": "vbDefault",
173173
"Name": "cmdOK",
174174
"OLEDropMode": "vbOLEDropNone",
175+
"Opacity": 100,
175176
"Padding": 2,
176177
"Picture": "",
177178
"PictureAlignment": "vbAlignTop",
@@ -183,6 +184,7 @@
183184
"Tag": null,
184185
"ToolTipText": null,
185186
"Top": 118,
187+
"TransparencyKey": -1,
186188
"UseMaskColor": false,
187189
"Visible": true,
188190
"VisualStyles": true,

src/Sources/About.twin

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ Class About
55

66
Sub New()
77
lblInfo.Caption = "Author: GCUser99" & vbCrLf & _
8-
"Version: v2.6" & vbCrLf & _
8+
"Version: " & App.Major & "." & App.Minor & vbCrLf & _
99
"Description: A VBIDE add-in (complied with twinBASIC) that converts VBA UserForms for use in twinBASIC."
1010
lblWebsite.Caption = "https://github.com/GCuser99/VBA-UserForm-to-twinBASIC"
11-
Set Me.Icon = GetImageFromResources("transparent.ico", "IMAGES")
11+
Set Me.Icon = Global.LoadResPicture("About_32.ico", vbResIcon)
1212
End Sub
1313

1414
Private Sub cmdOK_Click()
1515
Me.Close
1616
End Sub
1717

1818
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
19-
If UnloadMode = 0 Then Cancel = True: Me.Close
19+
If UnloadMode = vbFormControlMenu Then
20+
Cancel = True
21+
Me.Close
22+
End If
2023
End Sub
2124

2225
End Class

0 commit comments

Comments
 (0)