Skip to content

Commit

Permalink
version update
Browse files Browse the repository at this point in the history
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
  • Loading branch information
GCuser99 committed May 25, 2024
1 parent 6b9a953 commit 9daa724
Show file tree
Hide file tree
Showing 36 changed files with 172 additions and 106 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The resulting imported form and code may have to be tweaked in **twinBASIC** to

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

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

## Requirements:

Expand Down
Binary file modified dist/tBUserFormConverter_win32.dll
Binary file not shown.
Binary file modified dist/tBUserFormConverter_win64.dll
Binary file not shown.
Binary file modified dist/tBUserformConverterSetup.exe
Binary file not shown.
Binary file modified images/VBIDE Menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/converter dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/nested_controls_visualStyles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/CheckBox
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"MousePointer": "vbDefault",
"Name": "Check1",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"Padding": 2,
"Picture": [],
"PictureAlignment": "vbAlignTop",
Expand All @@ -49,6 +50,7 @@
"Tag": null,
"ToolTipText": null,
"Top": 47,
"TransparencyKey": -1,
"UseMaskColor": false,
"Value": "vbUnchecked",
"Visible": true,
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/ComboBox
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"Name": "Combo1",
"OLEDragMode": "vbOLEDragManual",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"RightToLeft": false,
"Sorted": false,
"Style": "vbComboDropdown",
Expand All @@ -48,6 +49,7 @@
"Text": null,
"ToolTipText": null,
"Top": 52,
"TransparencyKey": -1,
"Visible": true,
"VisualStyles": true,
"WhatsThisHelpID": 0,
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/CommandButton
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"MousePointer": "vbDefault",
"Name": "CommandButton1",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"Padding": 2,
"Picture": [
],
Expand All @@ -51,6 +52,7 @@
"Tag": "",
"ToolTipText": null,
"Top": 118.666666666667,
"TransparencyKey": -1,
"UseMaskColor": false,
"Visible": true,
"VisualStyles": true,
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/CONTROLS/Form
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"Palette": "",
"PaletteMode": "vbPaletteModeHalftone",
"Picture": "",
"PictureDpiScaling": true,
"PictureDpiScaling": true,
"RightToLeft": false,
"ScaleHeight": 4500,
"ScaleLeft": 0,
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/Frame
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@
"MousePointer": "vbDefault",
"Name": "Frame1",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"RightToLeft": false,
"TabIndex": 3,
"Tag": null,
"ToolTipText": null,
"Top": 37,
"TransparencyKey": -1,
"Visible": true,
"VisualStyles": true,
"WhatsThisHelpID": 0,
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/HScrollBar
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"MouseIcon": [],
"MousePointer": "vbDefault",
"Name": "HScroll1",
"Opacity": 100,
"RightToLeft": false,
"SmallChange": 1,
"TabIndex": 7,
"TabStop": true,
"Tag": null,
"Top": 81,
"TransparencyKey": -1,
"Value": 0,
"Visible": true,
"VisualStyles": true,
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/CONTROLS/Image
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"DragIcon": [],
"DragMode": "vbManual",
"Enabled": true,
"Height": 140,
"Height": 94,
"Index": -1,
"Left": 61,
"Left": 66,
"MouseIcon": [],
"MousePointer": "vbDefault",
"Name": "Image1",
Expand All @@ -30,10 +30,10 @@
"Stretch": false,
"Tag": null,
"ToolTipText": null,
"Top": 55,
"Top": 51,
"Visible": true,
"WhatsThisHelpID": 0,
"Width": 171,
"Width": 146,
"_className": "Image",
"_clsid": "{33AD4F90-6699-11CF-B70C-00AA0060D393}",
"_paintedByParent": true
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/ListBox
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"Name": "List1",
"OLEDragMode": "vbOLEDragManual",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"RightToLeft": false,
"Sorted": false,
"Style": "vbListBoxStandard",
Expand All @@ -49,6 +50,7 @@
"Tag": null,
"ToolTipText": null,
"Top": 86,
"TransparencyKey": -1,
"Visible": true,
"VisualStyles": true,
"WhatsThisHelpID": 0,
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/OptionButton
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"MousePointer": "vbDefault",
"Name": "Option1",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"Padding": 2,
"Picture": [],
"PictureAlignment": "vbAlignTop",
Expand All @@ -45,6 +46,7 @@
"Tag": null,
"ToolTipText": null,
"Top": 62,
"TransparencyKey": -1,
"UseMaskColor": false,
"Value": false,
"Visible": true,
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/TextBox
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"NumbersOnly": false,
"OLEDragMode": "vbOLEDragManual",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"PasswordChar": null,
"RightToLeft": false,
"ScrollBars": "vbSBNone",
Expand All @@ -57,6 +58,7 @@
"TextHintAlways": true,
"ToolTipText": null,
"Top": 58,
"TransparencyKey": -1,
"Visible": true,
"VisualStyles": true,
"WhatsThisHelpID": 0,
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/UpDown
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
"MousePointer": "vbDefault",
"Name": "UpDown1",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"Orientation": "ccOrientationVertical",
"TabIndex": 4,
"TabStop": true,
"Tag": null,
"Top": 223,
"TransparencyKey": -1,
"Value": 0,
"Visible": true,
"VisualStyles": true,
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/CONTROLS/VScrollBar
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"MouseIcon": [],
"MousePointer": "vbDefault",
"Name": "VScroll1",
"Opacity": 100,
"RightToLeft": false,
"SmallChange": 1,
"TabIndex": 11,
"TabStop": true,
"Tag": null,
"Top": 183,
"TransparencyKey": -1,
"Value": 0,
"Visible": true,
"VisualStyles": true,
Expand Down
Binary file added src/Resources/ICON/About_32.ico
Binary file not shown.
Binary file added src/Resources/ICON/ConvertForms_32.ico
Binary file not shown.
Binary file added src/Resources/ICON/ExtractResources_32.ico
Binary file not shown.
Binary file added src/Resources/IMAGES/About_16.bmp
Binary file not shown.
Binary file added src/Resources/IMAGES/ConvertForms_16.bmp
Binary file not shown.
Binary file added src/Resources/IMAGES/ExtractResources_16.bmp
Binary file not shown.
File renamed without changes.
6 changes: 4 additions & 2 deletions src/Sources/About.tbform
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"ScaleTop": 0,
"ScaleWidth": 4680,
"ShowInTaskbar": true,
"StartupPosition": "vbStartUpScreen",
"StartUpPosition": "vbStartUpScreen",
"TabFocusAutoSelect": false,
"Tag": null,
"Top": 0,
Expand All @@ -77,7 +77,7 @@
"showGrid": true,
"showOutlines": false
},
"__lastUpdateMarker": 902329495,
"__lastUpdateMarker": 3004003600,
"_children": [
{
"Alignment": "vbLeftJustify",
Expand Down Expand Up @@ -172,6 +172,7 @@
"MousePointer": "vbDefault",
"Name": "cmdOK",
"OLEDropMode": "vbOLEDropNone",
"Opacity": 100,
"Padding": 2,
"Picture": "",
"PictureAlignment": "vbAlignTop",
Expand All @@ -183,6 +184,7 @@
"Tag": null,
"ToolTipText": null,
"Top": 118,
"TransparencyKey": -1,
"UseMaskColor": false,
"Visible": true,
"VisualStyles": true,
Expand Down
9 changes: 6 additions & 3 deletions src/Sources/About.twin
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ Class About

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

Private Sub cmdOK_Click()
Me.Close
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then Cancel = True: Me.Close
If UnloadMode = vbFormControlMenu Then
Cancel = True
Me.Close
End If
End Sub

End Class
Loading

0 comments on commit 9daa724

Please sign in to comment.