Page 6 of 6 FirstFirst ... 3456
Results 201 to 226 of 226

Thread: NewTab: tab control for VB6

  1. #201
    Lively Member
    Join Date
    Oct 2016
    Posts
    112

    Re: NewTab: tab control for VB6

    In TDI Mode how do I get the hWnd (or anything else) of the underlying form of the tab

  2. #202

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Hello, I added a TDIGetFormHwndByTab function.
    Please update to the new version.

  3. #203
    Lively Member
    Join Date
    Oct 2014
    Posts
    102

    Re: NewTab: tab control for VB6

    Hello Eduardo!
    I've been using the "NewTab" control you developed lately, it's very powerful, thank you for your efforts.
    Now there are some questions I would like to ask you how to solve:
    1. How to set the "NewTab" control property, in order to imagine the "SSTabEx" control, in the design mode, you can directly draw the required Lable, TextBox, ComboBox and other controls directly into different tabs, so as to facilitate the adjustment of the typography or set the properties of the controls in each tab, (instead of using "Move the controls to another tab" or "Move a control to this tab.") "Method);
    2. Can I add the property "Public Property TabKey(ByVal Index As Integer) As String" or "Public Property TabName(ByVal Index As Integer) As String". Tabs that are used to distinguish between different (unique names). "Index" or "TabCaption" cannot completely distinguish unique tabs, and "order" cannot be changed synchronously with the "TabCaption" value after the order is changed. In addition, you can set the value corresponding to "TabKey" or "TabName" in the property page. (Application scenario: When the software title is displayed in multiple Chinese languages, you need to assign different language characters to the "TabCaption attribute" according to the unique value "TabKey" value)
    3. If you can't add the "TabName" or "TabKey" attribute. Is it possible to add the "TabTag" and attributes to the "Property Page" so that the "Key" or "Name" value can be manually filled in to the "TabTag" at design time.
    4. In "TDI" mode, after the form is loaded, if you reset the value of "Caption" of the form, the form will be "detached" from the tab and will become a non-"TDI" form. (Application scenario: When the software title is displayed in multiple Chinese languages, the form title will be reset)
    Please help, thank you very much!



    TDIForms test_SetNewCaption.zip

    Name:  TDI.jpg
