Results 1 to 37 of 37

Thread: (VB6) SSTabEx: SSTab replacement. Themed and with new features

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    (VB6) SSTabEx: SSTab replacement. Themed and with new features

    This control is a direct replacement of the SSTab control.

    Some enhancements are:

    • It supports Windows visual styles or themes
    • The background color of the tabs can be changed (property TabBackColor)
    • Another Style has been added (along with the two available in the original): it can be also rendered with the TabStrip look alike.
    • Several new events and properties available
    • More control at design time, for example the controls can be moved from one tab to another (that is available in a property page)
    • Since many properties that define the appearance can be customized, the customized values can be saved (from a property page) and restored into another SSTabEx control.
    • It fixes the focus to hidden controls issue that the original SSTab suffers when navigating with the tab key.


    Themed in Windows 10:
    Name:  SSTabExSampleW10.png
Views: 1497
Size:  8.9 KB

    Themed in Windows XP:
    Name:  SSTabEx1b.JPG
Views: 2791
Size:  15.5 KB

    Not themed but TabBackColor changed (and also Style = ssStyleTabStrip):
    Name:  SSTabEx2.JPG
Views: 2777
Size:  13.6 KB

    One note: if you use the Tab property of the control in code, you'll have to change it to TabSel.
    I couldn't use Tab as a property name because it is a VB6 reserved keyword.

    It should work in any Windows version from Windows 2000.
    (Not tested, just tested on XP SP3).

    For documentation, there are two files:

    • _Readme - Notes.txt that is in the root folder, and explains things related to the component development and compiling.
    • And [root folder]/others/Help SSTabEx control.txt that is the control documentation, from the point of view of using the control. The same information is in a property page.


    Changelog:
    2020-07-05 Now the theme can be seen in the IDE at design time (as long as the IDE is themed). Also bugs fixed.
    2020-04-28 Bugs fixed in RightToLeft property and ptpSSTabExGeneral property page
    2020-04-26 Bugs fixed and added properties TabSelBackColor, TabSelForeColor and RightToLeft
    2019-05-24 Added support to handle high contrast theme and added property HandleHighContrastTheme
    [cut, full version in Changelog.txt inside]
    2018-02-06: Initial release
    Attached Files Attached Files
    Last edited by Eduardo-; Jul 10th, 2020 at 09:35 PM.

  2. #2
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,583

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Good work. A solid SSTab was overdue and now as you have done it I might stick to your version instead of the unflexible TabStrip.

    Just two advise upfront related to DPI awareness, since I trapped over all this.
    1. Don't use ScaleX to convert Himetric to pixels, it's not precise on some DPI settings. Instead use an API way. (Like I did via CHimetricToPixel_X/Y functions)
    2. In the UserControl_Resize handler you shall do a following to correct the sizes VB reports from the host:
    Code:
    With UserControl
    If DPICorrectionFactor() <> 1 Then
        .Extender.Move .Extender.Left + .ScaleX(1, vbPixels, vbContainerPosition), .Extender.Top + .ScaleY(1, vbPixels, vbContainerPosition)
        .Extender.Move .Extender.Left - .ScaleX(1, vbPixels, vbContainerPosition), .Extender.Top - .ScaleY(1, vbPixels, vbContainerPosition)
    End If
    End With

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by Krool View Post
    Good work. A solid SSTab was overdue and now as you have done it I might stick to your version instead of the unflexible TabStrip.

    Just two advise upfront related to DPI awareness, since I trapped over all this.
    1. Don't use ScaleX to convert Himetric to pixels, it's not precise on some DPI settings. Instead use an API way. (Like I did via CHimetricToPixel_X/Y functions)
    2. In the UserControl_Resize handler you shall do a following to correct the sizes VB reports from the host:
    Code:
    With UserControl
    If DPICorrectionFactor() <> 1 Then
        .Extender.Move .Extender.Left + .ScaleX(1, vbPixels, vbContainerPosition), .Extender.Top + .ScaleY(1, vbPixels, vbContainerPosition)
        .Extender.Move .Extender.Left - .ScaleX(1, vbPixels, vbContainerPosition), .Extender.Top - .ScaleY(1, vbPixels, vbContainerPosition)
    End If
    End With
    I found a problem when converting from/to vbContainerSize/vbContainerPosition. More info here.
    That's why I made four functions: FromContainerSizeY, FromContainerSizeX, ToContainerSizeY and ToContainerSizeX.
    They are just internal functions.

    I also found a problem related to units, and is that in the property window, when the ScaleMode of the container is changed, the properties that work with container coordinates, may show rounding errors. For example the TabHeight may show 400.0002.
    That doesn't happen in the original.
    I made a function FixRoundingError that fixes that.

    I don't know if those issues could be related to what you are pointing. I didn't realize of something related particulary with vbHimetric, but those problems perhaps has to do with it?

    I would like to know if you see that something is bahaving wrongly. Please provide steps to reproduce the problem.

    You said:
    Don't use ScaleX to convert Himetric to pixels, it's not precise on some DPI settings
    I tested mainly in 120 DPI that is what I normally use in my computer, and also at 96 DPI and 144 DPI (not too much, but it seemed to work OK in every DPI setting).

    What circumstances should I set up to see that problem?

    Thanks for your imput Krool.

  4. #4
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,583

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by Eduardo- View Post
    I tested mainly in 120 DPI that is what I normally use in my computer, and also at 96 DPI and 144 DPI (not too much, but it seemed to work OK in every DPI setting).

    What circumstances should I set up to see that problem?
    See post #9 in LaVolpe's Being DPI aware Tutorial:
    http://www.vbforums.com/showthread.p...=1#post5165851

    Edit: I'm aware of the Single > Long > Single (HIMETRIC) rounding issue with vbContainerSize/vbContainerPosition.
    I kind of live with that. Like the MSComCtl.ocx did the same as they didn't offer a ScaleMode property like you did now. As for msflexgrid.ocx I also stick hard-coded to vbTwips for my VBFlexGrid.
    Last edited by Krool; Feb 6th, 2018 at 08:59 AM.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by Krool View Post
    See post #9 in LaVolpe's Being DPI aware Tutorial:
    http://www.vbforums.com/showthread.p...=1#post5165851

    Edit: I'm aware of the Single > Long > Single (HIMETRIC) rounding issue with vbContainerSize/vbContainerPosition.
    I kind of live with that. Like the MSComCtl.ocx did the same as they didn't offer a ScaleMode property like you did now. As for msflexgrid.ocx I also stick hard-coded to vbTwips for my VBFlexGrid.
    Yes, but this issue is not just related to Himetric, it is also related to Twips.

    VB6 doesn't work properly at DPI's that 1440/DPI is a non integer, because it internally works with integers. Screen.TwipsPerPixelsX/Y also works with integers. It can work at 160 DPI, 180 DPI, but not at 192 DPI (200%) or 168 DPI (175%).
    Many things will work wrong in such DPI settings, not just this one.
    VB6 is not ready for that.

    DPI settings where a VB6 program can work fine are 96, 103, 111, 120, 131, 144, 160, 180, 206, 240, 288, 360, 480, 720 and 1440.
    (It is 1440 / DPI = Twips. The above are values that lead to integers and VB6 can handle)
    The ones in blue, may work, but should be tested each one because they have still a small rounding.

    The ones in bold, are the ones offered to easily set in Windows GUI, so are the ones the people use.
    It is also offered 192 DPI (200%) and I don't know if in some Windows version may be (168 DPI) 175%?

    VB6 will have multiple issues running in those DPI, not just this one.
    My programs explicitely check that and just show a message at startup saying that the program can't run at that DPI setting.

    There is no easy solution for that, just a VB update where it could use single precission values intead of integer for TwipsPerPixelsX/Y.

    Fortunatelly, people are not using -nowaday- those DPI setting (normally).

    Edit: In other words: if you want to handle that, you should not use ScaleX/Y(vbTwips/vbPixels, vbPixels/vbTwips) nor Screen.TwipsPerPixelsX/Y either.
    Last edited by Eduardo-; Feb 6th, 2018 at 09:42 AM.

  6. #6
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,583

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    I agree. However the UserControl_Resize *fix* is important. Because in atypical DPI we have some offsets which we can live with. However UserControls are even more off then what's set by the host (Form). So at least that's fixed even if overall there is something off, but that's a minor difference.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by Krool View Post
    I agree. However the UserControl_Resize *fix* is important. Because in atypical DPI we have some offsets which we can live with. However UserControls are even more off then what's set by the host (Form). So at least that's fixed even if overall there is something off, but that's a minor difference.
    I'll study that at some point.
    Since I considered that VB6 is not ready to work at such DPI settings, because any mid-sized program will surely have many of those issues, I didn't pay attention to them.
    But still, if something could be fixed, it would be better.
    As I said, in my programs I show a message telling the user that the program won't display right in such DPI setting. So, it isn't a feature that for me personally would make a difference.
    But I'll still study it when I have more time, for the ones that make small programs that perhaps have only a few controls and could benefit from that fix (and that also have users with those -today's- quite strange DPI settings).

    Thanks Kroll, I'll do it when I finish other things that I'm currently working on.

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Also, just in case that you would like to add it to your controls set, and make modifications (or not) or to add more features, feel free to do it.
    I'm releasing it as free software, or public domain like license, so there is no need to cite author or anything (*).

    I only would like (althoughit is not a condition or requirement), for you or anyone else, is that if you find bugs or problems, to report here, so I can also fix my own code.
    I'm already using it in my programs.

    Thanks.

    Edit: (*) but you can still do it if you want, to say people that you are not responsable of the bugs -that it could have- or the coding style if you don't like it.
    Last edited by Eduardo-; Feb 6th, 2018 at 10:40 AM.

  9. #9
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    6,324

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Nice work, Eduardo. This (along with Krool's work) gives me a path to completely dump OCX files if I ever decide to do the necessary testing.

    Take Care,
    Elroy
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  10. #10

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    New release.
    Fixed bugs with controls that don't have Width property, or Left property can't be changed at run time.

    The changes are in Sub SetVisibleControls, Function MouseIsOverAContainedControl and Sub RearrangeContainedControlsPositions

    Fixed bug in HideAllContainedControls.
    Last edited by Eduardo-; Feb 16th, 2018 at 02:05 PM.

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Hello Krool,

    Quote Originally Posted by Krool View Post
    1. Don't use ScaleX to convert Himetric to pixels, it's not precise on some DPI settings. Instead use an API way. (Like I did via CHimetricToPixel_X/Y functions)
    I corrected that. It is an issue of converting to and from pixels (from/to any scale).
    I added two internal custom functions: pScaleX and pScaleY that do the conversion right.
    Also, I added two other functions: Screen_TwipsPerPixelsX and Screen_TwipsPerPixelsY for correcting those values, and two correction factors: mXCorrection and mYCorrection for correcting X and Y at Mouse_Move/Up/Down events.

    It seems to work fine at 192 DPI now.

    Quote Originally Posted by Krool View Post
    2. In the UserControl_Resize handler you shall do a following to correct the sizes VB reports from the host:
    Code:
    With UserControl
    If DPICorrectionFactor() <> 1 Then
        .Extender.Move .Extender.Left + .ScaleX(1, vbPixels, vbContainerPosition), .Extender.Top + .ScaleY(1, vbPixels, vbContainerPosition)
        .Extender.Move .Extender.Left - .ScaleX(1, vbPixels, vbContainerPosition), .Extender.Top - .ScaleY(1, vbPixels, vbContainerPosition)
    End If
    End With
    I still didn't study that...
    Thanks.

  12. #12
    New Member
    Join Date
    Jun 2018
    Posts
    1

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Hi Eduardo,

    really a nice job!

    I am testing SStabEx, it seems really good.

    But there is something wrong: in your help you said:

    "Events:

    Original from the SSTab:

    Click(PreviousTab As Integer)
    DblClick()
    KeyDown(KeyCode As Integer, Shift As Integer)
    KeyPress(KeyAscii As Integer)
    KeyUp(KeyCode As Integer, Shift As Integer)
    MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    OLECompleteDrag(Effect As Long)
    OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
    OLEGiveFeedback(Effect As Long, DefaultCursors As Boolean)
    OLESetData(Data As DataObject, DataFormat As Integer)
    OLEStartDrag(Data As DataObject, AllowedEffects As Long)"


    That's not true, those events in the original sstab have all a first argument "index" i.e.

    Original SSTab
    MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)

    SStabex
    MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

    that's really a problem if you have to move to sstabex an existing code.

    Please can you fix it ?

    Best regards
    Maurizio

  13. #13
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by Maurizio View Post
    Please can you fix it ?

    Best regards
    Maurizio
    Not sure which SSTab you're using, but it's not the same everyone else is using.

    I'm kidding of course - but you're still mistaken. You have your SSTab setup as a Control Array.
    Delete whatever is in the the Index Property, so it's blank, and try and re-create your event functions.

    Start a new form, and add a new SSTab to verify.

  14. #14

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Yes, or make an array of SStabEx.
    How? Copy an SSTabEx control to the clipboard, then paste it into the same form, and when you are asked to create a control array, answer "yes".

  15. #15
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    412

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by Eduardo- View Post
    This control is a direct replacement of the SSTab control.

    Some enhancements are:

    • It supports Windows visual styles or themes
    • The background color of the tabs can be changed (property TabBackColor)
    • Another Style has been added (along with the two available in the original): it can be also rendered with the TabStrip look alike.
    • Several new events and properties available
    • More control at design time, for example the controls can be moved from one tab to another (that is available in a property page)
    • Since many properties that define the appearance can be customized, the customized values can be saved (from a property page) and restored into another SSTabEx control.
    • It fixes the focus to hidden controls issue that the original SSTab suffers when navigating with the tab key.


    Name:  SSTabEx1b.JPG
