While doing this, I read the comments above this area:
Code:
'Tab is a reserved keyword in VB6, but you can remove that restriction.
'To be able to compile with Tab property, you need to replace VBA6.DLL with this version: https://github.com/EduardoVB/NewTab/raw/main/control-source/lib/VBA6.DLL
'VBA6.DLL is in VS6's installation folder, usually:
'C:\Program Files (x86)\Microsoft Visual Studio\VB98\
So, I did this and I have not been having as many problems as I was before... my question is: Do I have to distribute this modified VBA6.DLL to all of my users?
Everything looks and runs great in the IDE, but when I run the compiled EXE, the program immediately dies (even on the dev machine)! I need to figure out how to deploy this! Please help!
Thanks!
Last edited by BooksRUs; Jul 14th, 2023 at 12:18 PM.
my question is: Do I have to distribute this modified VBA6.DLL to all of my users?
No, you need only the modified DLL in your VB6 installation, for being able to compile using that reserved word.
The DLL is exactly the same as the original, the only difference is that 'Tab' is no longer a reserved keyword.
Originally Posted by BooksRUs
Everything looks and runs great in the IDE, but when I run the compiled EXE, the program immediately dies (even on the dev machine)! I need to figure out how to deploy this! Please help!
I have tried to figure this out on my own, but to no avail.
I ran ProcMon to possibly see what's happening. When the compiled EXE and VB6 fail, just before there is this line in the
Operation: RegOpenKey
Path: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack\SurrogateFallback\Segoe MDL2 Assets
Result: NAME NOT FOUND
After this it runs WerFault.exe and dies...
Perhaps there is something weird going on with the Segoe fonts that the control uses? Or something with Unicode? I have no idea, just throwing out ideas.
I hate to go backwards and have to use SSTab again, but I need to be able to get this to the users.
What Windows version are you using?
I guess it must be a problem when compiling the control on Windows7/8.
Unfortunately, I have only Windows 11 here now to be able to test that.
But then, it has nothing to do with the replacement VBA6,DLL... I guess.
Thank you once again for this pleasing and wonderful control.
In order to use the NewTab control embedded in a project (instead of as an ocx), I just adopted the following simple methodology in a new sample project (say, 'abc'):
1. I created a new folder copying the following '6 directories' alone from your "control-source" folder.
- bas
- cls
- ctl
- frm
- pag
- subclass
2. Then, I added all the files in the above folders into my sample 'abc' project. In the case of two files alone (pagNewTabTabs.pag AND pagNewTabThemes.pag), I had to first replace 'NewTabCtl' with 'abc' inside them, before including them in my project. Note: 'pagNewTabHelp.pgx' also has the word 'NewTabCtl' contained in it. I did not replace it though.
3. Now, I added one NewTab in 'Form1', started 'abc' from the IDE and it worked.
4. I created 'abc.exe' and executing it worked too, displaying the tabs in the starting screen.
5. I copy/pasted and just ran 'abc.exe' in one other occasionally used Windows10 system of mine and it worked therein too, displaying the tabs in the starting screen.
So, I believe all that is required to make your splendid 'NewTab' working embedded in a new project is, what I have done above. If I have missed any step or need to do anything more, please do let me know, when your time permits, since I am planning to use the same procedure as above, soon, to avail your NewTab in a larger project of mine, distributed to users.
Thanks a TON once again for this fantastic and beautiful control.
Kind Regards.
Edit-1: Changed 'pagNewTabHelp' to 'pagNewTabHelp.pgx' Edit-2: Changed '7 directories' to '6 directories'
Issue of primary concern to me right now --
1. After starting your sample project group "Test uncompiled.vbg", in IDE (design time), I am unable to select the individual tabs (other than 'Tab 0') and place/add controls in them. To ensure it is so, I tried running your sample in the one other system of mine too. The result is the same. Of course, the result is the same, if I create a project of my own too (like 'abc', using the steps I mentioned in my previous post and which you have okayed).
Note-1: if I start "Test with ocx compiled.vbg", therein I am able to quite easily select all the individual tabs and place/add controls in them at design time.
Note-2: By 'Tab 0', I mean the tab with caption 'Tab 0' which appears selected by default anyway, as soon a NewTab is added to a form.
--
Issues NOT of primary concern --
1. When using "Test uncompiled.vbg", after right-clicking the NewTab control (added to a form), clicking 'Properties' and selecting the 'Help' tab in the "Property Pages" screen, the 'Help' contents do not appear coherently. Also, the contents do not seem to get loaded fully.
2. Unicode texts (both caption and tooltip) not retained after close & reopen of project. All characters appear as questions marks. This issue exists in both 'Test uncompiled.vbg" and "Test with ocx compiled.vbg". If the project is compiled to an exe (with the Unicode texts), the executable exhibits Unicode text correctly for both caption and tooltip. So, right now, I am planning to manage this issue by populating the Unicode caption and tooltip texts during 'Form' Load. Any other easier way?
--
In case my above observations are incorrect, kindly let me know what I need to do to correct the issues I am facing.
General query:
To change the names of the themes, the procedure to be followed is to change their names in the bas file (mNewTabThemes). Right? I saw a theme named as 'Esmerald'. I wanted to change its name (name alone) to 'Emerald'. So, I changed "Esmerald" to "Emerald" in the 'LoadDefaultThemes' function of the aforesaid bas file. This works and I am able to see the change in the theme name effected correctly. But, hope this procedure I adopted is correct and there are no side-issues in this.
By the way, the facility to reorder the tabs at run time is great. Kudos for thinking of a feature like this in the first place.
And, I take this opportunity to once again thank you for your fabulous NewTab control.
Issue of primary concern to me right now --
1. After starting your sample project group "Test uncompiled.vbg", in IDE (design time), I am unable to select the individual tabs (other than 'Tab 0') and place/add controls in them. To ensure it is so, I tried running your sample in the one other system of mine too. The result is the same. Of course, the result is the same, if I create a project of my own too (like 'abc', using the steps I mentioned in my previous post and which you have okayed).
Note-1: if I start "Test with ocx compiled.vbg", therein I am able to quite easily select all the individual tabs and place/add controls in them at design time.
Note-2: By 'Tab 0', I mean the tab with caption 'Tab 0' which appears selected by default anyway, as soon a NewTab is added to a form.
It is a protection, so it does not crash when running uncompiled in the IDE.
You can remove it. Close the form, then open the NewTab's UserControl code window, then go to the fist line and change it to:
Code:
#Const NOSUBCLASSINIDE = 0
Originally Posted by softv
Issues NOT of primary concern --
1. When using "Test uncompiled.vbg", after right-clicking the NewTab control (added to a form), clicking 'Properties' and selecting the 'Help' tab in the "Property Pages" screen, the 'Help' contents do not appear coherently. Also, the contents do not seem to get loaded fully.
Could not reproduce this one, I see the text OK here.
Originally Posted by softv
2. Unicode texts (both caption and tooltip) not retained after close & reopen of project. All characters appear as questions marks. This issue exists in both 'Test uncompiled.vbg" and "Test with ocx compiled.vbg". If the project is compiled to an exe (with the Unicode texts), the executable exhibits Unicode text correctly for both caption and tooltip. So, right now, I am planning to manage this issue by populating the Unicode caption and tooltip texts during 'Form' Load. Any other easier way?
That's normal, The VB6 IDE cannot handle Unicode.
Yes, assign the texts in the Form_Load,
Originally Posted by softv
General query:
To change the names of the themes, the procedure to be followed is to change their names in the bas file (mNewTabThemes). Right? I saw a theme named as 'Esmerald'. I wanted to change its name (name alone) to 'Emerald'. So, I changed "Esmerald" to "Emerald" in the 'LoadDefaultThemes' function of the aforesaid bas file. This works and I am able to see the change in the theme name effected correctly. But, hope this procedure I adopted is correct and there are no side-issues in this.
No, it is OK.
Originally Posted by softv
By the way, the facility to reorder the tabs at run time is great. Kudos for thinking of a feature like this in the first place.
And, I take this opportunity to once again thank you for your fabulous NewTab control.
By the way, a label control (both intrinsic and krool's) placed inside a NewTab's tab does not display its tooltip text. The label displays it's tooltip text only if I enclose it inside a picturebox or frame control. Lack of hWnd for a label is the cause?
Well, if my above observation is correct, is there any easier way (than enclosing it inside a picturebox/frame) by which I can have the tooltip text of a label get displayed?
There seems to be a VB6 bug regarding that.
A Windowless UserControl placed inside a ControlContainer UserControl does not display the ToolTipText.
I don't think there is much we can do about that. (test project attached)
Yes, I thought something of that sort could be the case. Thanks.
Okay then, I will add a top-level picturebox/frame whenever a tab has one or more labels in it.
By the way, I observe that the tooltips of individual tabs get displayed (on mouseover) at runtime only, not at design time. If my observation is correct, is it possible to make the tabs' tooltips visible at design-time too, on mouseover?
By the way, as informed by you in post #20, I am sharing a new theme hereunder. . I included it in my code and just termed it as 'Apple Green'.
--
BackColorTabSel=16514553|BackColorTabs=15136990|FlatBarColorHighlight=3633716|FlatBarColorInactive=1 4150350|FlatBarColorTabSel=1820177|FlatBorderColor=1820177|FlatBorderMode=1|ForeColorHighlighted=167 77215|HighlightColor=3633716|HighlightEffect=0|HighlightMode=68|HighlightModeTabSel=90|IconColorTabH ighlighted=16777215|Style=3
--
The facility to so easily create new themes and also share them as easily as above is too good. Thanks a TON.
Just one query though:
'Ambient Colors' checkbox - I am unable to notice any difference in color(s) anywhere, whether it is checked or unchecked. So, I am unable to know what it actually does.
By the way, as informed by you in post #20, I am sharing a new theme hereunder. . I included it in my code and just termed it as 'Apple Green'.
--
BackColorTabSel=16514553|BackColorTabs=15136990|FlatBarColorHighlight=3633716|FlatBarColorInactive=1 4150350|FlatBarColorTabSel=1820177|FlatBorderColor=1820177|FlatBorderMode=1|ForeColorHighlighted=167 77215|HighlightColor=3633716|HighlightEffect=0|HighlightMode=68|HighlightModeTabSel=90|IconColorTabH ighlighted=16777215|Style=3
--
The facility to so easily create new themes and also share them as easily as above is too good. Thanks a TON.
Thank you! I added "Apple Green" to the default themes (it is already in the new update).
Originally Posted by softv
Just one query though:
'Ambient Colors' checkbox - I am unable to notice any difference in color(s) anywhere, whether it is checked or unchecked. So, I am unable to know what it actually does.
Kind Regards.
That is if you want to change colors that are ambient colors (or not), like vbButtonFace and vbButtonText that are the default ambient colors, or the current ambient colors in case they were changed.
If you want to adjust the other colors but not to modify these ambient colors, then the checkbox need to be not checked (is the default).
If you want to modify them anyway, then check it.
It only has effect if the theme has ambient colors in the definition.
Last edited by Eduardo-; Sep 20th, 2023 at 01:33 PM.