Page 9 of 9 FirstFirst ... 6789
Results 321 to 351 of 351

Thread: NewTab: tab control for VB6

  1. #321

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by fabel358 View Post
    I tried some settings and I can't restore the initial conditions . Is there a possibility of a reset?
    I don't know what you mean by "settings", "initial conditions" and "reset".
    Unless you are very, very specific about what you did, what you expected and what you got...

  2. #322

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    For initial conditions delete the control and add a new one.
    Or close the project without saving and open it again.

  3. #323

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Sometimes with controls that have many properties, and properties that we don't know what they do, we can get to a situation that we want to go back but don't know how.
    Unfortunately VB6 does not provide a way to undo changes in properties.
    Controls could keep track of the changes and offer a way to go back or to go forward, like a "history".
    I never saw a control like that, but is possible.

    The only thing I do when I get to that "state", is to close the project without saving. In case that you didn't do other important changes that need to be preserved... That's why I save the project frequently while it is in a good state.

  4. #324
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    I'll start by saying that "NewTab01.ocx" is a great job, however I found what I think is a "bug".
    If I place a flexgrid with MsFlexGrid on NewTab, populate it with data and with the Flex_MouseMove subroutine, set a different tooltiptext for each cell and a Toolitip in the NewTab, it happens that in the IDE everything works as expected. If I compile the code, moving the mouse over the flexgrid, instead of the flexgrid tooltiptext appearing, the newtab tooltiptext continues to appear.
    I add the code; to make it work open a new form, place NewTab1 on it and inside this MsFlexGrid with the name Flex and verify.
    In a Form:
    Code:
    Option Explicit
    
    
    Private Sub Flex_MouseMove(Button As Integer, Shift As Integer, x As Single, y _
        As Single)
       Dim lRow             As Integer
       Dim lCol             As Integer
       Dim Tip              As String
       With Flex
          lRow = .MouseRow
          lCol = .MouseCol
          Tip = .TextMatrix(lRow, lCol)
          If LenB(Tip) Then
             .ToolTipText = Tip
          End If
       End With
    
    End Sub
    
    Private Sub Form_Load()
       Dim x                As Integer
       Dim y                As Integer
    
       With Flex
          For y = 1 To .Cols - 1
             For x = 1 To .Rows - 1
                .TextMatrix(x, y) = CStr(x) & " - " & CStr(y)
             Next x
          Next y
       End With
    
       NewTab1.ToolTipText = "This is NewTAB01"
    End Sub
    Last edited by fabel358; Jul 3rd, 2025 at 07:29 AM.

  5. #325

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    It seems there is a bug in the MSFlexGrid. It also happens with a bare UserControl. But with the UserControl of the same project it also happens in the IDE.
    On other hand, a PictureBox works fine.

    Attached is the test project.

    Anyway, why do you want to put a ToolTipText for the whole NewTab control? Perhaps you rather woud like to put tooltip text to the individual tabs. For that use the TabToolTipText property.
    Attached Files Attached Files

  6. #326
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    It seems there is a bug in the MSFlexGrid. It also happens with a bare UserControl. But with the UserControl of the same project it also happens in the IDE.
    On other hand, a PictureBox works fine.

    Attached is the test project.

    Anyway, why do you want to put a ToolTipText for the whole NewTab control? Perhaps you rather woud like to put tooltip text to the individual tabs. For that use the TabToolTipText property.
    However, with TabCtl32.ocx, this problem does not happen, regardless of whether tooltiptext or TabToolTipText is used in NewTab01.ocx

  7. #327

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by fabel358 View Post
    However, with TabCtl32.ocx, this problem does not happen, regardless of whether tooltiptext or TabToolTipText is used in NewTab01.ocx
    Yes, it seems to be a problem of VB6's UserControl (in what is based the NewTab) with MSFlexGrid or maybe with any third party control (that would require to check and see).

    Anyway, I don't see any usefulness in setting the ToolTipText property in the NewTab control. That property is automatically added by VB, I didn't add the feature myself. I think it makes no sense for this kind of control.

    What I did add, is the TabToolTipText property.

    Quote Originally Posted by fabel358 View Post
    However, with TabCtl32.ocx, this problem does not happen, regardless of whether tooltiptext or TabToolTipText
    The SSTab did not have the TabToolTipText property.

    In summary: I don't think there is much I can do since it is a VB6 bug. On the other hand, I don't think it is a real issue, because I don't see a real life case when setting the ToolTipText on a NewTab control would make much sense.

    What were you trying to do?

  8. #328
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    We don't quite understand each other. What I was interested in was not so much having the ToolTipText property for the "TAB"; I was interested in being able to have ToolTipText working in the flexgrid (as I showed in the example); adding msFlexGrid to NewTab - whether or not it has "ToolTipText" set, does not make the ToolTipText of the msFlexGrid appear - or rather: it works in the IDE but not in the compiled program. I repeat that the problem, with TabCtl32.ocx (which is less performant and less beautiful than NewTab01.ocx) does not happen; to verify what I write it is sufficient to change NewTab01.ocx with TabCtl32.ocx and exactly what I am describing happens. So I do not believe it is a bug of VB6.

  9. #329

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by fabel358 View Post
    So I do not believe it is a bug of VB6.
    Fortunately, these kind of things are much easier than believing or not believing. We can test them:
    Attached Files Attached Files

  10. #330

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    And when I say VB6, it is because NewTab is made in Vb6. Yes, it is a bug in NewTab, but one I'm not able to fix because it is a VB6 bug.

    I don't have any control regarding how Vb6 handles the tool tips.

    So, the only solution I see is to use another tool tip system.

  11. #331

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Well, there is another solution. Use the VBFlexGrid. I just tested and the problem seems to be with MSFleGrid, MSHFlexGrid, and maybe all third party non-VB6 generated OCX, or at least MS-ones, but not with third party controls created with VB6.
    It does not happen with intrinsic controls either (such as TextBox, PictureBox, etc.)

    The VBFlexGrid is a MSFlexGrid replacement created by Krool and with many advantages (for example supporting Unicode and many other improvements).

  12. #332
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    Now I understand what you meant when you explained that it is a bug of VB6. I can't use VBFlexGrid because I had to implement functions in msFlexGrid, which Krool's VBFlexgrid doesn't have (I had already asked Krool about this months ago); I mean I don't want to get bogged down in re-adapting and rewriting a lot of the code. So I'm staying with TabCtl32.ocx, even if your control is much better.
    Many thanks.

  13. #333

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by fabel358 View Post
    Now I understand what you meant when you explained that it is a bug of VB6. I can't use VBFlexGrid because I had to implement functions in msFlexGrid, which Krool's VBFlexgrid doesn't have (I had already asked Krool about this months ago); I mean I don't want to get bogged down in re-adapting and rewriting a lot of the code. So I'm staying with TabCtl32.ocx, even if your control is much better.
    Many thanks.
    I tested a workaround and it worked: just place the MSFlexGrid inside a PictureBox:

    PS: I'm curious, what is the feature that the VBFlexGrid lacks and MSFlexGrid has?
    Attached Files Attached Files

  14. #334
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    Neither Grid has the function I wanted, so I created it for MsFlexGrid because I didn't want to get bogged down in adapting the code for VBFlexGrid. I needed a function that would allow me to have text in different styles and even different colors within the same cell. I achieved this through the use of pictureboxes with relative manipulation of row heights.Attachment 195109

    Here's the effect I wanted; I've removed some of the names for privacy but there's enough visibility to see what I mean.
    Name:  Immagine2.jpg
