-
Re: NewTab: tab control for VB6
Update released.
2024-02-08 Bug fix in TabMaxWidth property.
2024-02-08 Bug fix in FlatBorderMode = ntBorderTabs.
2024-02-07 Added TabCustomColor property (runtime). Now each tab can have its own colors.
2024-02-07 Bug fix when CanReorderTabs is True and the user clicks the icon of a non active tab.
2024-02-04 Bug fix in ChangeControlsForeColor procedure.
-
3 Attachment(s)
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Update released.
TDIMode now can be set to ntTDIModeForms. It works similar to an MDI form but tabbed.
Of course, the forms don't need to be MDIChild but normal.
There is a new sample project for testing this feature in the download.
Please test and report back.
Thanks Eduardo for this great tool
There are one or two minor problems
Tabs are not closed in right-to-left mode
Dragging and dropping the tab is also not done well in this mode
Please solve this problem
Attachment 190673
Attachment 190671
Right-to-left mode for Asian languages ??such as Persian and Arabic and . . . is used
Attachment 190674
-
Re: NewTab: tab control for VB6
Dear Eduardo,
I have started checking out the 'Forms mode'. And, I have to say that any amount of thanks is not enough for you. Wonderful! Absolutely wonderful!
Just one quick request:
--
For SetActiveTab function, for the 2nd parameter (for NTFindTabMethodConstants), if you deem fit and if you feel it makes sense, then you may kindly please add ntFindCaptionAnywhere, ntFindCaptionFirst and ntFindCaptionLast also (of course with their respective functionalities). That would be quite helpful, I thought. The first matching tab for 'found anywhere', 'found at start' and 'found at the last' perhaps can be set as the active tab.
--
And, by the way, as far as I can observe, Debug.Print mMouseIsOverIcon_Tab is not commented out in the control's code. You may please comment it out in the next release. Otherwise, in the immediate window, it keeps printing -1.
Thanks a TON, once again.
Kind Regards.
-
Re: NewTab: tab control for VB6
Dear Eduardo,
Greetings!
In the following function, TabCaption is actually the added form's caption, as far as I can observe. So, is it possible to include FormTag parameter also so that is easier to check based on the form's tag (which can be a unique distinctive short string set by me) as to whether to add that form or not. My form's captions can become considerably lengthy sometimes. Hence, the request. If not possible to introduce a new parameter, possible to change the name TabCaption to TabCaptionOrTag so that you can check for both the form's caption and also tag?
--
Quote:
NewTab1_TDIBeforeNewTab(ByVal TabType As NewTabCtl.NTTDINewTabTypeConstants, ByVal TabNumber As Long, TabCaption As String, LoadControls As Boolean, Cancel As Boolean)
--
Kind Regards.
-
Re: NewTab: tab control for VB6
Dear Eduardo,
I found that:
The following works
Quote:
ctab.TabCustomColor(1, ntCCForeColor) = vbGreen
ctab.TabCustomColor(1, ntCCForeColorTabSel) = vbRed
i.e. ForeColor is getting set correctly
But, the following does not work
Quote:
ctab.TabCustomColor(1, ntCCBackColorTab) = vbRed
ctab.TabCustomColor(1, ntCCBackColorTabSel) = vbGreen
i.e. BackColor is not getting set at all.
Am I doing any mistake? Kindly let me know. ctab is a normal NewTab only (i.e. TDIModeNone). Actually, with TDIModeForms also, I could not set the backcolor.
By the way, if at all possible, kindly make ntCCBackColorTab as default for the 2nd param of TabCustomColor, so that I can just use ctab.TabCustomColor(1) = color. If you think ForeColor will be the one often used by users, then you can make that default too. Your decision, finally.
Thanks a TON, as always, for all that you are doing for us.
Kind Regards.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Mojtaba
Thanks Eduardo for this great tool
There are one or two minor problems
Tabs are not closed in right-to-left mode
Dragging and dropping the tab is also not done well in this mode
Please solve this problem
Hello. The issues will be solved in the next release (maybe later today or tomorrow).
Thanks for reporting.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
softv
Dear Eduardo,
I have started checking out the 'Forms mode'. And, I have to say that any amount of thanks is not enough for you. Wonderful! Absolutely wonderful!
Just one quick request:
--
For SetActiveTab function, for the 2nd parameter (for NTFindTabMethodConstants), if you deem fit and if you feel it makes sense, then you may kindly please add ntFindCaptionAnywhere, ntFindCaptionFirst and ntFindCaptionLast also (of course with their respective functionalities). That would be quite helpful, I thought. The first matching tab for 'found anywhere', 'found at start' and 'found at the last' perhaps can be set as the active tab.
--
Could you please explain how exactly that should work? I guess they would be partial matches of tab captions?
Quote:
Originally Posted by
softv
And, by the way, as far as I can observe, Debug.Print mMouseIsOverIcon_Tab is not commented out in the control's code. You may please comment it out in the next release. Otherwise, in the immediate window, it keeps printing -1.
Thanks a TON, once again.
Kind Regards.
Yes, it will be removed in the next release, thanks.
Quote:
Originally Posted by
softv
Dear Eduardo,
Greetings!
In the following function, TabCaption is actually the added form's caption, as far as I can observe. So, is it possible to include FormTag parameter also so that is easier to check based on the form's tag (which can be a unique distinctive short string set by me) as to whether to add that form or not. My form's captions can become considerably lengthy sometimes. Hence, the request. If not possible to introduce a new parameter, possible to change the name TabCaption to TabCaptionOrTag so that you can check for both the form's caption and also tag?
--
--
Kind Regards.
It is the same explanation as for message #157.
From inside the NewTab control I don't have access to form's properties. I see forms as windows. I can have the Caption because it is the caption of the window, but I cannot read the Tag property or other properties that have no related values to the window itself (at API level).
Quote:
Originally Posted by
softv
Dear Eduardo,
I found that:
The following works
i.e. ForeColor is getting set correctly
But, the following does not work
i.e. BackColor is not getting set at all.
Am I doing any mistake? Kindly let me know. ctab is a normal NewTab only (i.e. TDIModeNone). Actually, with TDIModeForms also, I could not set the backcolor.
By the way, if at all possible, kindly make ntCCBackColorTab as default for the 2nd param of TabCustomColor, so that I can just use ctab.TabCustomColor(1) = color. If you think ForeColor will be the one often used by users, then you can make that default too. Your decision, finally.
Thanks a TON, as always, for all that you are doing for us.
Kind Regards.
For the color properties to work, the NewTab control should not be using the Windows theme (visual style). ForeColor related ones work anyway, but only those.
The Style must be plain or other non-windows.
I made the parameter optional being ntCCBackColorTab the default one. That will be in the next release.
But I'll wait until understanding how the find captions "as any" should work, so I make all the updates in the same release.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Hello. The issues will be solved in the next release (maybe later today or tomorrow).
Thanks for reporting.
Thanks Eduardo, I look forward to it
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Could you please explain how exactly that should work? I guess they would be partial matches of tab captions?
Yes, it will be removed in the next release, thanks.
It is the same explanation as for
message #157.
From inside the NewTab control I don't have access to form's properties. I see forms as windows. I can have the Caption because it is the caption of the window, but I cannot read the Tag property or other properties that have no related values to the window itself (at API level).
For the color properties to work, the NewTab control should not be using the Windows theme (visual style). ForeColor related ones work anyway, but only those.
The Style must be plain or other non-windows.
I made the parameter optional being ntCCBackColorTab the default one. That will be in the next release.
But I'll wait until understanding how the find captions "as any" should work, so I make all the updates in the same release.
// Could you please explain how exactly that should work? I guess they would be partial matches of tab captions? //
yes, partial matches. 'Anywhere' would mean any part of the caption - EITHER from the start to some middle portion (OR) from some middle portion to the end (OR) from some middle portion to some other other middle portion. When you are searching for partial matches (with 'Anywhere' option), if in case you find the whole caption itself to be matching fully, then that would count as a 'successful find' as well, I feel. Basically, an Instr (on the caption string) which returns nonzero will do? By the way, since there can be more than one tab matching a partial string, if at all you deem fit and if at all possible (considering your time constraints and all that) you can provide optional 3rd and 4th parameters which say from which tab (inclusive) to which tab (inclusive) the find operation needs to be effected.
SetActiveTab "string to find", ntFindCaption, [StartingFromWhichTab=1], [UptoWhichTab=N]
(N - last tab)
// I can have the Caption because it is the caption of the window, but I cannot read the Tag property or other properties ... .. . //
The situation is the same whether NewTab control is used as an ocx OR inbuilt into a standard exe project. Right?
// For the color properties to work, the NewTab control should not be using the Windows theme (visual style). ForeColor related ones work anyway, but only those. The Style must be plain or other non-windows. //
Thanks. Will check it out.
// I made the parameter optional being ntCCBackColorTab the default one. That will be in the next release. //
Thanks, Eduardo.
Thanks a LOT, for all that you do for us. Thanks.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
softv
// I can have the Caption because it is the caption of the window, but I cannot read the Tag property or other properties ... .. . //
The situation is the same whether NewTab control is used as an ocx OR inbuilt into a standard exe project. Right?
No, if you put the control in a standard exe you can access any property of the forms of the local project.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
No, if you put the control in a standard exe you can access any property of the forms of the local project.
I am using your control in a standard exe project only. So, you mean to say that in that case its possible for you to give access to the form's Tag property in the TDIBeforeNewTab function via TabCaptionOrTag parameter? Or, you are suggesting me something else?
'TabCaptionOrTag' - referring to what I had suggested in my post no. 164
Kind Regards.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
softv
I am using your control in a standard exe project only. So, you mean to say that in that case its possible for you to give access to the form's Tag property in the TDIBeforeNewTab function via TabCaptionOrTag parameter? Or, you are suggesting me something else?
'TabCaptionOrTag' - referring to what I had suggested in my post no. 164
Kind Regards.
I only do the the code for the ocx.
I'm not going to maintain two different versions.
-
Re: NewTab: tab control for VB6
Please describe the scenario where you need that. Let's see how it could be done in another way.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
I only do the the code for the ocx.
I'm not going to maintain two different versions.
Oh. Okay. I understand now. That's fine then. I will manage with captions itself.
Quote:
Please describe the scenario where you need that. Let's see how it could be done in another way.
I was just thinking of tags as an extra layer of convenience. That's all. So, no special scenario as such. Whatever facilities you have provided as of now itself are simply splendid.
I take this opportunity to once again thank you for your fabulous control.
Bringing in "Forms Mode" (that too, in such an easy manner) is mighty useful and fantastic. Thanks a TON, as always.
Kind Regards.
-
Re: NewTab: tab control for VB6
Update released.
2024-03-14 Added a third parameter StartingTab to FindTab and SetActiveTab methods.
2024-03-14 Added ntFindPartialCaption and ntFindPartialCaptionReverse options to parameter 'Method' of FindTab and SetActiveTab methods.
2024-03-13 Bug fix regarding RightToLeft.
2024-03-12 Bug fix related to TabWidthStyle default setting.
2024-03-12 TabCustomColor property second parameter made optional, defaulting to ntCCBackColorTab.
Please test.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Update released.
2024-03-14 Added a third parameter StartingTab to FindTab and SetActiveTab methods.
2024-03-14 Added ntFindPartialCaption and ntFindPartialCaptionReverse options to parameter 'Method' of FindTab and SetActiveTab methods.
2024-03-13 Bug fix regarding RightToLeft.
2024-03-12 Bug fix related to TabWidthStyle default setting.
2024-03-12 TabCustomColor property second parameter made optional, defaulting to ntCCBackColorTab.
Please test.
1 The problem of closing tabs RightToLeft has been fixed
2 In maximized window mode, the position of the form is moved
Also, in right to left mode, it does not display the form inside the tab
3 in the return mode, the location of the first tab is moved to the last
Watch the video
https://bayanbox.ir/view/84846585358.../Untitled1.mp4
-
Re: NewTab: tab control for VB6
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Hello. Please test now.
Thank you so much, Eduardo, for the new release.
It might take some time for me to check it out. Once done, I shall write here. Thanks a TON, once again.
Kind Regards.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Hello. Please test now.
Hi
Normally, there is no problem
After changing the size of the window or maximized, the place of the forms that are opened inside the tab will be moved
By changing the size of the form, the content inside the tab is messed up
The location of the form that opens inside the tab should be 0 from the top and left side
Watch the video
https://www.youtube.com/watch?v=slke...jtabaEskandari
-
1 Attachment(s)
Re: NewTab: tab control for VB6
Hello. I fixed the main issue of the positioning on resize, but regarding all the other options I'm considering what to do.
I'm thinking of limiting TDI mode and RightToLeft to Top Orientation only... Attachment 190793
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Hello. I fixed the main issue of the positioning on resize, but regarding all the other options I'm considering what to do.
I'm thinking of limiting TDI mode and RightToLeft to Top Orientation only...
Attachment 190793
I tested it, now there is no problem
In my opinion, the two main modes are important, the other modes are not used much (left to right And right to left)
But if you have time, work on other modes as well
Thank you very much for your great work, it is very useful for me and I am going to use it in a project
-
2 Attachment(s)
Re: NewTab: tab control for VB6
Hi Eduardo, another problem that bothers me is that when I use the shell for the form, the form window is displayed in tabs.
I indicated with a red box that the window will be displayed in the leaves
If the rest of the forms were opened without a frame, would this problem be solved?
-
Re: NewTab: tab control for VB6
I have to say that I've read the above message several times and I have no idea what you are talking about. I can't understand the explanation nor the image.
Please try to explain the issue with other words. For example the phrase "when I use the shell for the form" is very disconcerting to me.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
I have to say that I've read the above message several times and I have no idea what you are talking about. I can't understand the explanation nor the image.
Please try to explain the issue with other words. For example the phrase "when I use the shell for the form" is very disconcerting to me.
I mean software skins for beautifying the form like CodJock Skinning , ...
Tools to create beautiful forms
The form is displayed as a window in the tabs
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Mojtaba
I mean software skins for beautifying the form like CodJock Skinning , ...
Tools to create beautiful forms
The form is displayed as a window in the tabs
Ahhhhh, then the TDI mode might be incompatible with CodeJock Skin component...
Or something should be made in the Skin component configuration side to avoid those issues.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Ahhhhh, then the TDI mode might be incompatible with CodeJock Skin component...
Or something should be made in the Skin component configuration side to avoid those issues.
Unfortunately the skin is placed on all forms and the TDI mode does not work by default and is displayed as another window in the tab.
I don't know how to solve the problem.:(
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Mojtaba
Unfortunately the skin is placed on all forms and the TDI mode does not work by default and is displayed as another window in the tab.
I don't know how to solve the problem.:(
I never used CodeJock components. To find a solution would require to study the documentation of the skin component, how to avoid applying skin to certain forms or elements.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
I never used CodeJock components. To find a solution would require to study the documentation of the skin component, how to avoid applying skin to certain forms or elements.
I tried with some other tools and it was the same
If the forms that were in the open tab were without frames, I think the problem would be solved
That is, only the form page should be displayed in the sheet, not the entire window
Form2.BorderStyle = 0
Form3.BorderStyle = 0
You can test with this mode?
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Mojtaba
Form2.BorderStyle = 0
Form3.BorderStyle = 0
You can test with this mode?
To test what?
BorderStyle 0 are not treated for TDI mode (anyway I don't understand what you mean).
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
To test what?
BorderStyle 0 are not treated for TDI mode (anyway I don't understand what you mean).
Sorry, I can't explain well in English
So I have to look for another way
Thank you for your time
-
Re: NewTab: tab control for VB6
Any test that involves having the CodeJock skin component, I won't be able to perform it because I don't have it (and don't want to install it).
-
1 Attachment(s)
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Any test that involves having the CodeJock skin component, I won't be able to perform it because I don't have it (and don't want to install it).
Hi, I solved this problem by CodeJock
-------------------------------------------
Another question, Eduardo
I want to open a form in the home tab
Can this be done ?
-
Re: NewTab: tab control for VB6
Convert your form to a user control.
If you insist in having a form in a form then use the SetParent API, but you can get strange behavior
-
Re: NewTab: tab control for VB6
Hello,
Quote:
Originally Posted by
Mojtaba
Hi, I solved this problem by CodeJock
-------------------------------------------
Great!
Quote:
Originally Posted by
Mojtaba
Another question, Eduardo
I want to open a form in the home tab
Can this be done ?
I issued an update to make this possible, please update.
Then to hide the home tab, add this line somewhere (Form_Load is a good place):
Code:
TabVisible(0) = False
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
Hello,
I issued an update to make this possible, please update.
Then to hide the home tab, add this line somewhere (Form_Load is a good place):
Code:
TabVisible(0) = False
I have done it
Great, Thank you
-
Re: NewTab: tab control for VB6
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
-
Re: NewTab: tab control for VB6
First compile the OCX to have a copy of it in order to set the binary compatibility. Then you should be able to add the .ctl file to any project without the need to distribute the OCX file.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
VanGoghGaming
First compile the OCX to have a copy of it in order to set the binary compatibility. Then you should be able to add the .ctl file to any project without the need to distribute the OCX file.
I can't compile the OCX with binary compatibility since it shows same errors like compiling it with the whole project. I've readed the thread and I guess this only will work in OCX mode :(
Thanks anyway
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
zx81sp
Hi Eduardo
Is possible to use this control integrated in one project without using ocx?
Yes, of course.
Quote:
Originally Posted by
zx81sp
I've created a small project just for testing and adding the source code of the control (creating a group of projects)
If you want to integrate this control into a standard exe project, then you don't need a project group but only the standard exe project and add all the files to it.
-
Re: NewTab: tab control for VB6
Quote:
Originally Posted by
Eduardo-
if you want to integrate this control into a standard exe project, then you don't need a project group but only the standard exe project and add all the files to it.
I've tried it but doesn't work. I have a project that uses the ocx version so I've tried to add all the control files to it and remove the ocx reference, no errors in that part.
When I create a empty form and try to add a newtab control it stops in this sentence:
Attachment 191072
EDITED: I''ve found the trick. The file pagNewTabTabs is referenced to "NewTabCtl" that is the original project:
Code:
Begin NewTabCtl.NewTab NewTab1
I've changed that for my project name and all seems work fine (also changed pagNewTabThemes)
Thanks!