Page 2 of 6 FirstFirst 12345 ... LastLast
Results 41 to 80 of 229

Thread: NewTab: tab control for VB6

  1. #41
    Member
    Join Date
    Mar 2022
    Posts
    44

    Re: NewTab: tab control for VB6

    [QUOTE=Eduardo-;5607382]

    Code:
    #Const COMPILE_WITH_TAB_PROPERTY = 0
    change the 0 to 1:

    Code:
    #Const COMPILE_WITH_TAB_PROPERTY = 1
    While doing this, I read the comments above this area:

    Code:
    'Tab is a reserved keyword in VB6, but you can remove that restriction.
    'To be able to compile with Tab property, you need to replace VBA6.DLL with this version: https://github.com/EduardoVB/NewTab/raw/main/control-source/lib/VBA6.DLL
    'VBA6.DLL is in VS6's installation folder, usually:
    'C:\Program Files (x86)\Microsoft Visual Studio\VB98\
    So, I did this and I have not been having as many problems as I was before... my question is:
    Do I have to distribute this modified VBA6.DLL to all of my users?

    Everything looks and runs great in the IDE, but when I run the compiled EXE, the program immediately dies (even on the dev machine)! I need to figure out how to deploy this! Please help!

    Thanks!
    Last edited by BooksRUs; Jul 14th, 2023 at 12:18 PM.

  2. #42

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Quote Originally Posted by BooksRUs View Post
    my question is:
    Do I have to distribute this modified VBA6.DLL to all of my users?
    No, you need only the modified DLL in your VB6 installation, for being able to compile using that reserved word.
    The DLL is exactly the same as the original, the only difference is that 'Tab' is no longer a reserved keyword.

    Quote Originally Posted by BooksRUs View Post
    Everything looks and runs great in the IDE, but when I run the compiled EXE, the program immediately dies (even on the dev machine)! I need to figure out how to deploy this! Please help!

    Thanks!
    It must be something else.

  3. #43

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    BTW: the DLL is for SP6, ensure that you have SP6 installed first.

  4. #44
    Member
    Join Date
    Mar 2022
    Posts
    44

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    It must be something else.
    I have tried to figure this out on my own, but to no avail.

    I ran ProcMon to possibly see what's happening. When the compiled EXE and VB6 fail, just before there is this line in the

    Operation: RegOpenKey
    Path: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack\SurrogateFallback\Segoe MDL2 Assets
    Result: NAME NOT FOUND

    After this it runs WerFault.exe and dies...

    Perhaps there is something weird going on with the Segoe fonts that the control uses? Or something with Unicode? I have no idea, just throwing out ideas.

    I hate to go backwards and have to use SSTab again, but I need to be able to get this to the users.

    Thanks for your help!

  5. #45

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    What Windows version are you using?
    I guess it must be a problem when compiling the control on Windows7/8.
    Unfortunately, I have only Windows 11 here now to be able to test that.

    But then, it has nothing to do with the replacement VBA6,DLL... I guess.

    Do you have SP6 installed?

  6. #46
    Addicted Member
    Join Date
    Feb 2022
    Posts
    189

    Re: NewTab: tab control for VB6

    Wow. Incredibly impressive project Eduardo!

    The documentation is equally impressive. Are you using a program to aid you produce documentation?

  7. #47
    Fanatic Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    535

    Re: NewTab: tab control for VB6

    Quote Originally Posted by taishan View Post
    Wow. Incredibly impressive project Eduardo!

    The documentation is equally impressive. Are you using a program to aid you produce documentation?
    https://www.vbforums.com/showthread....ter&highlight=

  8. #48
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    235

    Re: NewTab: tab control for VB6

    Dear Eduardo,

    Thank you once again for this pleasing and wonderful control.

    In order to use the NewTab control embedded in a project (instead of as an ocx), I just adopted the following simple methodology in a new sample project (say, 'abc'):

    1. I created a new folder copying the following '6 directories' alone from your "control-source" folder.
    - bas
    - cls
    - ctl
    - frm
    - pag
    - subclass

    2. Then, I added all the files in the above folders into my sample 'abc' project. In the case of two files alone (pagNewTabTabs.pag AND pagNewTabThemes.pag), I had to first replace 'NewTabCtl' with 'abc' inside them, before including them in my project.
    Note: 'pagNewTabHelp.pgx' also has the word 'NewTabCtl' contained in it. I did not replace it though.

    3. Now, I added one NewTab in 'Form1', started 'abc' from the IDE and it worked.

    4. I created 'abc.exe' and executing it worked too, displaying the tabs in the starting screen.

    5. I copy/pasted and just ran 'abc.exe' in one other occasionally used Windows10 system of mine and it worked therein too, displaying the tabs in the starting screen.

    So, I believe all that is required to make your splendid 'NewTab' working embedded in a new project is, what I have done above. If I have missed any step or need to do anything more, please do let me know, when your time permits, since I am planning to use the same procedure as above, soon, to avail your NewTab in a larger project of mine, distributed to users.

    Thanks a TON once again for this fantastic and beautiful control.

    Kind Regards.


    Edit-1: Changed 'pagNewTabHelp' to 'pagNewTabHelp.pgx'
    Edit-2: Changed '7 directories' to '6 directories'
    Last edited by softv; Sep 17th, 2023 at 06:00 PM.

  9. #49

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Hello, I don't think you missed any step.

  10. #50
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    235

    Re: NewTab: tab control for VB6

    Dear Eduardo,

    Some issues observed:

    Issue of primary concern to me right now
    --
    1. After starting your sample project group "Test uncompiled.vbg", in IDE (design time), I am unable to select the individual tabs (other than 'Tab 0') and place/add controls in them. To ensure it is so, I tried running your sample in the one other system of mine too. The result is the same. Of course, the result is the same, if I create a project of my own too (like 'abc', using the steps I mentioned in my previous post and which you have okayed).

    Note-1: if I start "Test with ocx compiled.vbg", therein I am able to quite easily select all the individual tabs and place/add controls in them at design time.

    Note-2: By 'Tab 0', I mean the tab with caption 'Tab 0' which appears selected by default anyway, as soon a NewTab is added to a form.
    --

    Issues NOT of primary concern
    --
    1. When using "Test uncompiled.vbg", after right-clicking the NewTab control (added to a form), clicking 'Properties' and selecting the 'Help' tab in the "Property Pages" screen, the 'Help' contents do not appear coherently. Also, the contents do not seem to get loaded fully.

    2. Unicode texts (both caption and tooltip) not retained after close & reopen of project. All characters appear as questions marks. This issue exists in both 'Test uncompiled.vbg" and "Test with ocx compiled.vbg". If the project is compiled to an exe (with the Unicode texts), the executable exhibits Unicode text correctly for both caption and tooltip. So, right now, I am planning to manage this issue by populating the Unicode caption and tooltip texts during 'Form' Load. Any other easier way?
    --

    In case my above observations are incorrect, kindly let me know what I need to do to correct the issues I am facing.

    General query:
    To change the names of the themes, the procedure to be followed is to change their names in the bas file (mNewTabThemes). Right? I saw a theme named as 'Esmerald'. I wanted to change its name (name alone) to 'Emerald'. So, I changed "Esmerald" to "Emerald" in the 'LoadDefaultThemes' function of the aforesaid bas file. This works and I am able to see the change in the theme name effected correctly. But, hope this procedure I adopted is correct and there are no side-issues in this.

    By the way, the facility to reorder the tabs at run time is great. Kudos for thinking of a feature like this in the first place.

    And, I take this opportunity to once again thank you for your fabulous NewTab control.

    Kind Regards.
    Last edited by softv; Sep 18th, 2023 at 11:46 AM.

  11. #51

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Quote Originally Posted by softv View Post
    Dear Eduardo,

    Some issues observed:

    Issue of primary concern to me right now
    --
    1. After starting your sample project group "Test uncompiled.vbg", in IDE (design time), I am unable to select the individual tabs (other than 'Tab 0') and place/add controls in them. To ensure it is so, I tried running your sample in the one other system of mine too. The result is the same. Of course, the result is the same, if I create a project of my own too (like 'abc', using the steps I mentioned in my previous post and which you have okayed).

    Note-1: if I start "Test with ocx compiled.vbg", therein I am able to quite easily select all the individual tabs and place/add controls in them at design time.

    Note-2: By 'Tab 0', I mean the tab with caption 'Tab 0' which appears selected by default anyway, as soon a NewTab is added to a form.
    It is a protection, so it does not crash when running uncompiled in the IDE.
    You can remove it. Close the form, then open the NewTab's UserControl code window, then go to the fist line and change it to:

    Code:
    #Const NOSUBCLASSINIDE = 0
    Quote Originally Posted by softv View Post
    Issues NOT of primary concern
    --
    1. When using "Test uncompiled.vbg", after right-clicking the NewTab control (added to a form), clicking 'Properties' and selecting the 'Help' tab in the "Property Pages" screen, the 'Help' contents do not appear coherently. Also, the contents do not seem to get loaded fully.
    Could not reproduce this one, I see the text OK here.

    Quote Originally Posted by softv View Post
    2. Unicode texts (both caption and tooltip) not retained after close & reopen of project. All characters appear as questions marks. This issue exists in both 'Test uncompiled.vbg" and "Test with ocx compiled.vbg". If the project is compiled to an exe (with the Unicode texts), the executable exhibits Unicode text correctly for both caption and tooltip. So, right now, I am planning to manage this issue by populating the Unicode caption and tooltip texts during 'Form' Load. Any other easier way?
    That's normal, The VB6 IDE cannot handle Unicode.
    Yes, assign the texts in the Form_Load,

    Quote Originally Posted by softv View Post
    General query:
    To change the names of the themes, the procedure to be followed is to change their names in the bas file (mNewTabThemes). Right? I saw a theme named as 'Esmerald'. I wanted to change its name (name alone) to 'Emerald'. So, I changed "Esmerald" to "Emerald" in the 'LoadDefaultThemes' function of the aforesaid bas file. This works and I am able to see the change in the theme name effected correctly. But, hope this procedure I adopted is correct and there are no side-issues in this.
    No, it is OK.

    Quote Originally Posted by softv View Post
    By the way, the facility to reorder the tabs at run time is great. Kudos for thinking of a feature like this in the first place.

    And, I take this opportunity to once again thank you for your fabulous NewTab control.

    Kind Regards.
    Thank you

  12. #52
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    235

    Re: NewTab: tab control for VB6

    Thanks a TON, as always, Eduardo.

    By the way, a label control (both intrinsic and krool's) placed inside a NewTab's tab does not display its tooltip text. The label displays it's tooltip text only if I enclose it inside a picturebox or frame control. Lack of hWnd for a label is the cause?

    Well, if my above observation is correct, is there any easier way (than enclosing it inside a picturebox/frame) by which I can have the tooltip text of a label get displayed?

    Kind Regards.

  13. #53

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    There seems to be a VB6 bug regarding that.
    A Windowless UserControl placed inside a ControlContainer UserControl does not display the ToolTipText.

    I don't think there is much we can do about that. (test project attached)
    Attached Files Attached Files

  14. #54
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    235

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    There seems to be a VB6 bug regarding that.
    A Windowless UserControl placed inside a ControlContainer UserControl does not display the ToolTipText.

    I don't think there is much we can do about that. (test project attached)
    Yes, I thought something of that sort could be the case. Thanks.
    Okay then, I will add a top-level picturebox/frame whenever a tab has one or more labels in it.

    By the way, I observe that the tooltips of individual tabs get displayed (on mouseover) at runtime only, not at design time. If my observation is correct, is it possible to make the tabs' tooltips visible at design-time too, on mouseover?

    Kind Regards.

  15. #55

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    OK, I updated the project and the ocx.
    TabToolTipText now work at design time too and changed theme name Esmerald to Emerald.

  16. #56
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    235

    Re: NewTab: tab control for VB6

    Thanks a LOT, Eduardo, for the recent update.

    By the way, as informed by you in post #20, I am sharing a new theme hereunder. . I included it in my code and just termed it as 'Apple Green'.
    --
    BackColorTabSel=16514553|BackColorTabs=15136990|FlatBarColorHighlight=3633716|FlatBarColorInactive=1 4150350|FlatBarColorTabSel=1820177|FlatBorderColor=1820177|FlatBorderMode=1|ForeColorHighlighted=167 77215|HighlightColor=3633716|HighlightEffect=0|HighlightMode=68|HighlightModeTabSel=90|IconColorTabH ighlighted=16777215|Style=3
    --

    The facility to so easily create new themes and also share them as easily as above is too good. Thanks a TON.

    Just one query though:
    'Ambient Colors' checkbox - I am unable to notice any difference in color(s) anywhere, whether it is checked or unchecked. So, I am unable to know what it actually does.

    Kind Regards.
    Last edited by softv; Sep 20th, 2023 at 10:27 AM.

  17. #57

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Update released.

    Quote Originally Posted by softv View Post
    Thanks a LOT, Eduardo, for the recent update.

    By the way, as informed by you in post #20, I am sharing a new theme hereunder. . I included it in my code and just termed it as 'Apple Green'.
    --
    BackColorTabSel=16514553|BackColorTabs=15136990|FlatBarColorHighlight=3633716|FlatBarColorInactive=1 4150350|FlatBarColorTabSel=1820177|FlatBorderColor=1820177|FlatBorderMode=1|ForeColorHighlighted=167 77215|HighlightColor=3633716|HighlightEffect=0|HighlightMode=68|HighlightModeTabSel=90|IconColorTabH ighlighted=16777215|Style=3
    --

    The facility to so easily create new themes and also share them as easily as above is too good. Thanks a TON.
    Thank you! I added "Apple Green" to the default themes (it is already in the new update).

    Name:  AppleGreen_Theme.png
Views: 466
Size:  11.6 KB

    Quote Originally Posted by softv View Post
    Just one query though:
    'Ambient Colors' checkbox - I am unable to notice any difference in color(s) anywhere, whether it is checked or unchecked. So, I am unable to know what it actually does.

    Kind Regards.
    That is if you want to change colors that are ambient colors (or not), like vbButtonFace and vbButtonText that are the default ambient colors, or the current ambient colors in case they were changed.
    If you want to adjust the other colors but not to modify these ambient colors, then the checkbox need to be not checked (is the default).
    If you want to modify them anyway, then check it.
    It only has effect if the theme has ambient colors in the definition.

  18. #58
    New Member
    Join Date
    Apr 2014
    Posts
    14

    Re: NewTab: tab control for VB6

    Hello Eduardo,

    is it possible to create a manifest file for the OCX?

    Thanks in advance.

  19. #59

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Copy this code in the manifest:

    Code:
      <file name="NewTab01.ocx">
        <typelib tlbid="{66E63055-5A66-4C79-9327-4BC077858695}" version="3.1" flags="control" helpdir="" />
        <comClass clsid="{6C9D299A-B6CC-40B8-A155-4D3F154F6584}" tlbid="{66E63055-5A66-4C79-9327-4BC077858695}" threadingModel="Apartment" progid="NewTabCtl.NewTab" miscStatusIcon="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,simpleframe,setclientsitefirst" description="Tabbed control for VB6." />
      </file>
    I now have included this information in the ReadMe file.

  20. #60
    Hyperactive Member
    Join Date
    Jan 2012
    Location
    Recently moved from Europe to Panama
    Posts
    269

    Re: NewTab: tab control for VB6

    Hi Eduardo,

    Great work again! I've been using the SSTabEx with great satisfaction, and just when I was looking for some capabilities that I didn't have the need for before, I discovered this new tab, which offered exactly what I was looking for. ;-)

    However, I'm now running into a little challenge:

    On a form I have a tab control with multiple tabs. One of the tabs has several controls on it, among others a listview. The listview is populated when the tab is selected, with a progressbar giving the user feedback on the progress.

    I’ve been using the click event to initiate the population of the listview, but that results in an “unresponsive” feeling. I.e. the tab is only selected (text bold), and the controls are only displayed at the end of the event, so there is no feedback to the user. It feels like the system if frozen until the listview has been populated.

    DoEvents and Refresh don't make a difference, which I guess is logic. And as far as I can see there are no “post-click” / “activate” events.

    What is the best way to quickly display the tab with its controls, and once that’s done, start populating the listview?

    Thanks,
    Erwin

  21. #61
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    1,874

    Red face Re: NewTab: tab control for VB6

    Probably a Timer, start it at the end of the click event to begin populating the ListView.

  22. #62

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Yes, I could add an event TabChange that would be raised after the tab already changed, but for now perhaps you could set a timer of 15 ms in the Click event.

  23. #63

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Update released.
    Added something in the Refresh method.

    It turned to be that there is already an event that is raised after the tab already changed, it is named TabChange.

    But, for the visual of the control to be updated, you'll need to call the Refresh method.
    Why? Because the control can receive many actions, and it won't update for each one individually. So calling the Refresh method forces the visual update in that moment.

    Download the latest version because I added something in the Refresh method.

  24. #64
    Hyperactive Member
    Join Date
    Jan 2012
    Location
    Recently moved from Europe to Panama
    Posts
    269

    Re: NewTab: tab control for VB6

    Great! Using the TabSelChange in combination with the Refresh did solve the issue. Didn't even need to download the latest version.

  25. #65

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Erwin69 View Post
    Great! Using the TabSelChange in combination with the Refresh did solve the issue. Didn't even need to download the latest version.
    Then perhaps you have a DoEvents or something that allows the control to be repainted.

  26. #66
    Hyperactive Member
    Join Date
    Jan 2012
    Location
    Recently moved from Europe to Panama
    Posts
    269

    Re: NewTab: tab control for VB6

    Hi Eduardo,

    This is what the code looks like:

    Code:
    Private Sub tabMainForm_Click(PreviousTab As Integer)
        'Is here only to change the tab, allowing for a quick display of the controls, and where applicable showing the progress bar while updating the details listview
    End Sub
    
    Private Sub tabMainForm_TabSelChange()
    
        tabMainForm.Refresh
    
        'Rest of code
    End Sub
    Regards,
    Erwin

  27. #67

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    I mean the "Rest of code" must have something that allows the control to paint.

    I tested with a tight loop, and it needed the "fix" (available in the last update) to do the Refresh immediately.
    At least in my Windows 11.

  28. #68

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    And if you remove (comment) the call to Refresh, the control is updated or not?

  29. #69
    Hyperactive Member
    Join Date
    Jan 2012
    Location
    Recently moved from Europe to Panama
    Posts
    269

    Re: NewTab: tab control for VB6

    If I comment out the call to Refresh, the tab is still redrawn.

    The rest of the code

    1. Resizes and relocates the controls on the tab
    2. Colors a picturebox with a gradient fill, and writes a text on it
    3. Fills a TreeView control
    4. Fills a ListView control

    During the population of the ListView, a progress bar is updated to provide feedback to the user.

    Note: I'm running this in the VB6 IDE which runs in Windows XP in a virtual machine. (Oracle VM Virtual Box.)

  30. #70

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Yes, it seems that at some point (in your code) the control is allowed to process the WM_PAINT message.

  31. #71
    PowerPoster
    Join Date
    Jan 2020
    Posts
    4,180

    Re: NewTab: tab control for VB6

    what's control-source\cmp?
    whye NewTab01.ocx have 1.3MB?
    VB6.EXE ONLY 1.8mb

  32. #72

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Quote Originally Posted by xiaoyao View Post
    what's control-source\cmp?
    It is the reference for binary compatibility. It is a previous version of the ocx where the file was renamed to *.cmp. VB6 takes the typelib in the ocx for reference, to make the typelib of the new file compatible.

    Quote Originally Posted by xiaoyao View Post
    whye NewTab01.ocx have 1.3MB?
    VB6.EXE ONLY 1.8mb
    I don't know why VB6 doesn't produce smaller binaries, but is is not a problem at all nowadays (in 99,99% of cases). If you really need smaller files, you could use UPX, it can reduce a lot the size.

  33. #73
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    235

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Eduardo- View Post
    Update released.

    Thank you! I added "Apple Green" to the default themes (it is already in the new update).

    Name:  AppleGreen_Theme.png