Views: 2791
Size:  15.5 KB

    Name:  SSTabEx2.JPG
Views: 2777
Size:  13.6 KB

    One note: if you use the Tab property of the control in code, you'll have to change it to TabSel.
    I couldn't use Tab as a property name because it is a VB6 reserved keyword.

    It should work in any Windows version from Windows 2000.
    (Not tested, just tested on XP SP3).

    For documentation, there are two files:

    • _Readme - Notes.txt that is in the root folder, and explains things related to the component development and compiling.
    • And [root folder]/others/Help SSTabEx control.txt that is the control documentation, from the point of view of using the control. The same information is in a property page.


    Initial release: 06 Feb 2018.
    Last update: 26 Feb 2018
    Code:
     Begin vbExtra.SSTabEx SSTabEx1 
          Height          =   4116
          Left            =   252
          TabIndex        =   0
          Top             =   108
          Width           =   4644
          _ExtentX        =   8192
          _ExtentY        =   7260
          Tabs            =   7
          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
             Name            =   "Tahoma"
             Size            =   9
             Charset         =   0
             Weight          =   400
             Underline       =   0   'False
             Italic          =   0   'False
             Strikethrough   =   0   'False
          EndProperty
          TabsPerRow      =   4
          Tab             =   1
          TabHeight       =   582,083 'in your code this "," ,have error. in my system must change to "."
          Themed          =   -1  'True
          TabPic16(0)     =   "frmTest.frx":0166
          TabPic20(0)     =   "frmTest.frx":04B8
          TabPic24(0)     =   "frmTest.frx":09BA

  16. #16

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Updated.
    It turns out that it seems that there is a bug in VB6, that saves the single values of control properties localized (commas instead of points). These property settings then were rounded to integers to avoid the problem.

  17. #17
    Frenzied Member
    Join Date
    Dec 2008
    Location
    Melbourne Australia
    Posts
    1,339

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by Elroy View Post
    Nice work, Eduardo. This (along with Krool's work) gives me a path to completely dump OCX files if I ever decide to do the necessary testing.
    Take Care,
    Elroy
    Hi Elroy,
    You are a big Tab user.
    Have you switched over (any of your projects) to use this yet ?
    How goes it ?
    Thanks,
    Rob
    PS I have never used the VB6 Tab control (except a couple of plays with it years ago).
    This might make me a believer.

  18. #18

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Updated, a bug related to properly show some themes fixed.
    09-Oct 2018: added property TabHoverEffect.

    TabHoverEffect: default is True.
    Returns/sets a value that determines if the tabs will show an effect when they are being highlighted with the mouse over them.
    It only works when the control is displayed without visual styles.
    Last edited by Eduardo-; Oct 9th, 2018 at 10:42 AM.

  19. #19

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Updated.

    A small bug fixed (in the highlight effect).

  20. #20
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    6,324

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by Bobbles View Post
    Hi Elroy,
    You are a big Tab user.
    Have you switched over (any of your projects) to use this yet ?
    How goes it ?
    Hi Bobbles,

    Sorry for the late response. And sorry, but I haven't switched over. My program is entirely in English, so I've got very little need for Unicode. In the few places where I do have a need, I use less comprehensive solutions.

    However, I do watch this thread as well as Krool's threads. All put together, it seems that a fairly complete Unicode solution is available for VB6. I do have a couple of installations where English isn't the primary language (one in Montreal and one in Manila). But I work entirely as a consultant (no charge for the software), and nobody has offered to pay me to convert the language. If they ever do, I may take a closer look at some of the Unicode controls (possibly switching over the whole project).

    And yes, I do use the SSTab control in several places in my primary project. Personally, I think it's an excellent control, in terms of both development and end-user function.

    Best Of Luck,
    Elroy
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  21. #21
    Lively Member
    Join Date
    Feb 2007
    Posts
    83

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    I know this is an old thread but I'm trying to do something with SSTabEx (which works GREAT by the way, thanks for writing it) but I can't seem to figure out how to do it.
    I'd like the currently selected tab to be a different color (the tab itself not the caption) when active.

  22. #22

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by KenHorse View Post
    I'd like the currently selected tab to be a different color (the tab itself not the caption) when active.
    Hello, I added the properties TabSelBackColor and TabSelForeColor

    Also, in this last update, it now has RightToLeft support.

  23. #23
    Lively Member
    Join Date
    Feb 2007
    Posts
    83

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Question.

    In the readme, you say:

    To compile the OCX file:
    Got to File/Make... and make the OCX.
    Save the project.
    Close the IDE.
    Copy the *.OCX that you generated to the folder cmp
    Rename it as *.cmp
    Open the project in the IDE.
    Go to Project/Properties, and in the Components tab, in Binary compatibility select the file *.cmp in the folder cmp.
    Click OK.
    Save the project.

    I don't see a 'cmp' directory

  24. #24
    Lively Member
    Join Date
    Feb 2007
    Posts
    83

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Question.

    In the readme, you say:

    To compile the OCX file:
    Got to File/Make... and make the OCX.
    Save the project.
    Close the IDE.
    Copy the *.OCX that you generated to the folder cmp
    Rename it as *.cmp
    Open the project in the IDE.
    Go to Project/Properties, and in the Components tab, in Binary compatibility select the file *.cmp in the folder cmp.
    Click OK.
    Save the project.

    I don't see a 'cmp' directory

  25. #25

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by KenHorse View Post
    I don't see a 'cmp' directory
    I had named that folder "compat", but I usually use "cmp" for the folder name, and so I wrote there.
    Just rename the folder "compat" to "cmp".
    (anyway I will upload the zip again with the folder name already changed)

  26. #26
    Lively Member
    Join Date
    Feb 2007
    Posts
    83

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    One more stupid question if I may

    Got to File/Make... and make the OCX.
    Save the project.
    Close the IDE.
    Copy the *.OCX that you generated to the folder cmp
    Rename it as *.cmp
    Open the project in the IDE.
    Go to Project/Properties, and in the Components tab, in Binary compatibility select the file *.cmp in the folder cmp.
    Click OK.
    Save the project.

    I assume by that 2nd instance of "project", you mean the one you want to use the new SSTabEx in, correct?

  27. #27
    Lively Member
    Join Date
    Feb 2007
    Posts
    83

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Nevermind I figured it out

  28. #28

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Quote Originally Posted by KenHorse View Post
    One more stupid question if I may

    Got to File/Make... and make the OCX.
    Save the project.
    Close the IDE.
    Copy the *.OCX that you generated to the folder cmp
    Rename it as *.cmp
    Open the project in the IDE.
    Go to Project/Properties, and in the Components tab, in Binary compatibility select the file *.cmp in the folder cmp.
    Click OK.
    Save the project.

    I assume by that 2nd instance of "project", you mean the one you want to use the new SSTabEx in, correct?
    No, the "project" on that list is always the ocx project.

    But those steps are only necesary if you are going to compile the ocx more than once.
    They are necessary for keeping the compatibility of the ocx file if you compile the it later again, otherwise when loading the client that uses the old version of the ocx, you would get an error telling that the component could not be loaded (the client project, also called host project, is the exe project that uses the ocx).

    But doing so would not be really necessary if you are going to compile the ocx only once.

  29. #29
    Lively Member
    Join Date
    Feb 2007
    Posts
    83

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    As I am trying to "upgrade" from the previous version of SSTabEx, I can't get VB6 to allow me to remove the old component to add the new as they share the same 'name'......

  30. #30

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Are you using the SSTabEx in source code or have you compiled the OCX of the old version and you are using that now in the exe?

  31. #31
    Lively Member
    Join Date
    Feb 2007
    Posts
    83

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    I compiled and used the ocx. Finally figured the easiest thing to do was just replace the existing ocx (the original SSTabEx) with the new one. Problem solved

  32. #32

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    In that case you need to copy the old ocx file to the cmp folder of the project with new version and to set the compatibility to that file.
    Then compile the new ocx with the new version.

  33. #33
    Lively Member
    Join Date
    Jun 2010
    Posts
    105

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Hi Eduardo and thanks for your work and a much welcomed control. Now, I have compiled it as an ocx and been working on implementing a first instance in my project. And for over 2 weeks it has all worked fine. Then today suddenly something went hey-wack, as can be see on the screenshots. To the left, how it looks in the IDE designer and to the right how it looks when I run the project in the IDE.

    Name:  tabide.png
Views: 197
Size:  20.9 KB Name:  tabrun.png
Views: 199
Size:  9.7 KB

    What happens here is that whichever of the 2 tabs that is set to show when the form first displays loks ok, but when I click on the 2nd tab everything seems to be moved to the left with about 50% of the containers width. Now if set in code to show the tab in the images first, it displays fine but the same happens with the other tab when it's clicked to get selected.

    I have no idea "why" this happens now of a sudden, it has worked fine up until today. The only change I did in my code, as far as I can recall, between functional and non-function control is to change this code:
    Code:
    tabChartEntry.TabSel = CInt(GetIniVal(INICHT, "EntryMode", "0", sIniFile))
    to this code:
    Code:
    With tabChartEntry
       .TabCaption(0) = cLang.GetString("529")
       .TabCaption(1) = cLang.GetString("840")
       .TabSel = CInt(GetIniVal(INICHT, "EntryMode", "0", sIniFile))
    End With
    in the startup form's Load event. Changing it back makes no change to the above.

    BTW, all controls in the containers are placed either on a picturebox or a frame control, to possibly avoid subclassing issues.

    I have not changed anything in the SSTabEx's code, but I have added the code to my own ActiveX project, which also contains other controls, and thus I changed the files path to avoid file collisions. This shouldn't be a source of problem though and I know what I am doing here, and as said it has worked fine for about 14 days or so.

    Oh, I recall now one thing that has happened since last successful run, that "might" can have impacted. Yesterday, while I was out shortly there was a power break that outlasted my APC Power Backup system, and as far as I know it did with VB6 IDE running, I may even have had my project in run mode, but cannot really recall. Just leaving this here for your information in case it tells you something.

    Thanks again and hope you may have an idea...
    M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?

  34. #34

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Hello. Can you attach the form (or send it in private)?
    I'm thinking but I don't figure something that could be happening to cause that.

  35. #35
    Lively Member
    Join Date
    Jun 2010
    Posts
    105

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Hi Eduardo and thanks for quick reply. While I wrote my originally post I came to think of that power break, and then after it crossed my mind that some corrupt data got saved to the property bag or something. So I simply cut and pasted out the picture boxes with controls from the tab containers, deleted the control instance, sited a new tab and paste the picture boxes back - and not it all seems to work again. So I am fine. If it were to happen again, I will make a copy of the form immediately, before I start to experiment, and send it to you.

    Thanks.
    M$ vs. VB6 = The biggest betrayal and strategic mistake of the century!?

  36. #36
    New Member
    Join Date
    May 2020
    Posts
    4

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Changes to menu toolbar style
    Attachment 178157

    ctlSSTabEx Toolbar.zip
    Attached Images Attached Images  
    Last edited by ln_0; Aug 1st, 2020 at 09:41 AM.

  37. #37

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,389

    Re: (VB6) SSTabEx: SSTab replacement. Themed and with new features

    Hello, thanks for sharing it, they are nice effects.

    You have to take into account that if you leave the VisualStyles property to True and the program is manifested, it won't show the buttons styles.
    In my case I have the IDE manifested so I had to set the VisualStyles property to False to see the effect.

    Also, people with VB6 in other languages than Chinese can have problems loading the project.
    I'll upload here a version with the project's file name changed.
    Attached Files Attached Files

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