-
Apr 11th, 2024, 08:09 AM
#201
Lively Member
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
-
Apr 11th, 2024, 12:37 PM
#202
Re: NewTab: tab control for VB6
Hello, I added a TDIGetFormHwndByTab function.
Please update to the new version.
-
Apr 22nd, 2024, 03:40 AM
#203
Lively Member
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
-
Apr 22nd, 2024, 02:36 PM
#204
Addicted Member
Re: NewTab: tab control for VB6
Originally Posted by smileyoufu
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
-
Apr 22nd, 2024, 07:58 PM
#205
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.
-
Apr 22nd, 2024, 07:59 PM
#206
Re: NewTab: tab control for VB6
Originally Posted by smileyoufu
Hello Eduardo!
I've been using the "NewTab" control you developed lately, it's very powerful, thank you for your efforts.
Hello, thanks.
Originally Posted by smileyoufu
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.
Originally Posted by smileyoufu
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.
Originally Posted by smileyoufu
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.
-
Apr 22nd, 2024, 10:50 PM
#207
Lively Member
Re: NewTab: tab control for VB6
Originally Posted by Mojtaba
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!
-
Apr 22nd, 2024, 10:52 PM
#208
Lively Member
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!
-
Apr 23rd, 2024, 03:33 PM
#209
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.
-
Apr 24th, 2024, 02:00 AM
#210
Lively Member
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.
Thank you very much!
-
Apr 24th, 2024, 05:40 PM
#211
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.
-
Apr 24th, 2024, 05:44 PM
#212
Re: NewTab: tab control for VB6
-
Apr 25th, 2024, 12:21 PM
#213
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"
-
Apr 25th, 2024, 12:58 PM
#214
Re: NewTab: tab control for VB6
Opinion(s) wanted:
Keys case sensitive or insensitive? In the current version they are case sensitive.
-
Apr 25th, 2024, 04:19 PM
#215
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.
-
Apr 25th, 2024, 04:33 PM
#216
Re: NewTab: tab control for VB6
Originally Posted by jpbro
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!
-
Apr 25th, 2024, 04:44 PM
#217
Re: NewTab: tab control for VB6
Update released.
2024-04-25 TabKeys are now case insensitive.
-
Apr 25th, 2024, 07:08 PM
#218
Lively Member
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!
-
Apr 25th, 2024, 09:09 PM
#219
Re: NewTab: tab control for VB6
Yes, thanks for your testing!
Update released. Keys now must be unique.
-
May 28th, 2024, 11:08 AM
#220
Lively Member
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).
-
May 28th, 2024, 11:24 AM
#221
Fanatic Member
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.
I'm seeing this only with label controls (which happen to be Krool's VBCCR labels, if that matters)
-
May 28th, 2024, 02:56 PM
#222
Re: NewTab: tab control for VB6
Originally Posted by AAraya
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.
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.
-
May 28th, 2024, 03:01 PM
#223
Re: NewTab: tab control for VB6
Originally Posted by zx81sp
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?
-
May 29th, 2024, 04:35 AM
#224
Lively Member
Re: NewTab: tab control for VB6
Originally Posted by Eduardo-
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.
-
May 29th, 2024, 08:39 AM
#225
Fanatic Member
Re: NewTab: tab control for VB6
Originally Posted by Eduardo-
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.
-
May 29th, 2024, 10:07 AM
#226
Re: NewTab: tab control for VB6
Originally Posted by zx81sp
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).
Last edited by Eduardo-; May 29th, 2024 at 10:11 AM.
-
Jul 1st, 2024, 11:24 AM
#227
Re: NewTab: tab control for VB6
Ocx project can first check (remote server file) to generate TLB, then set it to binary compatibility and select the generated OCX file.
If you don't want to bring OCX files to others, you can refer to TLB instead. After the OCX is generated by the client computer, you can select binary compatibility to refer to the OCX.
---------------------------
Activation control' VB.UserControl' failed. This control may not be compatible with your application. Make sure that the version of the control you are using is provided by your application.
---------------------------
If the control is edited again, the project that references the control will be useless. What should I do?
why use NewTab01.cmp?
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\SysWow64\stdole2.tlb#OLE Automation
Object={66E63055-5A66-4C79-9327-4BC077858695}#9.0#0; NewTab01.ocx
I CREATE NEW VB6 PROJECT ,ADD OCX,BUT GUID NOT SAME
Object={3D29F268-3323-498B-96B7-7EC86FDA6EA8}#4.0#0; NewTab01.ocx
YOU CAN USE ocx project for create TLB ,SO ALL project can use tlb,not ocx
Code:
NewTabCtl.vbp
ServerSupportFiles=1
CompatibleEXE32="..\test compiled ocx\NewTab01.TLB"
it will create a tlb file for ocx
ServerSupportFiles=1
-
Jul 1st, 2024, 11:29 AM
#228
Re: NewTab: tab control for VB6
An image on one of your forms takes up 1mb of space.
If we can make the source code the same as the package, we can add it to different projects by connecting it once, which will be more convenient.
Some spaces need to be initialized from submain. You can also add an interface intmain to it.
-
Jul 1st, 2024, 11:37 AM
#229
Re: NewTab: tab control for VB6
Originally Posted by zx81sp
Hi Eduardo
Is possible to use this control integrated in one project without using ocx?
I've created a small project just for testing and adding the source code of the control (creating a group of projects), works fine in the IDE but I can't compile it since it asks for a binary compatibility file. When I setup the binary compatibility then appears some errors like "Get instruction missed..."
OCX works fine but should be redistributed, registered...
Thanks
This should be able to do, very convenient.If any open source space code can be added to our program, it can also be removed.
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
|