-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
-Franky-
What is ultimately missing is a corresponding XAML designer for VB6 or for TwinBasic that creates the XAML string.
That is what is needed, we have the TB designer, perhaps the first step is a converter from the (JSON?) format that it creates, into a XAML format.
There must be, somewhere, an open source graphical interface designer that could form the basis of a separate designer that can handle the extended capabilities of XAML based forms.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
In truth though, I don't see many current MS -inspired apps using such gradients and fancy graphics. I just see square unadorned boxes with a blue background or a white background, devoid of features with big bold text.
I am sure we can bang something out that matches the graphical quality without all the underlying hoohah. A simple converter might be the way to go which you can add functionality as it is required. Olaf has created such a one-way converter to convert traditional VB6 forms and some of its controls to RC/forms and widgets.
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
I don't see any ZIP files there, I would really like to take a look at your XAML code for those controls, you obviously have so much more experience...
It could also be that the ZIPs are buried in other threads. Whatever. This ZIP only uses the XAML interfaces. As you can see, there are a lot of classes and only a few controls (without events) are finished so far. I'm not working on this project any more because it's just too extensive for me alone.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
I really don't see where this adversity comes from. The Button control doesn't count since it's way too simple compared to others. Why would you want third-party controls when you can have all of them already included with the operating system? And didn't the XYPlorer guy say he designed his UI using PictureBoxes and GDI? I mean, that's entirely on another level.
The object-oriented nature of WinRT event handlers completely takes subclassing and thunks out of the equation. Surely you can appreciate that, no?
Because using those 3rd party controls is easier and the source is right there for any customization you might want to make. Everything for them is also included in the OS. It's just a matter of importing prewritten code modules-- something you also need to do to host XAML controls... dropping in a few usercontrols is no different than dropping in the dozens of modules and interface defs to support XAML or WinRT, and the code you're importing is generally simpler and much more easy to extend vs writing the extensive work required for everything XAML and WinRT. I can't understand how one could view WinRT dynamic template-based interface conversions for events as simpler than a traditional subclass unless you're using them in .NET (see -Franky-'s last comment), which honestly seems like it should be the end result if you strongly prefer the way .NET controls operate and isolate you from the low level implementation. For me, that's the whole point of VB6 and now tB... to have the high level RAD without giant roadblocks and massive ever-changing frameworks getting between you and dropping into the low level details when you need to. There's nothing inherently wrong with preferring the .NET way, but then why not just use .NET?
Man, poor uncleber is gonna be maaaad with us now because we're definitely straying wayy off topic :D
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
No, I agree with you. That's why I am not going in that direction, seems like a lot of hassle just to portray some dull, unadorned bland boxes on a win !! (sic) machine somewhere. I can produce more or less anything in Photoshop and VB6 and I don't need compatibility with current/future tech, so for me, the question is, why bother?
I think that for VB6 to find its niche it needs to be used for doing things that aren't being done well enough by others.
That brings us straight back to "Which VB6 projects are you working on?"
I suppose what we should do is to invite Wayne to tell us what he is working on with regard to VB6 / TwinBasic as its future incorporates a lot of what we are now discussing.
- and that allows me to drop in an image of the TwinBasic IDE beta 645, with the light theme for VB6bold (modified), the two forms I am working on now, and the GDI+ steamyDock at the bottom which is now TwinBasic too.
https://www.vbforums.com/images/ieimages/2025/01/3.jpeg
As I understand it, The TB IDE is written in TwinBasic, (Faf. you can correct me if I am incorrect) but the monaco editor itself is written in javascript and embedded somehow.
-
2 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
fafalone
I can't understand how one could view WinRT dynamic template-based interface conversions for events as simpler than a traditional subclass unless you're using them in .NET (see -Franky-'s last comment), which honestly seems like it should be the end result if you strongly prefer the way .NET controls operate and isolate you from the low level implementation. For me, that's the whole point of VB6 and now tB... to have the high level RAD without giant roadblocks and massive ever-changing frameworks getting between you and dropping into the low level details when you need to. There's nothing inherently wrong with preferring the .NET way, but then why not just use .NET?
I still don't understand what dynamic interfaces you keep referring to. Every single event interface I've encountered (hundreds so far) has been extremely well defined with its own unique IID and there's no mistaking it (I don't even think it would work any other way). I've even posted examples of using such WinRT events in VB6 as well as tB. In fact this is the appeal of WinRT, other than that I wouldn't stray from the VB6/tB syntax that allows far more freedom than managed code, so moving to .NET is a no-go for all the reasons you mentioned yourself in many other threads.
These XAML controls just look too good to pass and their functionality is flawless (you won't see the dreaded "Automation Error" DLL-Hell ever!). They even support the currently selected system theme on the fly (Light/Dark). Here's how a TextBox with context menu looks like in each theme:
Attachment 193906
Attachment 193907
I wouldn't want to simulate all that in PhotoShop if it can be helped! Even if Microsoft will come up with another Framework in the future they always keep 100% backward compatibility with everything they released in the past. Hell even your Ribbon from the stone age still works! :D
Quote:
Man, poor uncleber is gonna be maaaad with us now because we're definitely straying wayy off topic :D
I made sure to post screenshots, so I'm in the clear! ;)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
Hell even your Ribbon from the stone age still works! :D
That is SO cruel.
Quote:
Originally Posted by
VanGoghGaming
I wouldn't want to simulate all that in PhotoShop if it can be helped!
Nor me! I only do it for my own contrived interfaces.
Quote:
Originally Posted by
VanGoghGaming
I made sure to post screenshots, so I'm in the clear! ;)
You are in the clear.
So Van, what do you suggest? What 'should' we be doing to implement such lovely controls/events in VB6?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
The implementation part is piece of cake (see the XAML Buttons code complete with Click events that I posted earlier). What you can't see in that example are the dozens of interfaces translated from the Windows SDK into VB syntax but I'll post a tB project shortly including those interfaces for everyone interested in having a peak. Like Franky said it's a lot of work since the SDK is so vast but even the WinDevLib wasn't made in a day! ;)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
So, ultimately, to be usable, do you expect that there ought to be a separate XAML designer that TB or VB6 can use and then a 'package' that allows TB to harness the properties and events, or for VB6, a series of classes and modules that would allow VB6 the same access? Or do you think it is only sensible to think of TB as the target?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Well for IID-free templates you don't even have to get into events. Take a simple bitmap interface... what's the IID for the interface returned for the FileExtensions member of IBitmapCodecInformation?
But did you just say there's *dozens* of interfaces you had to translate just to get a button with clicks?
That's why i didn't pursue it. You either custom write only minimal implementations with exactly the things you want, which is only the dozen of interfaces full of stubs, or you'll have a WinDevLib-sized project for just a fraction of the most common items.
Quote:
(you won't see the dreaded "Automation Error" DLL-Hell ever!)
With the exception of the closed source stuff, you never get this issue with UserControls if you use them as their .ctl source in your project, which I always do unless I have absolutely no practical alternative to a closed source component, which is very rare. The typelibs by me, krool, and The trick don't have serious registration issues because we avoid associating GUIDs with structs and enums which triggers the more complicated registration issues.
But also, I've encountered plenty of apps that demand I install some specific version of the .NET Framework because it didn't come with Win10. And the dependency hell in VS for this stuff makes VB6 active-x dll hell seem like a fun time.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
VanGoghGaming
Even this simple button control blows the original VB6 CommandButton out of the water. There are tons of XAML controls (
https://learn.microsoft.com/en-us/do...orkdesktop-4.8) all Unicode-enabled, DPI-aware and already included with Windows, just ready to plug and play. This is the bleeding edge, you can't get a more modern UI than this.
Now you have an idea of at least some of things that drew a lot of us to .Net. WPF programmers for example have been enjoying these things for years. ;)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
fafalone
But also, I've encountered plenty of apps that demand I install some specific version of the .NET Framework because it didn't come with Win10. And the dependency hell in VS for this stuff makes VB6 active-x dll hell seem like a fun time.
I can't install my favourite game any more due to it requiring earlier components namely Microsoft .NET Framework 3.5, Microsoft XNA Framework Redistributable 3.1. Can't even find those any more and when you do the versions just don't install on later Windows
https://www.vbforums.com/images/ieimages/2025/01/9.png
I have to keep an old Win 7 laptop just to play this game.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Niya
Now you have an idea of at least some of things that drew a lot of us to .Net. WPF programmers for example have been enjoying these things for years. ;)
What are you working on Niya?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
What are you working on Niya?
I haven't done anything in a while with regard to programming. The last thing I was working on for VB6 was a pet project intended for the CodeBank, something like a hash table if I remember correctly. I might get around to finishing that if I ever get the mood.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
That is what is needed, we have the TB designer, perhaps the first step is a converter from the (JSON?) format that it creates, into a XAML format.
You actually don't need a designer, not as much as you would for VB6/WinForms style project anyway. It's nice to have but not essential. There are some .Net 3rd party project types that use XAML but don't provide a designer. In these cases, we just run the program to see what it looks like and sometimes we get a hot-reload feature where changes in the XAML are reflected while the program is running.
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
fafalone
Well for IID-free templates you don't even have to get into events. Take a simple bitmap interface... what's the IID for the interface returned for the FileExtensions member of IBitmapCodecInformation?
That's as straightforward as it gets. The FileExtensions property of IBitmapCodecInformation returns an IVectorView_HSTRING (that is to say a read-only array of strings) with an IID of:
Code:
2F13C006-A03A-5F69-B090-75A43E33423E
This IVectorView_HSTRING interface is rather ubiquitous, you'll find it in many places since arrays of strings are always in demand. As I've mentioned before (also told you on Discord in response to your GitHub comments about these elusive "dynamic" interfaces which turned out to be rather static in the end), all WinRT interfaces are well-defined and neatly organized. You only need to write them once and then you can use them forever. I'd say it's worth the hassle:
Code:
[InterfaceId("2F13C006-A03A-5F69-B090-75A43E33423E")]
Interface IVectorView_HSTRING Extends IInspectable
Function GetAt(ByVal Index As Long) As LongPtr
Property Get Size() As Long
Function IndexOf(ByVal hString As LongPtr, Index As Long) As Boolean
Function GetMany(ByVal StartIndex As Long, ByVal Length As Long, Items As LongPtr) As Long
End Interface
[InterfaceId("400CAAF2-C4B0-4392-A3B0-6F6F9BA95CB4")]
Interface IBitmapCodecInformation Extends IInspectable
Property Get CodecId() As UUID
Property Get FileExtensions() As IVectorView_HSTRING
Property Get FriendlyName() As LongPtr
Property Get MimeTypes() As IVectorView_HSTRING
End Interface
[InterfaceId("438CCB26-BCEF-4E95-BAD6-23A822E58D01")]
Interface IBitmapDecoderStatics Extends IInspectable
Property Get BmpDecoderId() As UUID
Property Get JpegDecoderId() As UUID
Property Get PngDecoderId() As UUID
Property Get TiffDecoderId() As UUID
Property Get GifDecoderId() As UUID
Property Get JpegXRDecoderId() As UUID
Property Get IcoDecoderId() As UUID
Function GetDecoderInformationEnumerator() As IVectorView_BitmapCodecInformation
Function CreateAsync(ByVal RandomAccessStream As IRandomAccessStream) As IAsyncOperationBitmapDecoder
Function CreateWithIdAsync(ByVal Data1 As Long, ByVal Data2 As Long, ByVal Data3 As Long, ByVal Data4 As Long, ByVal RandomAccessStream As IRandomAccessStream) As IAsyncOperationBitmapDecoder
End Interface
If you wanted to enumerate all BitmapDecoders available in your system as well as their supported file extensions, you would call the GetDecoderInformationEnumerator of the IBitmapDecoderStatics interface:
Code:
Friend Function GetDecoderInformation() As Collection
Dim i As Long, j As Long, sFileExtensions As String
Set GetDecoderInformation = New Collection
With BitmapDecoderStatics.GetDecoderInformationEnumerator
For i = 0 To .Size - 1
With .GetAt(i).FileExtensions
sFileExtensions = vbNullString
For j = 0 To .Size - 1
sFileExtensions = sFileExtensions & NewString(.GetAt(j)).GetString & IIf(j < .Size - 1, ", ", vbNullString)
Next j
End With
GetDecoderInformation.Add NewString(.GetAt(i).FriendlyName).GetString & " (" & sFileExtensions & ")"
Next i
End With
End Function
and the result should be something like this:
Attachment 193910
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
See to me it's not so straightforward when the definition is Windows.Foundation.Collections.IVectorView<HSTRING>** value), that GUID doesn't exist in windows.foundation.collections.h, and you have to hunt it down elsewhere where it's not in a regular interface format, but instead obtained from
Code:
#ifndef DEF___FIVectorView_1_HSTRING_USE
#define DEF___FIVectorView_1_HSTRING_USE
#if !defined(RO_NO_TEMPLATE_NAME)
namespace ABI { namespace Windows { namespace Foundation { namespace Collections {
template <>
struct __declspec(uuid("2f13c006-a03a-5f69-b090-75a43e33423e"))
IVectorView<HSTRING> : IVectorView_impl<HSTRING>
{
static const wchar_t* z_get_rc_name_impl()
{
return L"Windows.Foundation.Collections.IVectorView`1<String>";
}
};
which you then have to combine with the plain IVectorView interface that *is* where the interface says it is, not neatly defined like the codec info interface, and is instead:
Code:
template <class T>
struct IVectorView_impl<T, false> : IInspectable /* requires IIterable<T> */
{
private:
typedef typename Windows::Foundation::Internal::GetAbiType<T>::type T_abi;
typedef typename Windows::Foundation::Internal::GetLogicalType<T>::type T_logical;
public:
typedef T T_complex;
virtual HRESULT STDMETHODCALLTYPE GetAt(_In_ unsigned index, _Out_ T_abi *item) = 0;
virtual /* propget */ HRESULT STDMETHODCALLTYPE get_Size(_Out_ unsigned *size) = 0;
virtual HRESULT STDMETHODCALLTYPE IndexOf(_In_opt_ T_abi value, _Out_ unsigned *index, _Out_ boolean *found) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMany(_In_ unsigned startIndex, _In_ unsigned capacity, _Out_writes_to_(capacity,*actual) T_abi *value, _Out_ unsigned *actual) = 0;
};
. "That's as straightforward as it gets. " -- yup, you can't see the issue there?
I'm glad you find that straightforward and "well defined and neatly organized" (LOL) but to me it's a much bigger pain than just going through WIC, which is almost certainly what it's abstracting. And something that would be extremely difficult to make an automated tool for... WDL wouldn't have been possible as a one-man hobby project if I didn't have a bunch of routines to partially convert stuff.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I can see the issue there and I don't pretend to understand any more than you do. As far as I've gathered there are many types of such IVectorView interfaces and they all have those 4 methods. The only difference is the datatype they handle (HSTRING in this case). I've also noticed there is a distinct GUID for each type of IVectorView and that it's not hard to find. VB/tB are not smart enough to use generic types like that so you need to explicitly declare this interface for each type you want to use and its corresponding GUID (there's quite a few but not that many). Other than that I don't know what to say.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
@yereverluvinuncleber It was not my intention to start what I consider to be a pointless discussion about whether or not to use WinRT, XAML etc. Somehow it reminds me of pointless discussions about whether .NET, VB6 or now TB is the better programming language. I would suggest that the discussion can be continued in my thread. -> https://www.vbforums.com/showthread....=1#post5667572
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Good Man Franky! Thankyou. Feel free to post an image and a description of whatever you achieve, it is all interesting.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
In truth though, I don't see many current MS -inspired apps using such gradients and fancy graphics. I just see square unadorned boxes with a blue background or a white background, devoid of features with big bold text.
I am sure we can bang something out that matches the graphical quality without all the underlying hoohah. A simple converter might be the way to go which you can add functionality as it is required. Olaf has created such a one-way converter to convert traditional VB6 forms and some of its controls to RC/forms and widgets.
I wanted to comment on this a bit. I've used XAML to do some things that are reasonably cool, for me. I suck at graphics in general, so bland, gray, boxes mean that what I write doesn't look like an explosion in a pizza factory, but I did get into XAML for one large-ish program and it turned out pretty well. To be fair, the bulk of the graphics in that program are not mine, since the background is an aerial imagery map control, but I made all the other parts, and some don't even look like they were drawn by a spastic grade-school kid.
Based on that, though, I would say a couple things: Most programs won't use fancy stuff because it's easier not to. That's a deeper statement than it might appear. For one thing, WinForms controls are straight up simpler than XAML. The second part is that coming up with a graphical solution takes more thought than putting rectangles on a screen. Those two points will ensure that simpler interfaces will be more common in general.
For the first part: All controls are somewhat fake. Ultimately, everything is just pixels on a screen. Whether a button looks 3D, or this form appears to be on top of that form, or the background moves while the foreground remains stationary, it's still all just pixels on a screen. The designer is facilitating how those pixels are drawn. The concept of a window, the concept of a button, those are just ways to simplify drawing pixels. I have one program where everything is interactive, and looks like a bunch of controls, but it's really just bitmaps drawn to the screen without any "controls" at all. The mouse click on an icon is really just noting that the mouse clicked on a specific part of the bitmap and doing something different as a result. I had started with controls on controls, it was just too slow, so I went to drawing pixels on a screen and noting which pixels mouse clicks happened on. All controls are like that at some level, they are just packaged up in a way that makes them easier to build with.
Putting rectangles on the screen is always going to be easier than putting abstract shapes on the screen. A rectangle is easy to describe with an Top, Left, Width, and Height, while tilted rectangles require at least a rotation angle, and abstract shapes have no defined set of attributes. The point is: the more aspects of a control that you can manipulate, the more complicated the designer has to be. For that reason, WinForms will always be easier than XAML. They are both just drawing pixels to the screen, though, and you can do everything you want without XAML. The point of XAML is to make it easier to do more. You could do the same 'more' with WinForms, just not as easily.
That's a tradeoff that is impossible to optimize. The more functionality you add to your designer, the more complicated the designer becomes, the more you have to learn, and the more difficult it is to use. All these tools and technologies are just different points along the continuum from simple blocks on the screen up to, "draw every pixel yourself." You use the simple designer when you want a simple solution, you use a more complex designer when a more complicated solution would be better. In that context, yes you CAN use the simple designer to create complex interfaces, but SHOULD you? That's up to the individual.
For the program where I went to drawing everything on the fly using MonoGame, XAML might have worked (it came down to speed of drawing, and XAML uses the GPU, so it might have been quick enough)...but it may have also constrained me. It sure would have been easier, had it worked, as a complicated designer is still simpler than composing every image 'by hand'. The program had some serious complicating features, though, and I don't know whether XAML would have helped or gotten in the way.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Right, well, that is what I have been doing all along when it comes to advanced graphical results, using GDI+ in my dock it is just images drawn on a transparent form. My code knows the x & y boundaries of the images (stored in an array) and it notes the mouse click position and compares, the icon in question does something, animates, opens a program &c.
https://www.vbforums.com/images/ieimages/2025/01/4.jpeg
With regard to making your own controls, well that is how Olaf's simple PSD parser does it. It takes each layer of the PSD (any shape at all) and dynamically creates a RC widget from it, complete with all the basic events you might need and of course you can add your own. Then you choose what happens in your logic. This was the same approach I used when I coded in .js using Konfabulator. We used a .js script that would extract the layers and modify the XML descriptor file to describe each layer separately, you then captured the events on a layer by layer basis as you would do on a VB6 control - and added logic. It is very flexible and allows you to make the design you want. No restrictions and not too difficult.
https://www.vbforums.com/images/ieimages/2025/01/10.png
My clock /calendar as described in the PSD file. I drop that file in my RES folder and when the program is run the simple parser pops the clock on the screen. I just handle the events.
I don't like what Niya said, in that the XAML code he wrote was done without a designer. For me, that's just not good enough. If you don't have a designer then you end up with simple designs. That I suppose is the current paradigm. I call my graphics 'advanced' in that they are complex and multifaceted. I look upon the typical MS-inspired apps/interfaces as 'basic' and 'simple', to me they are easy and as they have been done like that for years, thus are 'old fashioned'.
P.S. You also, do not need expensive old photoshop to make the design and the layers. You can use good ol' Gimp. It handles layers in the same manner and outputs a PSD when told to do so. Even easier.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Right, well, that is what I have been doing all along when it comes to advanced graphical results
I'm sure you are, but you have artistic talent, whereas my drawing skills maxed out before my age could be measured in years. Fortunately, icons require only that level of talent, there are plenty of free images out there, and I have friends. Between those three...things are passable.
Also, to be clear, I didn't draw my own controls because WinForm controls were limiting. I drew my own because I needed to squeeze every cycle out of the CPU, and when that wasn't enough, I needed to shift all the drawing to the GPU. It was a need for speed, not art.
I had learned to avoid art. I spent a couple years working on what could have been a cool idea (for a fish guy). I eventually abandoned the project because I became utterly aware that it was beyond me. The logic was not, as that was just a creative AI (especially for the 90s) with some innovative means of learning. What was beyond me was representing the data in a way that was even vaguely acceptable. What was required was a 3D representation. I read dozens of books on the subject (it was the 90s, the internet wasn't what it is today). They would say, "to rotate the object, apply this transform." The math and the code were clear, what nobody could tell me was whether or not I wanted to rotate the object. I couldn't picture how it SHOULD work, so I had no idea whether rotating the object was the right thing to do or not.
That situation may have improved with newer game engines. If I can say that the object is at X,Y,Z, while I am at X1, Y1, Z1 and looking in this direction, I could probably get by....but in the meantime, AI has moved on, and so have I.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
-Franky-
It could also be that the ZIPs are buried in other threads. Whatever. This ZIP only uses the XAML interfaces. As you can see, there are a lot of classes and only a few controls (without events) are finished so far. I'm not working on this project any more because it's just too extensive for me alone.
Where can I find the XAML interfaces? I open and run your project on my Win10 computer and the frmMain doesn't show anything.
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
@-Franky-, @VanGoghGaming,
Could you use XAML to make the following GUI? I'd like to compare the amount of work and complexity of XAML to the traditional VB6.
If implementing the following UI with XAML requires more than 1000 lines of code, the benefits of XAML are outweighed by bloat and complexity.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
SearchingDataOnly
Where can I find the XAML interfaces? I open and run your project on my Win10 computer and the frmMain doesn't show anything.
The project consists of several classes and each class contains the XAML interfaces (not complete and there are no events yet). For XAML Islands to work, a manifest must be present. See here: https://learn.microsoft.com/en-us/wi...cation-project For this to work directly in the IDE, a manifest must also be present for the VB6.EXE. If the project compiles (I don't think this works because some of the class names are too long), the manifest is present in the RES.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
SearchingDataOnly
@-Franky-, @VanGoghGaming,
Could you use XAML to make the following GUI? I'd like to compare the amount of work and complexity of XAML to the traditional VB6.
If implementing the following UI with XAML requires more than 1000 lines of code, the benefits of XAML are outweighed by bloat and complexity.
First, you need to understand that it was just a question of whether XAML can be used in VB6 at all. Second, XAML controls can be created in three different scenarios. Using the corresponding XAML interfaces of the XAML controls, using the XAML direct interfaces or using a XAML string. Third, you cannot compare standard controls with XAML controls. Just look at the XAML Button class and see how many properties and events it has. Fourth, XAML is just one way of designing a UI. Just like with RC6. Everyone can decide for themselves whether to use it.
To answer your question, I have little experience with XAML myself. You would have to ask someone who has been programming in UWP or WPF for years. They will put together the right XAML string for you. At the end, you still have to take care of the events you need.
-
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?
Just for comparison. This is what a XAML UI would look like. The XAML string looks like this:
Code:
<Page 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'>
<Grid Background='#FFF3F3F3'><Grid.RowDefinitions><RowDefinition Height='37'/><RowDefinition Height='20'/><RowDefinition Height='2*'/><RowDefinition Height='30'/><RowDefinition Height='*'/><RowDefinition Height='*'/><RowDefinition Height='*'/><RowDefinition Height='*'/><RowDefinition Height='*'/><RowDefinition Height='*'/></Grid.RowDefinitions>
<Grid.ColumnDefinitions><ColumnDefinition Width='*'/><ColumnDefinition Width='*'/><ColumnDefinition Width='*'/><ColumnDefinition Width='*'/></Grid.ColumnDefinitions>
<Button Grid.Row='0' Grid.ColumnSpan='4' x:Name='Button0' Content='=' FontSize='18' HorizontalAlignment='Left' Width='35' Height='35' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<TextBlock Grid.Row='0' Grid.ColumnSpan='4' x:Name='TextBlock0' Text='Standard' FontSize='18' Margin='40,6,1,1' FontWeight='600'/>
<TextBlock Grid.Row='1' Grid.ColumnSpan='4' x:Name='TextBlock1' Text='0 =' HorizontalAlignment='Right' Margin='8,1,8,1' Foreground='#FF616161'/>
<Viewbox Stretch='Uniform' Grid.Row='2' Grid.ColumnSpan='4' HorizontalAlignment='Right'>
<TextBlock x:Name='TextBlock2' Text='0' FontSize='50' FontWeight='600' TextAlignment='Right' Margin='8,1,8,1'/>
</Viewbox>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button1' Content='MC' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button2' Content='MR' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='82,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button3' Content='M+' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='163,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button4' Content='M-' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='244,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button5' Content='MS' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='325,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='4' Grid.Column='0' x:Name='Button6' Content='%' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='5' Grid.Column='0' x:Name='Button7' Content='¹/x' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='6' Grid.Column='0' x:Name='Button8' Content='7' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='7' Grid.Column='0' x:Name='Button9' Content='4' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='8' Grid.Column='0' x:Name='Button10' Content='1' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='9' Grid.Column='0' x:Name='Button11' Content='+/-' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='4' Grid.Column='1' x:Name='Button12' Content='CE' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='5' Grid.Column='1' x:Name='Button13' Content='x²' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='6' Grid.Column='1' x:Name='Button14' Content='8' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='7' Grid.Column='1' x:Name='Button15' Content='5' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='8' Grid.Column='1' x:Name='Button16' Content='2' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='9' Grid.Column='1' x:Name='Button17' Content='0' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='4' Grid.Column='2' x:Name='Button18' Content='C' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='5' Grid.Column='2' x:Name='Button19' Content='?' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='6' Grid.Column='2' x:Name='Button20' Content='9' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='7' Grid.Column='2' x:Name='Button21' Content='6' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='8' Grid.Column='2' x:Name='Button22' Content='3' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='9' Grid.Column='2' x:Name='Button23' Content=',' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='4' Grid.Column='3' x:Name='Button24' Content='?' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='5' Grid.Column='3' x:Name='Button25' Content='÷' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='6' Grid.Column='3' x:Name='Button26' Content='*' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='7' Grid.Column='3' x:Name='Button27' Content='-' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='8' Grid.Column='3' x:Name='Button28' Content='+' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='9' Grid.Column='3' x:Name='Button29' Content='=' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FF004275' Background='#FF004275' Foreground='#FFFFFFFF'/>
</Grid>
</Page>
The nice thing about this is that you don't have to worry about resizing the controls and font size where the result is displayed. They adjust automatically. The question marks in the XAML string ('?') are later replaced by Unicode characters in the actual VB6 code. In the VB6 code the event handling also takes place when you click a button.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
By comparison, here is one of my calculators, not working on it at the moment, this particular version was a resistor value calculator.
https://www.vbforums.com/images/ieimages/2025/01/11.png
N n n n n nineteen controls.
-
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
jpbro
It has a certain similarity....the problem is that it must have a lot of manual work to make the theme
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I am afraid to tell you that my actual desktop is a lot less steampunk than that though it has a certain charm. My desktop is an Apple G5 that I stripped out all the old gubbins (2 cores at 2.5ghz) and replaced with a decent modern PSU, motherboard GPU and a 4.5ghz i7 CPU and several SSDs. It looks like a Apple G5 but runs a lot quicker. Not steampunk though.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
-Franky-
Just for comparison. This is what a XAML UI would look like. The XAML string looks like this:
Code:
<Page 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'>
<Grid Background='#FFF3F3F3'><Grid.RowDefinitions><RowDefinition Height='37'/><RowDefinition Height='20'/><RowDefinition Height='2*'/><RowDefinition Height='30'/><RowDefinition Height='*'/><RowDefinition Height='*'/><RowDefinition Height='*'/><RowDefinition Height='*'/><RowDefinition Height='*'/><RowDefinition Height='*'/></Grid.RowDefinitions>
<Grid.ColumnDefinitions><ColumnDefinition Width='*'/><ColumnDefinition Width='*'/><ColumnDefinition Width='*'/><ColumnDefinition Width='*'/></Grid.ColumnDefinitions>
<Button Grid.Row='0' Grid.ColumnSpan='4' x:Name='Button0' Content='=' FontSize='18' HorizontalAlignment='Left' Width='35' Height='35' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<TextBlock Grid.Row='0' Grid.ColumnSpan='4' x:Name='TextBlock0' Text='Standard' FontSize='18' Margin='40,6,1,1' FontWeight='600'/>
<TextBlock Grid.Row='1' Grid.ColumnSpan='4' x:Name='TextBlock1' Text='0 =' HorizontalAlignment='Right' Margin='8,1,8,1' Foreground='#FF616161'/>
<Viewbox Stretch='Uniform' Grid.Row='2' Grid.ColumnSpan='4' HorizontalAlignment='Right'>
<TextBlock x:Name='TextBlock2' Text='0' FontSize='50' FontWeight='600' TextAlignment='Right' Margin='8,1,8,1'/>
</Viewbox>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button1' Content='MC' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button2' Content='MR' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='82,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button3' Content='M+' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='163,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button4' Content='M-' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='244,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='3' Grid.ColumnSpan='4' x:Name='Button5' Content='MS' FontSize='12' HorizontalAlignment='Left' Width='80' Margin='325,1,1,1' CornerRadius='2,2,2,2' BorderThickness='0,0,0,0' Background='#FFF3F3F3'/>
<Button Grid.Row='4' Grid.Column='0' x:Name='Button6' Content='%' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='5' Grid.Column='0' x:Name='Button7' Content='¹/x' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='6' Grid.Column='0' x:Name='Button8' Content='7' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='7' Grid.Column='0' x:Name='Button9' Content='4' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='8' Grid.Column='0' x:Name='Button10' Content='1' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='9' Grid.Column='0' x:Name='Button11' Content='+/-' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='4' Grid.Column='1' x:Name='Button12' Content='CE' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='5' Grid.Column='1' x:Name='Button13' Content='x²' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='6' Grid.Column='1' x:Name='Button14' Content='8' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='7' Grid.Column='1' x:Name='Button15' Content='5' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='8' Grid.Column='1' x:Name='Button16' Content='2' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='9' Grid.Column='1' x:Name='Button17' Content='0' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='4' Grid.Column='2' x:Name='Button18' Content='C' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='5' Grid.Column='2' x:Name='Button19' Content='?' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='6' Grid.Column='2' x:Name='Button20' Content='9' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='7' Grid.Column='2' x:Name='Button21' Content='6' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='8' Grid.Column='2' x:Name='Button22' Content='3' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='9' Grid.Column='2' x:Name='Button23' Content=',' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFFFFFFF'/>
<Button Grid.Row='4' Grid.Column='3' x:Name='Button24' Content='?' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='5' Grid.Column='3' x:Name='Button25' Content='÷' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='6' Grid.Column='3' x:Name='Button26' Content='*' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='7' Grid.Column='3' x:Name='Button27' Content='-' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='8' Grid.Column='3' x:Name='Button28' Content='+' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FFE5E5E5' Background='#FFF9F9F9'/>
<Button Grid.Row='9' Grid.Column='3' x:Name='Button29' Content='=' FontSize='16' HorizontalAlignment='Stretch' VerticalAlignment='Stretch' Margin='1,1,1,1' CornerRadius='2,2,2,2' BorderThickness='1,1,1,1' BorderBrush='#FF004275' Background='#FF004275' Foreground='#FFFFFFFF'/>
</Grid>
</Page>
The nice thing about this is that you don't have to worry about resizing the controls and font size where the result is displayed. They adjust automatically. The question marks in the XAML string ('?') are later replaced by Unicode characters in the actual VB6 code. In the VB6 code the event handling also takes place when you click a button.
Very good example. Thank you very much, Franky.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Which VB6 projects are we working on?
Well, I did knock up a demo form proposed as a idea for a TwinBasic search replacement. The three search utils that TB currently uses should be wrapped into one, VB6er-friendly utility. That is was my proposal anyway.
I put it here: https://github.com/yereverluvinuncle...-for-TwinBasic
https://www.vbforums.com/images/ieimages/2025/01/2.gif
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
We are working in Argentum Online an MMORPG that is still alive after 25 years.
https://github.com/ao-org/
Attachment 193952
Gameplay:
https://www.youtube.com/watch?v=5lx5-JHsQtM
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Very good, we need some pictures.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Done, I also added a gameplay from youtube.
This is the link in Steam
https://steamcommunity.com/app/1956740
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
Hi! Am a long-time lurker on this thread, and am always impressed at what everyone manages to make. I wanted to start sharing some of my (many) projects in the hope that I could get feedback about things that I'm working on.
I should start by saying that I do not own, nor have I ever owned, a copy of VB6. Instead, I only have VBA and everything I've made has been for 64bit Office. Much of what I've learnt about VBA is sourced mostly from posts on this forum or others (namely, Mr Excel) in relation to VB6. So, frankly, it has not been easy. Converting code from 32bit to 64bit is not always "a walk in the park", and things that are available to VB6 are not available to VBA (eg. a timer control).
We also don't have a PictureBox control, and so one of my major personal projects has been developing a drop-in class module that tries (as much as possible) to mimic the VB6 picturebox control in terms of functionality (if not syntax).It's an ongoing process. I've been using the code samples found here (with proper credit/attribution) and on the gihub repos for the Planet Source Code dataset as demos to show how one would go about revising the code (if necessary) to make the vbaPictureBox class work, but also to stress test and improve the class before publishing it on github. More recently, I have been writing my own demos to show the capabilities of the class. The following screenshot is of a demo I recently wrote that uses the Wolfenstein tile assets in my first attemp at raycasting. You can see in the background that I have a demo map that could be edited in an excel workbook.
My hope is: (1) that I can finish it soon(!); and (2) that somebody in the VBA community will find it useful and make something interesting with it.I think that if you look at the games that people make in Excel, etc (see the Excel and VBA subreddits, for example) that it's fair to conclude that not many people today know that something like what I have done above is relatively easy to accomplish, much less possible.
If anyone is interested, I can post more screenshots/details.