-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Thanks for that yereverluvinuncleber - I'm obviously using the wrong spell!. Have the App mostly finished now - needs some tidy up. Might add a slider to go from 0 to full scale on the MFC. Had one in the original Excel version. Can't say I'm fond of DDE. I have 2 more apps which I need to start soon.
1. A Test app for a bluetooth ECG device connected to an ECG simulator. Need to write a serial number and name to the ECG and verify that the ECG interprets the simulator waveforms correctly with minimal noise. Not sure whether to use Excel VBA or VB6 for this. Capturing data from the ECG and charting it sounds easier to do in Excel. Also need to print a record of the test to PDF.
2. An app to profile the motion of a slowly moving piston using a Digital dial indicator with serial O/P for a new product.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Good to see VB6 being used in the sort of job it was designed for. A nice graphical framework for straightforward forms that do exactly what they need to do. It is a real job in the real world and interfacing with devices. It is what a computer should be doing.
In comparison, my stuff tends to be a bit OTT, ephemeral and ridiculous but that is how I like it. :)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Making a VB7 IDE using the VBA. right now theres absolutely nothing because im just reading weird Microsoft docs.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
gaouser
Making a VB7 IDE using the VBA.
Looking forward to seeing it. Next post please have something to display.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I haven't coded in VB6 professionally for over 14 years, just rarely during my sleepless nights. Recently I had a hard drive crash that hosted my old sources and my backup system failed...
I just restored an old VM that I used for R&D in 2007, and there's still life in it... I started to review and comment on old things that I've never seen here for you share them: a curious but very simple personal addin to facilitate the creation of addins and the modification of code in very large projects, another to create MDIChilds (by API) hosted in Dlls, etc... but the code found is not the best and my motivation is low...
Redoing what we have already done, the commentary is not exciting...My nights are sometimes long and I am also working on new projects which motivate me more:
• a very practical Word Addins manager (for *.dotm) but never finished
• Addins which add functionality to “BI Publisher Desktop”
• a fork of the fabulous Krool controls to have styles in VBA and which makes them more VBA compatible..
• and I would like to take some time to get started with TwinBasic and see what it could bring me
and again and again learn from others, from you, the CodeBank experts
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Thierry, if/when you manage to revive any of your projects please add an image to show us what you are working on.
Re: loss of your old projects. It is a lesson to all of us that a copy or two of the data is NOT a backup. It is merely a copy and with our current technology you can lose that data at any time. Identifying and implementing a sufficient backup process is what is required and then adhering to it. All my old projects are making their way to github whether I find them useful/current/helpful or not. I no longer make the choice, I just stick everything on github and mark it obsolete/current as necessary.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Crikey... I just counted and found I am working on sixteen VB6 projects simultaneously. Yes, sixteen now plus another ten that need tinkering... I have a problem with boredom and burnout and so I seem to have to switch to an older project or create another new one in order to be able to make any progress at all or keep interest.
The majority of my Panzer System Metric Gauges are 98% complete, just needing some multi-monitor testing and creation of installers plus creation of some remaining Help CHM files. My weather gauges are working and operating on my desktops but I need to refactor the code somewhat. My resurrection of my first old steampunk clock/calendar has made great progress but I am now burnt out with that. I feel it is good to recognise the burning smell before boredom sets in.
My older RC5 widgets possibly need upgrading to RC6 (unsure as to whether I want to even do that)
I need to refactor my SteamyDock code and also find/fix the leaking handles.
Does anyone else here work on multiple projects?
It does help that these are all hobby/educational projects.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Released another version of my gPdfMerge utility today. It merges multiple PDFs into a single PDF; and the new version has a search tool to find what page ranges you want to merge.
https://www.vbforums.com/images/ieimages/2024/06/19.jpg https://www.vbforums.com/images/ieimages/2024/06/22.jpg
I hadn't seen Save functionality in VB6 before; I think I know the hangup-- the write callback has to be CDecl. This wasn't even practical until The trick's VBCDeclFix in 2021. Of course tB supports it natively. Since that's required for anyone wanting to use my code in VB6, I no longer felt the need to use the _stdcall pdfium.dll builds from 2018 like other projects; the new version uses the latest pdfium.dll builds from this month. You can use them in VB6 too thanks to The trick's work.
Of course, VB6 people are increasingly becoming like those who every so often wander in here asking about VB3 or VB4.. the new version of VB is much better !! Lol. But again even if you're not ready I still think the project is of interest to VB6 people since as per above it *can* be fairly easily backported.
https://www.vbforums.com/showthread....sed-PDF-merger
https://github.com/fafalone/gPdfMerge
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Crikey... I just counted and found I am working on sixteen VB6 projects simultaneously. Yes, sixteen now plus another ten that need tinkering... I have a problem with boredom and burnout and so I seem to have to switch to an older project or create another new one in order to be able to make any progress at all or keep interest.
The majority of my Panzer System Metric Gauges are 98% complete, just needing some multi-monitor testing and creation of installers plus creation of some remaining Help CHM files. My weather gauges are working and operating on my desktops but I need to refactor the code somewhat. My resurrection of my first old steampunk clock/calendar has made great progress but I am now burnt out with that. I feel it is good to recognise the burning smell before boredom sets in.
My older RC5 widgets possibly need upgrading to RC6 (unsure as to whether I want to even do that)
I need to refactor my SteamyDock code and also find/fix the leaking handles.
Does anyone else here work on multiple projects?
It does help that these are all hobby/educational projects.
I have 3 applications that are used by approx 400 users around the globe. As they are increasingly intergrated with each other, it basically means a new release for one, means new releases for the other two as well. Leads to interesting balancing acts.
In addition there are 3 internal "support" apps, that need some updating at times as well.
Isn't the last 10-20% of each project the boring part of ironing out bugs, and getting people to provide feedback so that the final release is of the best quality? How many times over my career I've had situations where you're "begging" for weeks or even months to get feedback, only to get a bug reported the day after client release... :mad:
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
fafalone
Released another version of my gPdfMerge utility today.
That is such a useful tool and improving!
Quote:
Originally Posted by
Erwin69
I have 3 applications that are used by approx 400 users around the globe.
Do you have any hobby apps in addition Erwin?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I recommenced coding in VB6 during a period in my life when needed to check whether my brain was still capable of learning. I had taken time from work to look after my family and when one stops using the brain it begins to deteriorate. It loses its 'edge'. At least that's what it felt like was occurring, in my limited experience.
So, I picked up VB6 to code a project that was a functional clone of an existing project that was in the process of being abandoned by another set of developers. That was Rocketdock and my clone creation was SteamyDock using VB6 and GDI+. That honed my old coding skills back to some sort of sharpness. On the back of that I also picked up some .NET skills and after that I played with RC5 and 6 and some new (to me) methods of coding, classes &c.
Due to project related burnout I've just picked up Steamydock again to review the code, fix some outstanding bugs and apply what I have learnt over the intervening period. Amazed by how primitive some of my code was just a few years ago and how much I can improve it now. This coding thing is really a learning process isn't it?
Steamydock at the bottom of my desktop
https://www.vbforums.com/images/ieimages/2024/07/7.png
SteamyDock close up.
https://www.vbforums.com/images/ieimages/2024/07/8.png
The SteamyDock config utility
https://www.vbforums.com/images/ieimages/2024/07/9.png
The icon Settings Utility with my more recent VB6 offerings
https://www.vbforums.com/images/ieimages/2024/07/10.png
These utilities are all VB6 but using three graphics frameworks, VB6 native forms, GDI+ and RC5-6/Cairo. To me, that's an interesting combination. SteamyDock and its utilities all work barring a few bugs. I will fix those bugs and hopefully, beat it into a shape where I start to become proud of it. At the moment, I am not, at least not from the coding perspective. Are we all embarrassed about our code?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Fixed my handles issue on SteamyDock using the following two tools from NirSoft: GDIView and HandleCountersView.exe.
https://www.vbforums.com/images/ieimages/2024/07/11.png
Bloody useful.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Thierry76
I haven't coded in VB6 professionally for over 14 years, just rarely during my sleepless nights.
I just re-read that post and that one line jumped out at me. So, Thierry, you wake up and can't sleep and so you begin to code in VB6...
Is that because it is therapeutic and calms you? Is VB6 your instinctive 'home' and makes you feel safe?
Very interesting comment that. So much potentially revealed in a line of text.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Anyone working on anything interesting?
I've just started the conversion of the old YWE desktop hole widget to VB6/RC6.
https://www.vbforums.com/images/ieimages/2024/07/14.png
https://www.vbforums.com/images/ieimages/2024/07/15.png
Only just started and it needs a lot of work to complete but I'm making progress. It is a desktop tidy tool. You drag and drop desktop icons to various files/shortcuts &c and it sorts them automatically to the correct location, predefined.
Also, adding the alarm clock functionality to my steampunk clock/calendar and fixing remaining bugs in my Panzer gauges.
https://www.vbforums.com/images/ieimages/2024/07/16.png
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Faf, I love this project of yours, I use it all the time.
Quote:
Originally Posted by
fafalone
Since IMHO tB is just as on-topic as VB 1, 2, or 3; I started this project a while ago but I've been finishing it up recently. I've been making my own Device Manager:
https://www.vbforums.com/images/ieimages/2023/12/28.jpg
This is an example of "Things you can't do in 32bit."... The
SetupDiCallClassInstaller API to perform the enable/disable/some others functions return
ERROR_IN_WOW64 if you try to call it from a 32bit app on 64bit Windows, it's not allowed. So you need twinBASIC and 64bit for all of this app's features to work. The Resources tab you see in the system device manager is absent from the above picture--- it's also only available in 64bit mode; the above screeshot was running in 32bit, in 64bit, you get the extra tab:
https://www.vbforums.com/images/ieimages/2023/12/29.jpg
I got stuck for a while on how to show the properties then gave up for a few months while working on other things, until a week or so ago I came across
DeviceProperties_RunDLL and
DevicePropertiesEx, which show the properties popup you see with a simple call, much easier than the method I had been trying (pulling the prop pages manually). With that working I'm just about finished now; principal coding is done and about half of the features have been tested. So it should be out next week, since I probably won't get much done over xmas weekend.
The last few weeks I had gotten back into hardware when I found another interesting feature: undocumented radio management interfaces/coclasses. A couple days ago I released a small app capable of turning on/off individual radios, as well as the system radio master switch-- 'Airplane mode', complete with having the airplane icon in the system tray.
https://www.vbforums.com/images/ieimages/2023/12/24.jpg
https://www.vbforums.com/images/ieimages/2023/12/26.jpg
https://www.vbforums.com/images/ieimages/2023/12/25.jpg
RadioMan was released the other day:
VBForums:
[twinBASIC] RadioMan - Undocumented Radio Management interfaces
GitHub:
RadioMan Repository
The interfaces used by it are in the current release of WinDevLib (formerly tbShellLib) for twinBASIC, and will be included in the next oleexp.tlb release for VB6, but that new version has not been posted yet. Stay tuned.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
My nice, shiny and new Dell 5511 laptop just went 'pop' and died. A capacitor in a Chinese Tofu dreg external CD reader destroyed itself and took my laptop with it. There will be some damage to the mobo on the USB side which I may be able to get fixed. For the moment though I am back on my old dependable Dell E6410 laptop from 2010. Anyone else had similar problems recently?
Luckily all the code is on github so I am now cloning all my recent projects onto 'old faithful.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
My communications program FireCall uses startTLS 1.2 (from Wqweto) to regularly communicate by email, summing up and sending all conversations over a recent period.
I have previously used Microsoft outlook's SMTP server and a hotmail address to send the outgoing emails. Microsoft is now introducing OAuth2 for authentication and I need to upgrade my tool to account for that, digging into OAuth2 to see who has already dipped their toes into making this operate within the VB6 world. So far, seems problematic. Might just change the SMTP server and email address for now.
https://www.vbforums.com/images/ieimages/2024/08/1.png
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
As long as your Microsoft account has two-factor authentication enabled, SMTP will continue to work. Same for Gmail for that matter.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Thanks for that. I will configure now and test.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
You also need to generate an "app password" and use that instead of your main account password.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
My progress is slow and nothing new visually to show for it, but progress being made. Anyone else up to anything interesting with something for us to see and hear about?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Balancing work with adapting to live in a new country. (View on the Pacific, swimming pools and tropical vegetation from my desk.) Released service packs with a series of bugfixes for two applications last week. Started work on some new features for the 3rd app. Nothing really exciting from a software (development) perspective to be honest. Sun, sea, swimming pools, golf and meeting new people great! :bigyello:
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Erwin69
Balancing work with adapting to live in a new country. (View on the Pacific, swimming pools and tropical vegetation from my desk.) Released service packs with a series of bugfixes for two applications last week. Started work on some new features for the 3rd app. Nothing really exciting from a software (development) perspective to be honest. Sun, sea, swimming pools, golf and meeting new people great! :bigyello:
Sounds as if you should be joining the "Is everybody having fun? " thread. You sound as if you are.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Still completing my Steampunk Clock/Calendar shown above, no new pictures. I have a task list and it always seems to have fifteen or so tasks on it, regardless of mow many I complete and cross off as being DONE. I count again and there are STILL fifteen. Is this normal? Should we ever aim to complete a project?
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
15 is still pretty impressive! I like to joke at work that R&D stands for rewrite and development because projects seem to go on until the end of time.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
I have a task list and it always seems to have fifteen or so tasks on it, regardless of mow many I complete and cross off as being DONE. I count again and there are STILL fifteen. Is this normal?
This is a most normal thing. I have NEVER known ANY project to reach a state where it couldn't stand any improvement.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
C # has been developed for many years, and many programmers like to use it to write various kinds of tool software. Recently, the programmers who have always pursued "Talk is Cheap, Show me the code" have started a new round of "whole work". On a whim, one of the software engineers, Bartosz Korczynski, rebuilt Visual Basic 6, which had been scrapped by Microsoft 16 years earlier, in C.VB6) IDE. For him personally, it was initially just out of interest to develop a "fun toy project". Unexpectedly, as soon as the project was completed and open sourced on GitHub (https://github.com/BAndysc/AvaloniaVisualBasic6), it hit the headlines of HN (Hacker News) and attracted the attention of a large number of developers. Even many people left messages, "I hope this project, which is regarded as a small toy by the author, will continue, because I still have to interact with a very large VB6 code base on a regular basis.".
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
Niya
This is a most normal thing. I have NEVER known ANY project to reach a state where it couldn't stand any improvement.
So twinbasic says it will take a year or two, and we don't know when it will come out, and it is far away.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
According to Bartosz Korczynski, "If recreating old user interfaces is a hobby, it's my hobby.. it's all about fun and nostalgia!"! This is a toy project, there is no other use, but he did not know that this hobby also solves many people's pain points.
Why does Microsoft have to give up VB6 and choose Visual Basic. NET? Daniel Tallentire, a former senior scientist at Microsoft, responded earlier to Quora, a question-and-answer community, saying: ".NET solves many of the underlying problems with VB6.". The Microsoft did not want to maintain too many different languages, and eventually the VB. NET prevailed.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
xiaoyao
Yes xiao, we saw that but THIS thread is for what YOU are doing, not a general news channel for the VB6 world. If YOU are doing something interesting feel free to post a picture. Otherwise post elsewhere.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Putting it back on track.
I tried to integrate a very pretty VB6 calendar from an open source project with little success, an error or two stymied me, so in the end I just added some drop down comboboxes to allow selection of the date/time for five separate alarms.
https://www.vbforums.com/images/ieimages/2024/11/1.jpeg
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
This is a thread for things YOU are working on, not a thread for speculating about things others could do. Start a new thread for that.
-
2 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
This week I made a small video player UserControl with the easy to use IMFPMediaPlayer interface. I'm planning on releasing a VB6 version in the next couple days, right now there's a preview for tB users on the tB Discord.
Attachment 193492
Also I recently made a shell extension version of my ZoneStripper app. It adds a right click menu option to remove the "mark of the web".. the NTFS alternate data stream that Windows and Office use to identify a file as 'from the internet', which must be removed from macro-enabled Office docs before they can be used.
Really needs a 64bit version so will have to be tB only. You can finally easily make shell extensions again thanks to tB. Even easier, because you can skip the vtable swapping most VB6 examples use to return the correct hresult, since tB has Err.ReturnHResult to give full control.
Attachment 193493
https://github.com/fafalone/ZoneStripperExt
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Really good as always! I will be using/testing that video player on my desktop as soon as you release it - and no doubt using some of its internals. I do have to remake my old audio player and it could do with in-built video capability, which it used to farm out to WMP in the old .js version..
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Trialling TwinBasic since the recent proof of maturity found in the compilation of PhotoDemon. 200,000 lines of VB6 code compiled by TwinBasic without error. I have no choice now, given that VB6 is over 20 years old now and TwinBasic in mature form HAS arrived, the future is clear.
So, time to test one of my programs, one that I care about, my steampunk dock known as SteamyDock.
Steamydock is written in VB6 using a transparent form that fills the whole screen, using GDI+ to extract large PNGs and adjust to two much smaller sizes. These are then stored in two scripting dictionaries and animation is achieved by monitoring the mouse position using APIs and repainting the screen using GDI+ on a small enough interval to achieve animation effects.
My program is about 10,000 lines of code, has three minor VB6 forms that are used to display the splash and 'about' images as well as provide a native VB6 menu. The running footprint is reasonably small with 48,000K memory usage (lots of PNGs), the disc footprint is even smaller at 700kb and the CPU usage is neglible <0.03% when idle on an old core 2duo. It compiles in 3-4 seconds.
In TWinBasic, it errored, pointing out a single failure on my part to declare a variable as a long in my splash form, where I had omitted OPTION EXPLICIT. Apart from that no errors at all. Compiled immediately, no discernible delay.
Set the output dir to program files x86 and recompiled, replacing the binary that I use as my standard dock on a daily basis.
It worked, no issue at all, operating exactly as the VB6 version, [redacted] I am using the community version.
So here is a GIF of the dock operating as compiled with TB.
https://www.vbforums.com/images/ieimages/2024/11/1.gif
The running footprint has doubled though still reasonably small with 119,000K memory usage - I understand that the the binary includes a lot more than just my compiled code so I am happy enough with that, the disc footprint is now 2,700kb and the CPU usage is very similar though I have not yet done enough analysis to prove anything... I'll keep an eye on it and report back but I'll assume it is the same.
It seems to operate with the same limitations of my code, especially when dragging a dock entry to another location, the re-ordering of the icons requiring a repopulation of the underlying dictionaries still takes the same amount of time (slow). The program methodology requires a significant restructure, no fault of TwinBasic. What I suppose I am saying is that I am not seeing any magical perforrmance benefit from TB. It just runs as it should.
So far, no experience of the IDE, I need to dip my toe in further.
Expectation: Errors, no compilation.
Result: Worked flawlessly. I am VERY impressed. This program would be a candidate for 64 bit conversion/compilation later, when I test the full version of TwinBasic.
I will keep two separate code bases for Steamydock for the meantime and keep them in synch. We'll see how long that lasts. I will be coding VB6-style for a while and not taking advantage of language improvements until I feel confident. Give me time! I have to adopt TwinBasic in my mind and let VB6 go... that will be a mental struggle of signficant proportion.
If you choose to try Steamydock with TwinBasic, be aware that Steamydock's code was a learning task for me. If I was coding it now I would have used a very different approach across the board.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Great to see such a complex and gorgeous graphics program work flawlessly in tB!
Quote:
It worked, no issue at all, operating exactly as the VB6 version, no discernible change except for the tiny watermark in the right hand corner that I can live with as I am using the community version.
Where? I don't see one and there shouldn't be any watermarks in 32bit at all. 64bit displays a splash screen on load, but doesn't watermark forms or UCs either.
(PS-- IIRC, you use RC6 for some/all of it? Won't be able to make a 64bit version unless/until Olaf makes one of RC6.)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Apologies. I currently have a watermark due to one or other VB program I am running and I had assumed it was TB. It isn't.
Steamydock does not use RichClient at all and no VB6 controls except for menus. It only uses GDI+ and VB6 logic.
At the time I started Steamydock I was trying to build an application that might have been built at the turn of the century, so using GDI+ seemed the right thing to do. A learning tool.
The advantage of being able to build a 32 bit version of my program using a supported and improving/ growing TwinBasic), with potential language improvements is a draw in itself. For me the promise of 64 bit operation is just a prowess-badge and some degree of future-proofing.
My 32bit apps will benefit the most from the impending multi-threading language features and I suppose in the longer term some potential for multi-platform capability, though SteamyDock making a great deal of use GDI+ and Windows APIs might not easily make the jump to another o/s. A conversion to RC then is on the cards but I will have to await Olaf's Magnum Opus Part II, a 64 bit version of Rich Client and then hopefully, an implementation for multiplatforms too.
A lot to hope for! I remember the chats we all had a few years ago, where everyone was very disparaging about the future of "legacy" VB6. Well, here is the future and it feels rosy!
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
If 64bit is in the cards, or even might be, I recommend provisioning even when you're working in VB6; you can add LongPtr and conditional pointer size constants for any pointer math. Then it's even easier.
Pure GDI+ will have little trouble going to x64... I've put a lot of work into easing the process; now how I upgrade is just comment out all the 32bit defs and let WDL take over; it's quicker to do that then resolve any signature differences than re-do all the defs again. You really get used to rarely needing to go searching for something from the Windows API.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Really good as always! I will be using/testing that video player on my desktop as soon as you release it - and no doubt using some of its internals. I do have to remake my old audio player and it could do with in-built video capability, which it used to farm out to WMP in the old .js version..
I'm going to have to delay the public release; the idea was that the VB6 version could also be imported into tB, but there's a bug preventing that.
But since you're interested I put preview versions of both VB6 and tB on GitHub, https://github.com/fafalone/ucSimplePlayer
The VB6 version works only in VB6. The .twinproj is the original twinBASIC version, not the shared codebase version, so it works in tB. The code is almost identical; just the original tB version has controls on the bottom I moved to the top in VB so I didn't have do a ton a manual size/pos calculations tB's achoring handles automatically, and of course uses WDL instead of oleexp and as such doesn't have the APIs in the form, and lacks the conditional compilation mess around the refcount issue.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
I have just converted another of my more recent creations to TwinBasic, my steampunk Clock/Calendar.
It compiles and runs. A few issues to work around, some not yet investigated but it is a good start.
There is a mismatched variable in a recently added subroutine, some sloppiness on my part highlighted by TB. Easily repaired.
I had to replace a registered OCX that TB could not find with the one contained within the program RES file, easily done. Love the way the IDE operates in form design mode. Nice to have the control bounds showing!
The preference displays a couple of problems that I have yet to investigate. All the resized icon images are upside down (!) and clicking on the icons does not select and switch the correct tab. Some investigation to do here. I'm not raising an issue here just stating what I have found. All going rather well to have managed to get this far. I am sure a little bit of digging will fix the two issues found so far.
https://www.vbforums.com/images/ieimages/2024/11/2.jpeg
This is a program that combines VB6 forms and Olaf's RC6 DLLs to achieve the transparent form upon which a variety of RC6 widgets are displayed, all having a function and making up the clock/calendar.
It works and with a bit of fixing will be an impressive example of TwinBasic.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Too many clocks spoil the broth...
https://www.vbforums.com/images/ieimages/2024/11/7.png
Showing the old Konfabulator clock/calendar written in .js on the left, the VB6 version middle and the TwinBasic version on the right. The Basic clocks share the same code exactly. The TB clock is slower to load as on startup both read data from an INI file, using that to fill a variety of comboBoxes, the TB version does that in slower time than the VB6 clock. However, the TwinBasic clock runs with a smaller memory footprint and significantly less CPU when animating.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Really enjoying trialling TwinBasic. Feels like an injection of young lifeblood into an old girl. Found a bug already, reported.
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
DreamUI:D
I rewrote all the common UI components with RC6, which made it easy for my FormDesigner to implement all sorts of modern UIs.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
SDO, what is that picture showing us?
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
SDO, what is that picture showing us?
It's a UI framework I wrote for my VSCode-like project, and it has all the features of a Modern-UI: flexible, dockable, splittable, configurable.
Perhaps the image below can show more clearly what it is:
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Ah, right! Understood. I look forward to seeing this, are you making good progress?
This is my tiny little bit of progress...
https://www.vbforums.com/images/ieimages/2024/12/3.gif
Just tweaking the time advance/retard slider settings on my clock/calendar/time machine.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
(Made that animated GIF using ScreenToGif and uploading to imgur)
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
My latest VBC project deals with the possibilities of the "Windows App SDK". As you can see in the picture, starting with Win11 you can even change the colors of the title bar and buttons. If you set AppWindowTitleBar.ExtendsContentIntoTitleBar = True, you can completely customize the title bar if you want. -> https://learn.microsoft.com/en-us/wi...elop/title-bar The dialog window was only created using the "Windows App SDK". As you can also see in the picture, quite a few classes and modules have already been put together for it. Let's see how far I get. :D
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Franky upload that to imgur and post the BB link here. I'd like to see it but the forum attachments are just too small.
I don't mind it when people customise the title bar, I just want the apps I use, to, at the very least, have one!
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Franky upload that to imgur and post the BB link here. I'd like to see it but the forum attachments are just too small.
It would be better if you could click on the image here in the forum and the image would then be displayed in full size in a separate window.
Quote:
Originally Posted by
yereverluvinuncleber
I don't mind it when people customise the title bar, I just want the apps I use, to, at the very least, have one!
The "Windows App SDK" offers more than just changing the title bar. For me, this was just the start to see whether the SDK can also be used in VB6, and thus in TwinBasic. I think you also need the App SDK if you want to use the controls from WinUI3.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
-Franky-
It would be better if you could click on the image here in the forum and the image would then be displayed in full size in a separate window.
.
Doesn't work for me.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Quote:
Originally Posted by
yereverluvinuncleber
Doesn't work for me.
What I wanted to say is that it would be nice if it was implemented in the forum so that it works like that. That would be a suggestion for improving this forum.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
This forum is NOT going to be changed. We just have to get used to that.
-
1 Attachment(s)
Re: Getting the ball rolling. Which VB6 projects are you working on?
So I recently figured out how to use Microsoft's new RichEdit controls they've enabled for Office and the new crappy Notepad but haven't been letting anyone else use. The big advantage is they support color fonts, usually used for color emojis:
Attachment 193892
You need the stupidly named riched20.dll that on Windows 10 at least only comes with Office. The one in System32/SysWOW64 is RichEdit 3.1. Then 5.0 and 6.0 are in msftedit.dll, which for some reason says RichEdit 8.5... but the MSOffice riched20.dll says RichEdit 8.0 and is newer, and is the only one supporting the Direct2D rendering option allowing color fonts outside of windowless RichEdit... Which is a nightmare to implement and I can't even get C++ examples to work so probably won't make one for vb or tb.
So anyway, you need the 8.0 richedit20.dll from MS Office... Unfortunately they only install the version matching your Office bitness, so if you have 64bit Office, no 32bit one for VB6 or 32bit tB. So I just copied them and posted both with my demo, if you want to take the 32bit one and use it in VB6. You also need the msptls.dll file included with it. These are both signed by Microsoft.
What you need to do is call LoadLibrary on the riched20.dll, and then create the window class "RichEditD2D" instead of the normal RichEdit class, then immediately after creation send EM_SWITCHTOD2D. It's that simple, you'll now have a RichEdit control supporting all the normal commands and also color fonts.
Since my Intermediate UI Ribbon demo already had a ton of code for a useful RichEdit with font/alignment/etc working, I used that for my example, but you see the method is very simple and you could use it for any API based RichEdit in VB6 or tB.. like easily modifying Krool's VBCCR RichEdit to use it.
https://github.com/fafalone/UIRibbon...ntermediateD2D
Code:
Private Sub CreateRichEdit()
Dim szClass As String
Const bTryD2d As Boolean = True
If bTryD2d Then
#If Win64 Then
hREDll = LoadLibrary(App.Path & "\Build_win64\riched20.dll")
#Else
hREDll = LoadLibrary(App.Path & "\Build_win32\riched20.dll")
#End If
If hREDll = 0 Then
hREDll = LoadLibrary(App.Path & "\riched20.dll")
End If
If hREDll Then
szClass = "RichEditD2D"
End If
End If
If hREDll = 0 Then
(Fallbacks to msftedit etc omitted)
End If
If hREDll Then
Dim rc As RECT
GetClientRect pbREHost.hWnd, rc
hRE = CreateWindowExW(0, StrPtr(szClass), 0, _
ES_MULTILINE Or ES_SAVESEL Or WS_VISIBLE Or WS_CHILD Or WS_BORDER Or WS_TABSTOP, _
0, 0, rc.Right, rc.Bottom, pbREHost.hWnd, 0, App.hInstance, ByVal 0&)
If hRE Then
If bTryD2d Then
SendMessage hRE, EM_SWITCHTOD2D, 0, ByVal 0
End If
(Note: I tried to test modifying VBCCR but even the original RTF control with no changes isn't working for me right now)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
@fafalone If I needed it, I would use the XAML RichEditBox. https://learn.microsoft.com/en-us/uw...ew=winrt-26100 You don't have to worry about the appropriate riched20.dll. OK, the whole thing can only be implemented for VBC or TB using the "XAML Islands" and the WinRT XAML classes.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Copying two dlls is far less of an issue than the massive complexity of XAML islands. Your work on those is very impressive but it's orders of magnitude more complex and likely on par with just implementing a windowless richedit (which underlies the xaml control) directly.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
Is this "Windows App SDK" different than the XAML islands you were working on before? Do you have a download link for this project? Probably it would be easier to write the interface definitions in tB and then using them in VB6 rather than relying solely on DispCallFunc which is much more clunky and error-prone...
fafalone, you can't really say that implementing your RibbonUI was any easier than XAML islands! ;)
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
No but the RichEdit control doesn't require the ribbon. I just used the ribbon project out of convenience since it had a RichEdit with so many options already set up. All the RichEdit control really needs is a few lines to call LoadLibrary and CreateWindowEx; you don't need additional controls at all let alone the fancy ribbon ones. I don't think the XAML version includes a whole text editor UI for setting fonts/alignment/etc either, just some wrappers to simplify the API calls a bit.
I'm going to play around a little with windowless richedit... just see if I can get the bare minimum functionality working then go from there.
-
Re: Getting the ball rolling. Which VB6 projects are you working on?
https://www.vbforums.com/images/ieimages/2025/01/8.png
I am debugging TwinBasic-induced bugs and looking for workarounds, so far found a few workable fixes to bugs that I have discovered. Loving compiler directives...