-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Slow going here, lots to do.
https://www.vbforums.com/images/ieimages/2025/06/4.png
Adding wind icon to the pictorial weather gauge, all based upon METAR data.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
https://www.vbforums.com/images/ieimages/2025/06/8.png
Adding balloon tooltips to VB6 combobox controls using Elroy's balloon tooltips and subclassing. Retroactively adding newer functionality to my older VB6 desktop 'trinkets'.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
You don't need any subclassing to attach balloon tooltips, they work automatically when attached to a control.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Not the comboboxes, when using Elroy's balloon tooltips. They work on everything else but the comboboxes. A little subclassing is required to make them operate on comboboxes unless of course Elroy has a new version that fixes that.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Have you checked out this thread? There's a ComboBox in the screenshot as well and it displays the balloon tooltip just like any other control.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
Have you checked out
this thread? There's a ComboBox in the screenshot as well and it displays the balloon tooltip just like any other control.
Oh yes, I saw yours awhile ago and I had planned to dig in and have a look but never quite got around to it. I have about 20 or more VB6 programs that have balloon tooltips using Elroy's older tooltip code and I know where I am with those. If I make a major /minor change in the way my progs operate then I 'have' to go back and update all of them, so I stick with what I know for the moment, less work...
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Van, just raised a feature request for TwinBasic to allow TB comboboxes to have MOUSEMOVE and other similar events captured. Faf. responded and stated it might be a straight-forward addition if Wayne OKs it. So, no need for subclassing nor any other shennanigans.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
You do not need MouseMove for balloon tooltips... See link above.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I mean the MouseMove event, it is not necessary for balloon tooltips. They know to show automatically when the mouse cursor is over the control without writing code specifically in the MouseMove event. That's why they also work for ComboBoxes which don't expose such an event.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I'll give it some thought a little later, thankyou.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Working on a new VB6 gauge, a conversion of my UBoat stopwatch Konfabulator widget. Just finished the first pass of migration, a few minor bugs to fix.
https://www.vbforums.com/images/ieim...025/06/15.jpeg
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
As a side (side) project, I've been trying to recreate the 'classic' solitaire that used to ship with Windows. I've got the cards on a sprite sheet which I store in code as base64, and regenerate the full image and carve up the individual cards at runtime.
I've also added a custom statusbar at the bottom, but am still working out the bugs on that.
Attachment 195082
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Love it! We need more of these ex-XP utilities. Eventually we can replace the upper strata in Windows with VB6 components and utilities!
Not quite sure why I'd want that but it sounds fun.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I've got 64bit compatible declares for the original cards.dll that solitaire etc used in WinDevLib :bigyello:
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Really? I didn't think cards32.dll came in 64bit. There is like a dozen or so functions, no? Would've saved me a little bit of time had I known that there was one...:ehh:
That's actually how this project started - as a drop-in class that emulated the DLL. Not sure how I'm going to tackle the animation side of things, but it's been a fun project. I've finally managed to sort out how to move all the cards in one go, so I'm happy.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I didn't think it did either. Wasted a bunch of time trying to compile it for x64... was mystifying why it wouldn't.
But XP 64bit edition came with a 64bit version.
Code:
Public Enum CardsResourceIds
IDACLUBS = 1
ID2CLUBS = 2
ID3CLUBS = 3
ID4CLUBS = 4
ID5CLUBS = 5
ID6CLUBS = 6
ID7CLUBS = 7
ID8CLUBS = 8
ID9CLUBS = 9
IDTCLUBS = 10
IDJCLUBS = 11
IDQCLUBS = 12
IDKCLUBS = 13
IDADIAMONDS = 14
ID2DIAMONDS = 15
ID3DIAMONDS = 16
ID4DIAMONDS = 17
ID5DIAMONDS = 18
ID6DIAMONDS = 19
ID7DIAMONDS = 20
ID8DIAMONDS = 21
ID9DIAMONDS = 22
IDTDIAMONDS = 23
IDJDIAMONDS = 24
IDQDIAMONDS = 25
IDKDIAMONDS = 26
IDAHEARTS = 27
ID2HEARTS = 28
ID3HEARTS = 29
ID4HEARTS = 30
ID5HEARTS = 31
ID6HEARTS = 32
ID7HEARTS = 33
ID8HEARTS = 34
ID9HEARTS = 35
IDTHEARTS = 36
IDJHEARTS = 37
IDQHEARTS = 38
IDKHEARTS = 39
IDASPADES = 40
ID2SPADES = 41
ID3SPADES = 42
ID4SPADES = 43
ID5SPADES = 44
ID6SPADES = 45
ID7SPADES = 46
ID8SPADES = 47
ID9SPADES = 48
IDTSPADES = 49
IDJSPADES = 50
IDQSPADES = 51
IDKSPADES = 52
IDGHOST = 53
IDFACEDOWN1 = 54
IDFACEDOWN2 = 55
IDFACEDOWN3 = 56
IDFACEDOWN4 = 57
IDFACEDOWN5 = 58
IDFACEDOWN6 = 59
IDFACEDOWN7 = 60
IDFACEDOWN8 = 61
IDFACEDOWN9 = 62
IDFACEDOWN10 = 63
IDFACEDOWN11 = 64
IDFACEDOWN12 = 65
IDFACEDOWNFIRST = IDFACEDOWN1
IDFACEDOWNLAST = IDFACEDOWN12
End Enum
Public Enum CardsDllConsts
CARDS_FACEUP = 0
CARDS_FACEDOWN = 1 /* for compatibility with old apps, use IDFACEDOWNFIRST..IDFACEDOWNLAST */
CARDS_HLITE = 2
CARDS_GHOST = 3
CARDS_REMOVE = 4
CARDS_INVISIBLEGHOST = 5
CARDS_DECKX = 6
CARDS_DECKO = 7
End Enum
Public Declare PtrSafe Function cdtInit Lib "cards.dll" (pdxCard As Long, pdyCard As Long) As BOOL
Public Declare PtrSafe Function cdtDrawExt Lib "cards.dll" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal dx As Long, ByVal dy As Long, ByVal cd As CardsResourceIds, ByVal mode As CardsDllConsts, ByVal rgbBgnd As Long) As BOOL
Public Declare PtrSafe Function cdtDraw Lib "cards.dll" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal cd As CardsResourceIds, ByVal mode As CardsDllConsts, ByVal rgbBgnd As Long) As BOOL
Public Declare PtrSafe Function cdtAnimate Lib "cards.dll" (ByVal hdc As LongPtr, ByVal cd As CardsResourceIds, ByVal x As Long, ByVal y As Long, ByVal ispr As Long) As BOOL
Public Declare PtrSafe Sub cdtTerm Lib "cards.dll" ()
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
Well am slowly making progress. Just need to do the winner bouncing card effect thingy, and I think that's pretty much it (besides a top scores record and select-your-card-design option)
Attachment 195085
Thank you, Fafalone, for luring me down that rabbit hole. I managed to find a 64bit DLL and it worked as advertised. Not easy to find though. Recreating the DLL would be a good TwinBasic project, don't you think? I assume it's possible to store the bitmaps in the DLL?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
You don't actually need the DLLs (either 32-bit or 64-bit), they expose only a handful of functions of questionable usefulness. The bitmaps themselves are what you want and you can download them all from this page. Then you could convert them to PNG and store them as resources in your own app.
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
You don't actually need the DLLs (either 32-bit or 64-bit), they expose only a handful of functions of questionable usefulness. The bitmaps themselves are what you want and you can download them all from
this page. Then you could convert them to PNG and store them as resources in your own app.
That's exactly what I did! :)
I didn't learn that there was even a 64bit version of the DLL until yestrday. As you say, I converted the individual bitmaps into a Single PNG file (7 rows x 13 columns) and then again into base64. That single string clocks in at around 500 lines of code.
Attachment 195086
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
The source for the DLLs and Solitaire is in the Windows source leaks, if you want to cheat :D
(and yes, for all project types twinBASIC can natively handle all resource types, not just a small subset like VB6, minus some compatibility edge cases with certain resources where the same types of resources are given the same id but different LCID language code)
-
2 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
On another note, I've been playing around some more with XAML Islands in VB6 and testing different controls. There's a lot of new information to absorb about .NET concepts I've never heard of before which I need to adapt into VB6.
Here's a demo window with an assortment of various controls thrown on it: AutoSuggestBox, ListView, ColorPicker, TextBox, ComboBox, Button:
Attachment 195087
There are no forms in this project, everything takes place in Sub Main and the XAML layout is loaded from resources:
Code:
Private Sub Main()
Dim DesktopWindowXamlSourceNative2 As IDesktopWindowXamlSourceNative2, Message As MSG
With New cMainWindow
If .IsInitialized Then
If .CreateWindow(App.Title, 800, 800) Then
Set DesktopWindowXamlSourceNative2 = .DesktopWindowXamlSource
.LoadXaml StrConv(LoadResData(102, "CUSTOM"), vbUnicode)
While GetMessageW(Message, vbNullPtr, 0, 0) ' Enter the message loop
If DesktopWindowXamlSourceNative2.PreTranslateMessage(Message) = 0 Then
TranslateMessage Message: DispatchMessageW Message
End If
Wend
End If
End If
End With
End Sub
Public Function WndProc(ByVal hWnd As LongPtr, ByVal uMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr
Select Case uMsg
Case WM_DESTROY: PostQuitMessage ERROR_SUCCESS
End Select
WndProc = DefWindowProcW(hWnd, uMsg, wParam, lParam)
End Function
All controls come already packed full of modern features, for example the textboxes contain Proofing tools by default. Also the theme can be toggled seamlessly between Light and Dark. This screenshot shows the theme change for the whole window but it can also be changed on a "per control" basis:
Attachment 195088
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
If you've ever been curious about using Cairo without vbRichClient, I posted a simple proof of concept for using a cairo DLL directly.
https://www.vbforums.com/showthread....=1#post5680174
tB obviously, but would take 30s to switch to VB6.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
@VanGoghGaming: XAML controls in conjunction with the "Windows App SDK" would be the next step. However, I'm afraid that the "Windows App SDK" is too complicated for VB6, since it's actually only intended for .NET. First, you need to install the "Windows App SDK" in 32-bit and/or 64-bit versions. For VB6, you need to copy the installed files of the "Windows App SDK" from the "C:\Program Files\WindowsApps" folder, because some winmd files are required there. Then you need to download the NuGet package "microsoft.windowsappsdk.[version number]" and unpack it with 7-Zip, for example, and copy the DLL "Microsoft.WindowsAppRuntime.Bootstrap.dll" into the VB6 project folder. The unpacked NuGet package also contains some winmd files that must be extracted using the .NET tool "winmdidl.exe" to access the included idl files. The "Windows App SDK" can then be initialized and used via the MddBootstrapInitialize API of Microsoft.WindowsAppRuntime.Bootstrap.dll. All of this together is simply too complicated.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
VG.
I'm intrigued by XAML Islands and using it within VB6. I like where you are going with it. A quick question. I have used XML and other describing languages to create objects, buttons, controls &c but as always for any XML type UI framework it can be quite painful laying out complicated forms. I always think that for a UI Framework to be usable in the VB6 world there needs to be some attempt at a UI designer. Is there any such extant designer available that can be used for layout? Has anyone created such a useful tool that takes the chore out of layout hand-crafting?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
As far as I know, there is no XAML designer for VB6 yet. A web-based XAML designer might suffice: https://xaml.io/ Although I don't know if the generated XAML string is compatible with XAML Islands. There are four ways to create XAML controls in VB6.
1. Via the Windows App SDK
2. Via a XAML string
3. Via XamlDirect classes/interfaces
4. Via the usual XAML classes/interfaces
Everything runs via XAML Islands.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
So far I've been using the XAML string but it has quite a few limitations that are not so obvious at first. For example it failed to create the ColorPicker control you see in the screenshot above. Fortunately all controls can be created in code at runtime by calling their respective Factory method, so it was just a matter of creating the ColorPicker object and then adding it to the StackPanel's "Children" collection and presto, it popped up on screen. The same can be done with Bindings.
I haven't installed the "Windows App SDK" yet but from what you're saying it does sound quite off-putting. I thought it would just be a collection of IDL files just like the current Windows SDK is...
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
How good would it be to have a UI forms designer where you could specify the UI framework and it would then generate a form using XAML Islands, RC6/Cairo based widgets or native VB6 controls?
The one thing that I feel cripples RC6 design is the lack of a forms designer. I have a rich multi-tab form with 250+ controls and the laborious placement of each via code means that regardless of the UI framework being used for the main interface, I will always revert back to a VB6 form.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I think XAML design requires to detach yourself from the VB6 mindset where you obsess over exact pixel placement of each control. XAML controls are much more "loose" with their placement but still confined to the container in which they reside. This works very well with resizing and multiple monitors with different resolutions. It's pretty much exactly like web design. There have been many attempts at WYSIWYG web designers but all of them pretty short-lived, it just doesn't work as well as it should.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
So far I've been using the XAML string but it has quite a few limitations that are not so obvious at first. For example it failed to create the ColorPicker control you see in the screenshot above.
Hmm, it works perfectly fine for me with a XAML string.
Code:
xaml = "<Grid xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' " & _
"xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' " & _
"xmlns:d='http://schemas.microsoft.com/expression/blend/2008' " & _
"xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006' " & _
"mc:Ignorable='d'>" & _
"<StackPanel x:Name='StackPanel' Margin='5,5,5,5' BorderThickness='2,2,2,2' BorderBrush='Red' Background='#FFF8F8F8' CornerRadius='10,10,10,10'>" & _
"<ColorPicker x:Name='ColorPicker1' HorizontalAlignment='Left' Height='700' Margin='15,15,15,15' VerticalAlignment='Top' Width='200'/>" & _
"</StackPanel>" & _
"</Grid>"
Quote:
Originally Posted by
VanGoghGaming
I haven't installed the "Windows App SDK" yet but from what you're saying it does sound quite off-putting. I thought it would just be a collection of IDL files just like the current Windows SDK is...
For .NET, only the "Windows App SDK" and the corresponding NuGet package for the .NET project need to be installed. Winmd files are something like TLBs for VB6.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
I think XAML design requires to detach yourself from the VB6 mindset where you obsess over exact pixel placement of each control. XAML controls are much more "loose" with their placement but still confined to the container in which they reside. This works very well with resizing and multiple monitors with different resolutions. It's pretty much exactly like web design. There have been many attempts at WYSIWYG web designers but all of them pretty short-lived, it just doesn't work as well as it should.
I hear what you are saying but I've been there and done that and it is very limiting in comparison to what we experience already daily in VB6 and TB. If you want RAD people to adopt technologies in a RAD environment there needs to be something that approximates to a designer for the UI framework. Otherwise, it limits adoption. Clever, but painful to use? I have experience.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I am converting all my gauges to beta stage being reasonably happy with their operation and coding. Working my way through each one in turn bringing them up to standard.
https://www.vbforums.com/images/ieimages/2025/07/1.jpeg
Do you retrospectively upgrade your older code to your current knowledge and standards with a current implementation that reflects your current knowledge or do you leave old code to stew in its poor state?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
When working on new releases, updating code to new knowledge and standards as well as code-cleanup is part of the project.
Sometimes simple things as changing a For iCounter = 1 to myCollection.Count to For Each myObject in myCollection.Count. Or defining global constants instead of commenting each time to know what the code means. Like If myObject.Status = 1 Then to If myObject.Status = STATUS_ACTIVE Then.
Other times things like changing a Sub to a Function so that it can return codes that can be used in error-handling, or adding an additional parameter so that the same function can be used for more situations, instead of creating a new sub/function that is mostly the same as the existing one.
At times this is also driven by new functionality. E.g. when I introduced batch processing in one of the apps, I couldn't use the code for processing a single "document" as-is, since if something went wrong, it would show a messagebox with an error message. You obviously don't want that to happen in the middle of a batch process...
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Well that's good. I'm pleased to know that others do the same.
I tend to be a bit anal bringing my code up to scratch but its not as if my coding standards are particularly high in any case so I am unsure why I worry about it - but I do.
Quote:
Originally Posted by
Erwin69
If myObject.Status = STATUS_ACTIVE Then[/COLOR].
I like that, I do a bit of that here and there, for sure but possibly not all the time!
I have a template which forms the basis for all new programs of the same type from that point forward, the trouble is my template soon becomes stuck in the past as I learn new methods and new standards. It then soon becomes rather out of date. I am too focussed on my current project to want to retro-modify 20 or so programs to a new and improved standard. I tend to fret behind the scenes at the increasingly poor code in my creations until I obtain the mojo/courage to attack them and update them.
Like many here I am not good at admin. tasks, I prefer the creative ones.
A positive side effect of is that when I do get around to finally doing it, each program receives a raft of improvements.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I try to avoid touching things that are working well unless there's meaningful improvement in functionality or stability to be had. Not as worried about code quality unless it's a work project.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Well, mine are work projects, so the focus may be a bit different, but I agree with the principle that if it ain't broken, it doesn't need fixing. :bigyello:
One of the challenges I've been facing is that there is more and more code shared between the different apps, and while I try my best to avoid code duplication, it has been unavoidable at times. While the apps probably could convert as-is to tB, I plan to do a redesign to eliminate all duplication and prepare various components for future approaches like the batch processing I mentioned, and multi-thread opportunities.
One of the fun things of running my own company for me is the wide variety of things I do. Like Bert I am not a big fan of admin, though sending out invoices and seeing them being paid does give a good feeling! Chasing clients to pay or business partners to participate in beta-testing is a pain, but then helping sales to close deals, negotiate new partnerships, or even solve customer problems balances it out. And with clients and partners in 20+ countries, there is also the interesting aspect of cultural differences. Never a dull moment! :cool:
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Erwin69
One of the fun things of running my own company for me is the wide variety of things I do. Like Bert I am not a big fan of admin, though sending out invoices and seeing them being paid does give a good feeling! Chasing clients to pay or business partners to participate in beta-testing is a pain, but then helping sales to close deals, negotiate new partnerships, or even solve customer problems balances it out. And with clients and partners in 20+ countries, there is also the interesting aspect of cultural differences. Never a dull moment! :cool:
Sounds great - I envy you!
-
2 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
Coming very soon... easily display color fonts (i.e. color emojis) in labels in tB, VB6, Office UserForms, etc. With enhancements including angled text, gradients, font effects like underline limited to a specific range, several word wrap options, and more.
Attachment 195103
Attachment 195102
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
There's a lot of new information to absorb about .NET concepts I've never heard of before which I need to adapt into VB6.
Not so much .Net as it is WPF. My guess is that you had to learn about flow based positioning, control templating, triggers etc? Well those started with WPF which itself is based on HTML's way of doing things. The idea is to create UIs declaratively rather than programmatically.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Yes, all those and a lot more, information overload at its finest. There are too many acronyms to be honest, as far as I've gathered, WinRT is UWP, not WPF and there are quite a few incompatibilities between the two. I had to repeatedly tell Copilot to stop giving me examples with triggers as those don't work in UWP but usually there are workarounds for every incompatibility. I can't say I'm a fan of this declarative model but it certainly has its advantages.
And there's also the Binding concept that was new to me as well. Many properties of any control can be bound to some source and pull data from there automatically (and the binding can work two-way as well). Then there is the concept of Commands that can be used instead of events for some controls. Like I said, a lot of information overload...
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
See I've been going the opposite way, flood of details for a different way of doing things for drivers. So when I look at that extremely abstracted high level stuff, it's more difficult to absorb when I've been immersed in handling all every byte of memory allocation and freeing myself along with all that other low level stuff.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Not working on the RC5/6 desktop widgets at the moment until RichClient's capability for upgrade to 64bits is determined. Just a pause until I determine the sense of continuing in that direction. Don't want to get locked into a 32bit past when the future appears decidedly 64bits in capability with TwinBasic.
Digging into my old SteamyDock with renewed vigour, sorting out all the remaining bugs (and there are lots of those), upgrading my code incorporating what I now know, removing all those slow GetPrivateProfileString/WritePrivateProfileString APIs and replacing the settings.ini with random access data.
Getting it to a state where it is usable for anyone else and not just me.
https://www.vbforums.com/images/ieimages/2025/07/10.png
-
3 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
I used VB6 to write a small utility program for merging character portrait images in games.
Attachment 195192
Github project address: https://github.com/luanshizhimei/AzurLanePaintComposite
This might be slightly off-topic, but I'm particularly passionate about using VBScript to implement various small games.
Attachment 195193
Attachment 195194
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
It is not off-topic. VBScript is near-as-damnit VB6.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
You must be thinking about converting your VBScript games to VB6 or TwinBasic.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
-Franky-
@VanGoghGaming: XAML controls in conjunction with the "Windows App SDK" would be the next step. However, I'm afraid that the "Windows App SDK" is too complicated for VB6, since it's actually only intended for .NET. First, you need to install the "Windows App SDK" in 32-bit and/or 64-bit versions. For VB6, you need to copy the installed files of the "Windows App SDK" from the "C:\Program Files\WindowsApps" folder, because some winmd files are required there. Then you need to download the NuGet package "microsoft.windowsappsdk.[version number]" and unpack it with 7-Zip, for example, and copy the DLL "Microsoft.WindowsAppRuntime.Bootstrap.dll" into the VB6 project folder. The unpacked NuGet package also contains some winmd files that must be extracted using the .NET tool "winmdidl.exe" to access the included idl files. The "Windows App SDK" can then be initialized and used via the MddBootstrapInitialize API of Microsoft.WindowsAppRuntime.Bootstrap.dll. All of this together is simply too complicated.
Hey Franky, have you tried to see if WinUI 3 controls can be loaded using the "registration-free" method as described in this blog post?
I have tried it with a WinUI 2 control, such as the NumberBox for example, by copying the "Microsoft.UI.Xaml.dll" file in the current folder and updating the manifest:
Code:
<file name="Microsoft.UI.Xaml.dll">
<activatableClass name="Microsoft.UI.Xaml.Controls.NumberBox" threadingModel="both" xmlns="urn:schemas-microsoft-com:winrt.v1" />
</file>
Then the NumberBox control can be created successfully in code like this:
Code:
hRes = RoGetActivationFactory(StrRef("Microsoft.UI.Xaml.Controls.NumberBox"), VarPtr(IID_NumberBoxFactory), NumberBoxFactory)
Set NumberBox = NumberBoxFactory.CreateInstance
The object is valid, you can call its methods and set its properties but DesktopWindowXamlSource.Content simply refuses to render it. I am thinking that WinUI 3 controls behave differently in this regard since they don't need DesktopWindowXamlSource at all.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
Hey Franky, have you tried to see if WinUI 3 controls can be loaded using the "registration-free" method as described in this blog post?
I haven't tried that yet. My first attempt with the Windows App SDK was the "Title bar customization" (https://learn.microsoft.com/en-us/wi...elop/title-bar) and how to get it working in an unpacked, non-.NET Win32 application. If I remember correctly, the Microsoft.WindowsAppRuntime.Bootstrap.dll is only included in the corresponding NuGet package and not in the Windows App SDK installation. At least I was able to customize the title bar and create new windows/dialogs, etc., using it. I was also able to create WinUI3 buttons, similar to WinRT. However, other WinUI3 controls only worked partially or couldn't be created. It might actually work better if you use a RegFree option here as well. I'm currently busy with other things, so I don't have time to write a few lines of code right now.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I am enjoying testing TwinBasic, importing various projects, so far all are importing successfully, with some problems in the designer, but compiling and running well.
https://www.vbforums.com/images/ieimages/2025/08/3.png
Above are my dock, the clock/calendar and a sample Panzer gauge chosen at random for migration. They all function at runtime. All running with TwinBasic and competently too. Each a little slower that its VB6 equivalent, noticeably on startup where all the gubbins is sorted out beforehand. In operation, very similar.
The designer, however had a wobble with recognising controls on the standard VB6 form with one of Krool's slider controls on the form. I can probably find an alternative method of adding one of his controls, done currently by a single OCX but when it comes to importing TB has an issue that I have raised here: https://github.com/twinbasic/twinbasic/issues/2211
https://www.vbforums.com/images/ieimages/2025/08/4.png
It isn't meant to look like that.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Hi all, been wanting to post in this thread for a while. This is a VB6 app project of mine. Useful for finding devices on your network and pulling info from them. Free for most home networks with up to 50 network devices.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
That looks very nice. Impressive.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
It does look impressive, so good to see these VB6 apps doing real-life jobs. I would imagine this is rather complex code. The name Slitheris does give a rather scary aspect though. It certainly doesn't appear to come from the better side of Hogwarts.
Reminds me of this: https://youtu.be/5a0odh8ro08?si=3O35v-lQBGXxnT4B
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Thanks. Yeah, we’re looking to change it to simply Komodo Labs Network Discovery. We just haven’t gotten around to it. And yes, very complex. Many years of work. Probably why we haven’t been able to change the name yet. :)
Quote:
Originally Posted by
yereverluvinuncleber
It does look impressive, so good to see these VB6 apps doing real-life jobs. I would imagine this is rather complex code. The name Slitheris does give a rather scary aspect though. It certainly doesn't appear to come from the better side of Hogwarts.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Tried it, tested it on VirusTotal first, all good. Very impressed by its capability to sniff out a network and identify the components so well. That could easily come part of my tool box. That is a credit to you and VB6.
Have you tried conversion to TwinBasic yet? You'll find that it will test TwinBasic's import capabilities and give TB some good technical feedback in the process.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
10Tec's iGrid was one of the first commercial products written in VB6 to be converted to tB with x64 support. (Also most CodeJock components have x64 versions as they were made in C++ and also designed to work in .NET)
So room for updates there too :)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
fafalone
(Also most CodeJock components have x64 versions as they were made in C++ and also designed to work in .NET)
Probably C++/CLI. I forgot that even existed.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I have just knocked together a new "getting the ball rolling" thread solely for TwinBasic Projects, same rules as this thread.
You'll find it here: https://www.vbforums.com/showthread....you-working-on
From this point onward I will keep my TwinBasic project show-and-tells on that thread, please join me there. If we assume that TB is the natural successor to VB6 and that TB usage may grow, it makes sense to start that thread now and see how it grow in the futures. I will have plenty to show there.
Personally, I'd like to see some of the old theTrick, Wqweto, LaVolpe, Elroy and even Niya's old VB6 creations converted to TwinBasic and displayed there. Faf. of course will pay a regular visit, I hope.
I may drop a link here to that thread if something relevant to VB6 pops up.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Tried it, tested it on VirusTotal first, all good. Very impressed by its capability to sniff out a network and identify the components so well. That could easily come part of my tool box. That is a credit to you and VB6.
Have you tried conversion to TwinBasic yet? You'll find that it will test TwinBasic's import capabilities and give TB some good technical feedback in the process.
Thanks. Glad you like it!
Yeah, went through a lot of trouble for the software to pass anti-virus checks. The EXE EV (Extra Validation) cert definitely helps.
Haven't gotten to try TwinBasic yet. I keep hearing about RAD Basic too. Could see those 2 devs working together.
Like fafalone said, 10Tec has worked with the TwinBasic dev to get their iGrid to work well with together. Highly recommend 10Tec's iGrid.. been using it since its creation in the early 2000's.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
CrazyDude
Haven't gotten to try TwinBasic yet. I keep hearing about RAD Basic too. Could see those 2 devs working together.
The two chaps/teams on TB/RB are working using different approaches, one seems to be considerably more advanced than the other. At the moment, I have some fairly complex programs that work out-of-the-box with TwinBasic so I would strongly suggest you give it a try.