Views: 1881
Size:  8.3 KB
    P.S. If you don't see it, I'll provide the Google Drive links
    Last edited by fabel358; Jul 6th, 2025 at 12:43 PM.

  15. #335
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    I also verified what you wrote: I introduced the FlexGrid in a PictureBox and now the custom ToolTipText actually works. Congratulations!

  16. #336

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by fabel358 View Post
    Neither Grid has the function I wanted, so I created it for MsFlexGrid because I didn't want to get bogged down in adapting the code for VBFlexGrid. I needed a function that would allow me to have text in different styles and even different colors within the same cell. I achieved this through the use of pictureboxes with relative manipulation of row heights.Attachment 195109

    Here's the effect I wanted; I've removed some of the names for privacy but there's enough visibility to see what I mean.
    Name:  Immagine2.jpg
Views: 1881
Size:  8.3 KB
    P.S. If you don't see it, I'll provide the Google Drive links
    Ah, OK, then the MSFlexGrid didn't support what you wanted either. But I mean, why the same code (the same workaround) that you used with MSFlexgrid could not be used with VBFlexGrid?

    Quote Originally Posted by fabel358 View Post
    I also verified what you wrote: I introduced the FlexGrid in a PictureBox and now the custom ToolTipText actually works. Congratulations!

  17. #337
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    I already gave the answer.
    My project is finished. It has 21 tabs, with 5 flexgrids per tab, plus more in other forms; just replacing TabCtl32.ocx with your NewTab01.ocx, despite the ease of replacing one ocx with the other, gave me the nasty surprise of the impossibility of custom tooltiptexts in the grid (at least there was a FAQ that would have warned me of the problem - but I think you didn't even know about this defect); not to mention the different sizes of the various themes, hence the use of the most generic theme (i.e. sstab).
    Imagine replacing more than 100 flexgrids on an already finished project: any difference in the management of anything, would cost me hours and hours to re-adapt all the code.
    No thanks!
    Last edited by fabel358; Jul 6th, 2025 at 05:05 PM.

  18. #338

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    I'm not saying that you should do it, but just for the record, you could replace the MSFlexGrid with The VBFlexGrid quite easily.

    1) Make a backup copy of the whole project (just in case that things go wrong, to be able to go back).
    2) Get some tool to make text replacements on multiple files. I use TexRep.
    3) Register VBFlexGrid v18.
    4) Replace in the vbp file
    Code:
    Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; MSFLXGRD.OCX
    with
    Code:
    Object={075212A8-C1CF-444E-939D-F6046CCDBC08}#1.0#0; VBFLXGRD18.ocx
    5) Replace in the frm files
    Code:
    Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
    with
    Code:
    Object = "{075212A8-C1CF-444E-939D-F6046CCDBC08}#1.0#0"; "VBFLXGRD18.ocx"
    and
    Code:
    MSFlexGridLib.MSFlexGrid
    with
    Code:
    VBFLXGRD18.VBFlexGrid
    And... if everything goes right, the project should open now using all VBFlexGrids instead of MSFlexGrids.
    And if not... delete and put the backup back.

    5 minutes.
    OK, 10 minutes for being the first time.

  19. #339
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    We don't understand each other.
    My project has many "forms" and more than 31 thousand lines of code; "texrep" does not allow to select specific extensions, such as .vbp or .frm; even replacing the files with *.*, in several files the MsFlexGrid control remained, despite "TexRep" having indicated the replacement.
    I would have liked to trust your advice, but your suggestion is valid for maybe a few hundred lines of code and half a dozen controls.
    Or I should have started my application already with the NewTab01.ocx and VBFLXGRD18.ocx controls perfectly working and not "work in progress", building all the architecture around them.
    Thanks for your patience and do not feel offended if I do not follow your suggestions.

  20. #340

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by fabel358 View Post
    We don't understand each other.
    My project has many "forms" and more than 31 thousand lines of code; "texrep" does not allow to select specific extensions, such as .vbp or .frm;
    Yes, it does.

    Quote Originally Posted by fabel358 View Post
    even replacing the files with *.*, in several files the MsFlexGrid control remained, despite "TexRep" having indicated the replacement.
    I would have liked to trust your advice, but your suggestion is valid for maybe a few hundred lines of code and half a dozen controls.
    You can replace any number of controls in any number of forms at once (in less than 1 second).

    Quote Originally Posted by fabel358 View Post
    Thanks for your patience and do not feel offended if I do not follow your suggestions.
    No, of course. As I said "just for the record".

  21. #341
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    235

    Re: NewTab: tab control for VB6

    Sorry Eduardo. I don't understand how to remove the "New Custom X" themes. May you explain it me?

  22. #342

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Name:  Saving NewTab themes.png
Views: 1576
Size:  33.8 KB

    Select the custom theme and you need to untick these three checkboxes and then click the OK button in the property page.

    BTW, I've made an update, I fixed something regarding the file name for the themes.

  23. #343
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    235

    Re: NewTab: tab control for VB6

    Hello Eduardo, I hope you are well.
    I always download the latest version from GitHub.
    This version has a problem with the right-to-left tab order.
    If you select the right-to-left characteristic
    error :

    RightToLeft is only available for Top orientation.

    When I set the Tab Orientation section

    Name:  2rl.jpg