Views: 247
Size:  14.7 KB

  4. #204
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    168

    Re: NewTab: tab control for VB6

    Quote Originally Posted by smileyoufu View Post
    Hello Eduardo!
    I've been using the "NewTab" control you developed lately, it's very powerful, thank you for your efforts.
    You can use this

    Private Sub btnSetNewCaption_Click()
    Unload Me
    Me.Caption = "New Caption"
    Me.Show
    End Sub

    Surely Eduardo has a better way

  5. #205

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Update released.

    2024-04-22 Improved in TDI mode forms when the form's caption is changed.
    2024-04-22 Added TDIGetTabByFormHwnd function.

  6. #206

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Quote Originally Posted by smileyoufu View Post
    Hello Eduardo!
    I've been using the "NewTab" control you developed lately, it's very powerful, thank you for your efforts.
    Hello, thanks.

    Quote Originally Posted by smileyoufu View Post
    Now there are some questions I would like to ask you how to solve:
    1. How to set the "NewTab" control property, in order to imagine the "SSTabEx" control, in the design mode, you can directly draw the required Lable, TextBox, ComboBox and other controls directly into different tabs, so as to facilitate the adjustment of the typography or set the properties of the controls in each tab, (instead of using "Move the controls to another tab" or "Move a control to this tab.") "Method);
    I guess you must be using the control in source code, and I understand that you are asking how to change the current tab at design time (clicking the tab is disabled by default when running in source code as a protection for the subclassing).

    To turn the protection off, comment the first line: "#Const NOSUBCLASSINIDE = 1" or change the 1 by a 0.

    Or, change the current tab with the TabSel property from the property window.

    Quote Originally Posted by smileyoufu View Post
    2. Can I add the property "Public Property TabKey(ByVal Index As Integer) As String" or "Public Property TabName(ByVal Index As Integer) As String". Tabs that are used to distinguish between different (unique names). "Index" or "TabCaption" cannot completely distinguish unique tabs, and "order" cannot be changed synchronously with the "TabCaption" value after the order is changed. In addition, you can set the value corresponding to "TabKey" or "TabName" in the property page. (Application scenario: When the software title is displayed in multiple Chinese languages, you need to assign different language characters to the "TabCaption attribute" according to the unique value "TabKey" value)
    3. If you can't add the "TabName" or "TabKey" attribute. Is it possible to add the "TabTag" and attributes to the "Property Page" so that the "Key" or "Name" value can be manually filled in to the "TabTag" at design time.
    The TabTag property already exists. Its type is String.
    There is also another multipurpose property, it is TabData. Its type is Long.

    You can use any of these properties for storing custom data.

    Also there is a FindTab method that can be used to locate a tab by its TabTag or TabData values.


    Quote Originally Posted by smileyoufu View Post
    4. In "TDI" mode, after the form is loaded, if you reset the value of "Caption" of the form, the form will be "detached" from the tab and will become a non-"TDI" form. (Application scenario: When the software title is displayed in multiple Chinese languages, the form title will be reset)
    Please help, thank you very much!
    Fixed in the last update. Thanks for reporting.
    (Please test)

    I also added a TDIGetTabByFormHwnd method that is a companion for the TDIGetFormHwndByTab recently added.

  7. #207
    Lively Member
    Join Date
    Oct 2014
    Posts
    102

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Mojtaba View Post
    You can use this

    Private Sub btnSetNewCaption_Click()
    Unload Me
    Me.Caption = "New Caption"
    Me.Show
    End Sub

    Surely Eduardo has a better way
    Hello Mojtaba!
    Thank you so much for helping me!

  8. #208
    Lively Member
    Join Date
    Oct 2014
    Posts
    102

    Re: NewTab: tab control for VB6

    Hello Eduardo!
    1. I did use the controls in the source code. Following the method you instructed, after switching to an OCX file, you can already add controls on the various tabs.
    2. Reset the "Title" value of the form, and the form will be "detached" from the tab. After replacing the latest version of the file, the test results are used normally and the form is no longer "out of the box".
    3. Can the functions of TabTag, TabData, and TabKey be realized as shown in the red box in the screenshot below?
    Thank you very much!

    Name:  TabPag.png
Views: 215
Size:  32.0 KB

  9. #209

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Hello. There is currently no 'TabKey' property.

    About being able to set the TabTag and TabData properties at design time, I'm working in rearranging the property pages. Not sure it I'll have that finished today.

  10. #210
    Lively Member
    Join Date
    Oct 2014
    Posts
    102

    Re: NewTab: tab control for VB6

    Hello Eduardo!
    Thank you for your prompt response, and for the help you have given me!
    1. The "TabStrip" control has a "Key" attribute. It would be nice if you could implement the "TabKey" property in "NewTab", and it doesn't matter if you can't.
    2. "TabTag, TabData" can also basically replace the function of "TabKey" if it can be placed in the property page.

    Name:  TabStripKey.jpg
Views: 196
Size:  33.8 KB

    Thank you very much!

  11. #211

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Update released.

    Code:
    2024-04-24 Changed to OLE version 9.0.
    2024-04-24 Added property TabKey. That key can be used to set the current/active/selected tab with the Tab property now.
    2024-04-24 Added function GetTabOriginalIndex.
    2024-04-24 Now TabTag, TabData, TabFixedWidth and TabCustomColor properties can be set at design time.
    2024-04-24 Tabs property page split into two property pages (Icons went to a new property page).
    2024-04-24 Fixed bug in TabCustomColor property.

  12. #212

  13. #213

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Note that now it is possible to select a tab in code by its TabKey, like:

    Code:
    NewTab1.Tab = "Config"

  14. #214

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Opinion(s) wanted:
    Keys case sensitive or insensitive? In the current version they are case sensitive.

  15. #215
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,468

    Re: NewTab: tab control for VB6

    IMO case insensitive keys would be preferable (and likely to result in fewer questions/false bug reports for you). Somebody is going to accidentally type NewTab1.Tab = "config" and wonder why the tab isn't being selected.

  16. #216

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Quote Originally Posted by jpbro View Post
    IMO case insensitive keys would be preferable (and likely to result in fewer questions/false bug reports for you). Somebody is going to accidentally type NewTab1.Tab = "config" and wonder why the tab isn't being selected.
    Yeah, I agree. I'll change that.
    Thank you!

  17. #217

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Update released.

    2024-04-25 TabKeys are now case insensitive.

  18. #218
    Lively Member
    Join Date
    Oct 2014
    Posts
    102

    Re: NewTab: tab control for VB6

    Hello Eduardo!
    Thank you for your quick response, and for helping me!
    1. The new version is tested normally and has been used in my project, which solves the problem in the project and helps me a lot. Thank you very much!
    2. Regarding the value of "TabKey", my personal suggestion is that it should have "uniqueness (there should be no duplicate values)"
    3. For example, the "Key" value in the "ToolBar or TabStrip" property page can not be filled, if filled, the filled "Key" value is not allowed to be repeated, as shown in the screenshot below.
    Thank you very much!

    Name:  K2.png