Views: 466
Size:  11.6 KB

    .. .. .
    Sorry for the delayed response. I fell ill suddenly the Wednesday before the last (more than 2 weeks back).

    While recuperating, I did see your message in my mobile and felt very happy to read the news of you having readily included the new theme (that too as "Apple Green" itself) and also pleased to see the pleasant sample image to illustrate the new theme.

    Thanks for the other explanation (on 'ambient colors').

    I take this opportunity to thank you once again, Eduardo, for your wonderful control.

    Kind regards.

  34. #74
    Hyperactive Member
    Join Date
    Jan 2012
    Location
    Recently moved from Europe to Panama
    Posts
    269

    Re: NewTab: tab control for VB6

    Hi Eduardo,

    When the user selects a tab, is there a way to know what the previous tab was? (Other than tracking it from Form load onwards in a module or global variable.)

    Regards,
    Erwin

  35. #75

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Quote Originally Posted by Erwin69 View Post
    Hi Eduardo,

    When the user selects a tab, is there a way to know what the previous tab was? (Other than tracking it from Form load onwards in a module or global variable.)

    Regards,
    Erwin
    In the Click event there is a PreviousTab parameter. That comes from the SSTab.

  36. #76
    Hyperactive Member
    Join Date
    Jan 2012
    Location
    Recently moved from Europe to Panama
    Posts
    269

    Re: NewTab: tab control for VB6

    I knew I had seen it somewhere, but couldn't find it anymore. Too focused on the Tab-events...

  37. #77
    PowerPoster
    Join Date
    Jan 2020
    Posts
    4,180

    Re: NewTab: tab control for VB6

    I don't know who deleted my reply.
    I'm not malicious because I saw The resulting OCX file. it ended up being 1.3 MB.
    If we can make it smaller, it must be a good thing.
    Then I also want to analyze what is the specific problem that causes the volume to be larger?

    It turned out to be because of some property pages. Because the property page is mainly used in the development and design process, it may not be needed when it is finally compiled into exe or OCX.
    Then optimize it when compiling, and it will also have a certain impact according to the volume or the running speed.

    With these methods, the final size was reduced by a factor of two to more than 600 KB.

    I spent a few hours studying it. If you directly import multiple files of the source code into the project, which file attributes will change? Control, the public property of the class becomes private.

    My idea is. The application project under development maintains an automatic reference to the files in this directory and does not need to change other settings each time a new version is downloaded.
    Last edited by xiaoyao; Oct 7th, 2023 at 08:46 PM.

  38. #78
    PowerPoster
    Join Date
    Jan 2020
    Posts
    4,180

    Re: NewTab: tab control for VB6

    If different control developers can create a standard for everyone.
    Some control groups contain multiple controls in one project, such as text boxes, buttons, tabs, and grid controls.
    Someone may just need a text box or button that supports Unicode.
    How do I keep just these two controls while deleting the other extraneous files?

    I just thought of a good way The author who developed this component is most familiar with it.
    Just delete some other extraneous files and then save as a project name in the same directory.
    I'm writing a plug-in that will automatically bring these files into a new project.

    Perhaps more than half of the users may prefer to become a stand-alone exe, because OCX requires registration and permissions.
    Turn a control project into a Exe project template,You need to change the public properties of some classes or controls to private properties.Some other settings may be needed.
    Then save these files with minor changes as *.-copy. CTL file name。

    Because I used to test a project called exe or com DLL mode, often some files can not coexist with two projects.
    Perhaps the simplest is to simply generate the OCX reference. Otherwise, it is really troublesome to add dozens of files to another new project.


    It is mainly based on the fact that some control or component module projects are relatively large, with 5 to 10 or more than 20 source files.

    At the same time, I would like to thank many individual developers for contributing free source code to develop more useful new controls.
    And keep it updated for months to years,No matter what the return.

    Because the control is very difficult to develop or change, and only the original author can implement these functions.
    Last edited by xiaoyao; Oct 7th, 2023 at 09:04 PM.

  39. #79

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,232

    Re: NewTab: tab control for VB6

    Quote Originally Posted by xiaoyao View Post
    Because the property page is mainly used in the development and design process, it may not be needed when it is finally compiled into exe or OCX.
    Yes, they are needed for the developer using the OCX to be able to set some properties, like Theme and others, and also there are tools there that can be handy, for example to move control from one tab to another, or to change the order of tabs.

    Quote Originally Posted by xiaoyao View Post
    it will also have a certain impact according to the volume or the running speed.
    I don't think so., the speed will be the same.

    I'll repeat: 1.3 MB for today's standards, computers and OSs is a very small file. There is no problem at all, we are not in 1990.

    Quote Originally Posted by xiaoyao View Post
    while deleting the other extraneous files?
    There are not "extraneous files", all files are needed. If you don't need some functionality then delete the corresponding files, but that won't be for everybody, other people may not want to loose the related functionality.
    PD: you can delete the pagNewTabTabs property page, that one may be not needed.

  40. #80
    PowerPoster
    Join Date
    Jan 2020
    Posts
    4,180

    Wink Re: NewTab: tab control for VB6

    ok,thank you,Maybe user want to make the volume a little smaller, and the earliest version may be smaller.

    If in the process of development. Save some older versions that are more stable.
    Like control version 1.0, 2.0, 3.0.
    Maybe 1.0 might only be 200KB. Version 2.0 reaches 500KB, and version 3.0 reaches one megabyte.
    rc3.dll,rc5.dll,rc6.dll
    The old version can be easily registered on a computer, (rc6 The new version can't register on a very small number of computers (most computers will be perfectly fine))

    Some people need some simple tab control functions, and it is possible that his earliest version is enough to use.
    Last edited by xiaoyao; Oct 8th, 2023 at 11:40 AM.

Page 2 of 6 FirstFirst 12345 ... LastLast

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