Views: 548
Size:  6.8 KB

    Tabs should start from the right and the X symbol
    Previous versions did not have this problem. I will send a picture of the old version.

    Name:  3r.jpg
Views: 554
Size:  12.1 KB

    And notice another problem: when we're in the home tab, the corners of the controls are perfectly rounded
    but when I switch to another tab, they lose their shape and beauty.
    Also, the number of tabs increases, which messes up the layout and appearance.
    This problem is the same in both left-to-right and right-to-left tab directions. If you have a lot of tabs open, it will look messy.

    Name:  ned.jpg
Views: 413
Size:  22.2 KB

    I don't know if the theme settings have changed in the new version!
    And the right-to-left problem has also appeared.
    In the default theme, there is a white frame around the tank, which is really ugly.

    Use colored backgrounds for better visibility. It is not as visible on a white background.


    Name:  nert.jpg
Views: 395
Size:  24.3 KB

    Sample project :
    Attached Files Attached Files
    Last edited by Mojtaba; Sep 24th, 2025 at 09:22 AM.

  24. #344

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Hello Mojtaba. I'll check it (maybe tomorrow) and come back ASAP.

  25. #345
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    235

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    Hello Mojtaba. I'll check it (maybe tomorrow) and come back ASAP.
    I'm ready to test it again.

  26. #346

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Mojtaba View Post
    I'm ready to test it again.
    OK, I'm working on it.
    Fixing one issue I found many other related to right-aligned tab orientation that was the last feature I added.
    I have to study the other issues.
    What DPI setting did you have when you took those screen shots? (the Windows screen scale).

  27. #347
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    235

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    OK, I'm working on it.
    Fixing one issue I found many other related to right-aligned tab orientation that was the last feature I added.
    I have to study the other issues.
    What DPI setting did you have when you took those screen shots? (the Windows screen scale).
    I only take screenshots of the form. Not the whole page.
    If you want more details
    Windows 10
    Resolution: 1600 * 900
    If you want me to take a video ?

  28. #348

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Mojtaba View Post
    I only take screenshots of the form. Not the whole page.
    If you want more details
    Windows 10
    Resolution: 1600 * 900
    If you want me to take a video ?
    No, no. Thanks.

  29. #349

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    OK, as mentioned in the previous post I fixed several issues mostly related when the tabs are right-aligned.
    But when I'm testing and changing properties I find some other issues, just for example: for client area, the top have to consider the FlatBodySeparationLineHeight to start the client area (the ClientTop for top aligned TabOrientations). It is not taking that into accout now. It is just an example.

    For the TDI Forms mode I'll have to make a Region for the PictureBox containing the forms, so the rounded corners show well.

    For the issue that RightToLeft is not supported for bottom TabOrientations, it is because I handle the bottom orientation in a special way. But I have an idea to fix that, that will involve changing how the bottom orientations are handled.

    These things I guess they could take a couple of more days.

    But... I'm thinking in changing how the TDI Mode Forms handle icons. Because it actually shows two icons, one is the X to close the tabs and I added another icon for the forms icons.
    I'm thinking in completely change that, making a Closable property that could be used for all the tabs, not just the TDI mode, not using the normal icon for the X. And then for the TDI mode use that feature, not having a custom icon anymore but using the normal icons.
    That is a big change, and could take more time.

    I'm currently busy working in a program that I have to finish I hope in a couple of months.
    So... I can't spend so many days now on this control. It is fun for me, I enjoy working on this control, but maybe I'll have to do it in free time or when I'm tired of working in the other program. Then it could take longer.

    Also the TDI MOde is limited to Top and Bottom orientations, but why? If everything is fine and when structured it should also work in any TabOrientation (we'll see, I don't remember now what what the problem with that that lead me to put that limitation)

    So, if you need some fix soon, I could do just that now, but maybe what you need involves things that will take more time, like fully fixing RightToLeft.

    I can share the OCX with the current fixes if you want, but I think I only fixed one of the several issues that you posted.
    I'll keep working now a bit more I guess, but I won't be able to fix them all right now because I can't delay the other program's work a week or so that maybe all these fixes will take.

  30. #350
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    235

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    OK, as mentioned in the previous post I fixed several issues mostly related when the tabs are right-aligned.
    But when I'm testing and changing properties I find some other issues, just for example: for client area, the top have to consider the
    Eduardo, thank you for your time. I have a project where I use newtab a lot and the other parts of the program are not yet complete and I am not in a hurry to finish it. Please fix the control problems in your free time.

  31. #351

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,669

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Mojtaba View Post
    Eduardo, thank you for your time. I have a project where I use newtab a lot and the other parts of the program are not yet complete and I am not in a hurry to finish it. Please fix the control problems in your free time.
    OK, fine. I'll report back when I have something to test.

Page 9 of 9 FirstFirst ... 6789

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