Views: 155
Size:  13.2 KB

    Name:  K1.png
Views: 157
Size:  16.3 KB

  19. #219

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Yes, thanks for your testing!
    Update released. Keys now must be unique.

  20. #220
    Lively Member
    Join Date
    Aug 2023
    Posts
    64

    Re: NewTab: tab control for VB6

    Hi, a possible bug:

    I've added some labelplus controls inside a tab and the mousemove/mouseover events does not work in that labels (same code works ok if I put the controls outside the tab).

  21. #221
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    544

    Re: NewTab: tab control for VB6

    NewTab is changing the colors of all the labels I place on the tab to the ForeColorTabSel color. Notice in the screenshot that the labels are blue but should be vbButtonText. I can change it to vbButtonText in the designer but when I run the code it's changed to blue again.

    Name:  NewTab changing label colors.jpg
Views: 100
Size:  18.9 KB

    I'm seeing this only with label controls (which happen to be Krool's VBCCR labels, if that matters)

  22. #222

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Quote Originally Posted by AAraya View Post
    NewTab is changing the colors of all the labels I place on the tab to the ForeColorTabSel color. Notice in the screenshot that the labels are blue but should be vbButtonText. I can change it to vbButtonText in the designer but when I run the code it's changed to blue again.

    Name:  NewTab changing label colors.jpg
Views: 100
Size:  18.9 KB

    I'm seeing this only with label controls (which happen to be Krool's VBCCR labels, if that matters)
    Yes, if you use ambient, default color settings, then it will change them to the tab colors (by default).
    If you don't want that, set ChangeControls[Back|Fore]Color properties to False.

  23. #223

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Quote Originally Posted by zx81sp View Post
    Hi, a possible bug:

    I've added some labelplus controls inside a tab and the mousemove/mouseover events does not work in that labels (same code works ok if I put the controls outside the tab).
    I tested with a normal label, and the MouseMove event works fine.
    Why should I think that it is a problem with NewTab?

    Did you test LabelPlus with a SSTab?

  24. #224
    Lively Member
    Join Date
    Aug 2023
    Posts
    64

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    I tested with a normal label, and the MouseMove event works fine.
    Why should I think that it is a problem with NewTab?

    Did you test LabelPlus with a SSTab?
    I'm doing more tests because sometimes works, really don't know why. The problem could be in the LabelPlus side but I have more (custom controls) with same behaviour under NewTab. Only problems with the MouseMove/MouseOver events, all other things works fine. But may be my program, let me do more tests, I'll keep you in touch.

  25. #225
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    544

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    Yes, if you use ambient, default color settings, then it will change them to the tab colors (by default).
    If you don't want that, set ChangeControls[Back|Fore]Color properties to False.
    Thanks. Completely missed those properties. There are MANY properties for this wonderful control.

  26. #226

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,132

    Re: NewTab: tab control for VB6

    Quote Originally Posted by zx81sp View Post
    sometimes works, really don't know why.
    Check the ScaleMode of the Form (just a hunch).
    If non-Twins scalemodes cause problems, it must be an issue of those controls.

    Take into account this: NewTab does not have ScaleMode, it works always in twips no matter the ScaleMode of the form. The same as the SSTab control, and other control containers (other than the PictureBox).

Page 6 of 6 FirstFirst ... 3456

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