Page 2 of 2 FirstFirst 12
Results 41 to 59 of 59

Thread: NewTab: tab control for VB6

  1. #41
    Member
    Join Date
    Mar 2022
    Posts
    34

    Re: NewTab: tab control for VB6

    [QUOTE=Eduardo-;5607382]

    Code:
    #Const COMPILE_WITH_TAB_PROPERTY = 0
    change the 0 to 1:

    Code:
    #Const COMPILE_WITH_TAB_PROPERTY = 1
    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.

  2. #42

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    Quote Originally Posted by BooksRUs View Post
    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.

    Quote Originally Posted by BooksRUs View Post
    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!
    It must be something else.

  3. #43

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    BTW: the DLL is for SP6, ensure that you have SP6 installed first.

  4. #44
    Member
    Join Date
    Mar 2022
    Posts
    34

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    It must be something else.
    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.

    Thanks for your help!

  5. #45

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    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.

    Do you have SP6 installed?

  6. #46
    Lively Member
    Join Date
    Feb 2022
    Posts
    114

    Re: NewTab: tab control for VB6

    Wow. Incredibly impressive project Eduardo!

    The documentation is equally impressive. Are you using a program to aid you produce documentation?

  7. #47
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    443

    Re: NewTab: tab control for VB6

    Quote Originally Posted by taishan View Post
    Wow. Incredibly impressive project Eduardo!

    The documentation is equally impressive. Are you using a program to aid you produce documentation?
    https://www.vbforums.com/showthread....ter&highlight=

  8. #48
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    183

    Re: NewTab: tab control for VB6

    Dear Eduardo,

    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'
    Last edited by softv; Sep 17th, 2023 at 06:00 PM.

  9. #49

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    Hello, I don't think you missed any step.

  10. #50
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    183

    Re: NewTab: tab control for VB6

    Dear Eduardo,

    Some issues observed:

    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.

    Kind Regards.
    Last edited by softv; Sep 18th, 2023 at 11:46 AM.

  11. #51

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    Quote Originally Posted by softv View Post
    Dear Eduardo,

    Some issues observed:

    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
    Quote Originally Posted by softv View Post
    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.

    Quote Originally Posted by softv View Post
    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,

    Quote Originally Posted by softv View Post
    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.

    Quote Originally Posted by softv View Post
    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.

    Kind Regards.
    Thank you

  12. #52
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    183

    Re: NewTab: tab control for VB6

    Thanks a TON, as always, Eduardo.

    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?

    Kind Regards.

  13. #53

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    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)
    Attached Files Attached Files

  14. #54
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    183

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    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?

    Kind Regards.

  15. #55

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    OK, I updated the project and the ocx.
    TabToolTipText now work at design time too and changed theme name Esmerald to Emerald.

  16. #56
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    183

    Re: NewTab: tab control for VB6

    Thanks a LOT, Eduardo, for the recent update.

    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.

    Kind Regards.
    Last edited by softv; Sep 20th, 2023 at 10:27 AM.

  17. #57

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    Update released.

    Quote Originally Posted by softv View Post
    Thanks a LOT, Eduardo, for the recent update.

    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).

    Name:  AppleGreen_Theme.png
Views: 69
Size:  11.6 KB

    Quote Originally Posted by softv View Post
    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.

  18. #58
    New Member
    Join Date
    Apr 2014
    Posts
    8

    Re: NewTab: tab control for VB6

    Hello Eduardo,

    is it possible to create a manifest file for the OCX?

    Thanks in advance.

  19. #59

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,766

    Re: NewTab: tab control for VB6

    Copy this code in the manifest:

    Code:
      <file name="NewTab01.ocx">
        <typelib tlbid="{66E63055-5A66-4C79-9327-4BC077858695}" version="3.1" flags="control" helpdir="" />
        <comClass clsid="{6C9D299A-B6CC-40B8-A155-4D3F154F6584}" tlbid="{66E63055-5A66-4C79-9327-4BC077858695}" threadingModel="Apartment" progid="NewTabCtl.NewTab" miscStatusIcon="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,simpleframe,setclientsitefirst" description="Tabbed control for VB6." />
      </file>
    I now have included this information in the ReadMe file.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width