|
-
Jul 2nd, 2021, 10:29 AM
#1
Re: Getting the ball rolling. Which VB6 projects are you working on?
Getting to the end of my side project, all I need to do is to add PNG support (!) Ping responses, awake call and response, add quicksorting, emailing recipient on Dropbox error and I'm done! I'm using my tool now and it is intuitive to operate, fun and a bit mental. Dil. will hate it but that doesn't matter 
I have just added the ability to add custom texts to the predefined text buttons.

Adding a new tab and a few extra controls I realise I may be approaching the 255 controls per form limit. Is there a more elegant way around this other than creating each tab as a separate form? This is one limitation I really would like RadBasic/TwinBasic to circumvent.
-
Jul 2nd, 2021, 11:25 AM
#2
Hyperactive Member
Re: Getting the ball rolling. Which VB6 projects are you working on?
 Originally Posted by yereverluvinuncleber
Adding a new tab and a few extra controls I realise I may be approaching the 255 controls per form limit. Is there a more elegant way around this other than creating each tab as a separate form? This is one limitation I really would like RadBasic/TwinBasic to circumvent.
I ran into that for one of my applications that I wanted to keep as windows-less as possible. The solution would be to create control arrays.
E.g. moving the 11 + buttons into an array, will reduce the control count with 10. Looking at the screenshot above, the 11 Labels, 11 combos, and 22 buttons within the Texts-frame could be reduced to 4 controls, while still keeping things logically.
I've also used that approach to tidy up code. In your case if you keep the indexes of the controls that are related the same, you maybe could have one routine for all 11 + buttons, and one for all 11 - buttons.
-
Jul 2nd, 2021, 12:38 PM
#3
Re: Getting the ball rolling. Which VB6 projects are you working on?
 Originally Posted by Erwin69
The solution would be to create control arrays.
Absolutely and I agree, except my next task (side project no.99) is to create a .NET version and that of course requires it to be free of control arrays. I have learned from my cost in migrating another VB6 project to VB.NET that control arrays are the worst to be feared... (spoken in a pirate accent).
As such I have avoided control arrays wherever possible, each and every separate control having its own name and number assigned as if I was coding like a baby and not a dyed-in-the-wool VB6-er.
-
Oct 22nd, 2021, 06:24 AM
#4
Re: Getting the ball rolling. Which VB6 projects are you working on?
 Originally Posted by Erwin69
E.g. moving the 11 + buttons into an array, will reduce the control count with 10. Looking at the screenshot above, the 11 Labels, 11 combos, and 22 buttons within the Texts-frame could be reduced to 4 controls, while still keeping things logically.
I've had to take your advice regarding using control arrays to reduce the number of controls on a form. I am butting my head up against this whenever I have to create a complex pref.s/config. screen with a lot of configuration options.
Prior to bundling the controls into arrays, I have taken all the label controls, on a frame by frame basis and for each control I have moved the existing text from the Name property to the Tag property so I can still identify which label applies to which configuration section. The problem arises later when you are debugging and cannot easily identify what a specific control is for. This way the Tag property will still be there to assist.
It will be a pain if I ever migrate the code to .NET, I am just still hoping for RADBasic/TwinBasic so I never have to! I am hping the 255 control limit per form is one quirk that does not have to be built in to a new version of VB6.
Q. Does VBA suffer from the same limitation?
Last edited by yereverluvinuncleber; Oct 22nd, 2021 at 06:28 AM.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|