Page 75 of 75 FirstFirst ... 256572737475
Results 2,961 to 2,990 of 2990

Thread: CommonControls (Replacement of the MS common controls)

  1. #2961
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,012

    Re: CommonControls (Replacement of the MS common controls)

    I start using Crool's controls, and I found some not just as I expect. Tooltips are not unicode.

    In my form I use Greek letters. My VB6 IDE is in a Windows 64, Greek is primary language. Also the selectet language for VB6 IDE is Greek
    So in my machine work nice, and I get greek letters for captions and tooltip. But in another machine, which have English as primary language, tooltips are saved as ANSI, and for this reason I didn't get ? characters (code 63), but the ansi numbers (from codepage for Greek letters) as in Western Europian codepage.
    Attached Images Attached Images  

  2. #2962

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,659

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by georgekar View Post
    I start using Crool's controls, and I found some not just as I expect. Tooltips are not unicode.

    In my form I use Greek letters. My VB6 IDE is in a Windows 64, Greek is primary language. Also the selectet language for VB6 IDE is Greek
    So in my machine work nice, and I get greek letters for captions and tooltip. But in another machine, which have English as primary language, tooltips are saved as ANSI, and for this reason I didn't get ? characters (code 63), but the ansi numbers (from codepage for Greek letters) as in Western Europian codepage.
    The ToolTipText property of the main object itself (VBControlExtender, e.g. CommandButtonW1.ToolTipText etc.) are the intrinsic properties by VB6 and thus ANSI.

    Only ToolTipText properties in class objects (e.g. TabStrip1.Tabs(1).ToolTipText etc.) are enhanced for Unicode and also support multi-line.

  3. #2963
    Lively Member
    Join Date
    Jul 2017
    Posts
    114

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    The ToolTipText property of the main object itself (VBControlExtender, e.g. CommandButtonW1.ToolTipText etc.) are the intrinsic properties by VB6 and thus ANSI.
    Why dont we extend the project and add a unicode tooltiptext class and add the property ToolTipTextW to all controls?

  4. #2964
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,146

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    Why dont we extend the project and add a unicode tooltiptext class and add the property ToolTipTextW to all controls?
    IMO there's no need for it.

    Krool could simply implement a central Window-Creation-Hook, which reacts to the old "VB6-ToolTip-ClassName",
    which then activates (fires), when the VB6-runtime fires-up its own, ANSI-ToolTip-Window
    (then overwriting the area of that Window with the original, but now Unicode-rendered Tooltip-Strings).

    Even MultiLine-Tooltips are possible this way, when one declares a certain Char as the LineBreak-char
    (in our larger VB6-App we've used the PipeChar ("|") for that, IIRC).

    Olaf

  5. #2965

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,659

    Re: CommonControls (Replacement of the MS common controls)

    IMO any hooks should reside in an App and not in this package.

    So you can use the CommandButtonW.ToolTipText property and use this Code to enable Unicode and multi-line. (See bottom post by MountainMan)

  6. #2966
    Lively Member
    Join Date
    Jul 2017
    Posts
    114

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    IMO any hooks should reside in an App and not in this package.
    You dont need any hooks when using a new tooltiptext property!

    For the basics just add a new public property called "ToolTextTipW" or "ToolTextTipWide" to all controls to store the unicode text displayed by the tooltiptext and use the api CreateWindowExW to create the tooltiptext. no need for any hooks. i can send you my tooltiptext class if you need the source code to do this.

    This change would make the VBCCR project more complete. no more need for external classes and tooltip source code cluttered everywhere in the forms/modules.

    We also can add additional tooltip properties like icon, title, multiline, forecolor, backcolor, delay time, display time...

  7. #2967
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,012

    Re: CommonControls (Replacement of the MS common controls)

    I am waiting for the new version with ToolTextTipW

  8. #2968
    Lively Member
    Join Date
    Jul 2017
    Posts
    114

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by georgekar View Post
    I am waiting for the new version with ToolTextTipW
    It's quite easy to add a new basic unicode tooltiptext but it depends on krool to do this.

    I could do this myself but i dont want to start a new fork of the VBCCR project...

  9. #2969

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,659

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    It's quite easy to add a new basic unicode tooltiptext but it depends on krool to do this.

    I could do this myself but i dont want to start a new fork of the VBCCR project...
    VBCCR17 is planned to be last major release. People also have a desire for a constant stable release.
    If any bugs appear they will be of course fixed.

    So feel free to make another fork..

  10. #2970
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,012

    Re: CommonControls (Replacement of the MS common controls)

    @Mith,
    Expose your idea, for someone like me to include it in an embedded fashion use of Krools controls. So then I can place the code to any control I wish to include a Unicode tooltip.

  11. #2971
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,012

    Arrow Re: CommonControls (Replacement of the MS common controls)

    I have the solution for unicode tooltips. This tested for command button control.

    I use from Elroy some routines, and I found a way (using mouse tracking) to enable/disable the tooltip. Also in IDE, in running or at design we get the ordinary vb6 tooltip.
    My test program is in the zip file.
    We have two more properties:
    ToolTipTextEx
    ToolTipTextTitle

    To prove the solution I place english, greek and russian to same tooltip.
    Why I have a second ToolTipText?
    Because if we have the original one, then that has something different from the new one, and do some conversions. So we use the second one for the unicode, and that handle the first one for using it in IDE, at design and at running status.


    Code:
    Private Sub Form_Load()
    CommandButtonW1.ToolTipTextTitle = "a TITLE"
    CommandButtonW1.ToolTipTextEx = CommandButtonW1.ToolTipTextEx + ListenUnicode(32, 917, 955, 955, 951, 957, 953, 954, 940) + ", " + ListenUnicode(1076, 1086, 1073, 1088, 1086, 1077, 32, 1091, 1090, 1088, 1086)
    
    
    End Sub
    Also in the example below, I have some extra:
    1. A way to use a mutex to handle the unique execution of program
    2. IsWine is a function to find if the program run in linux through wine
    3. To place the greek and russian I use one function, listenUnicode, which get the characters by numbers. To produce these numbers, I have a module testfromclipboard, with one statement: Debug.Print SpellUnicode(GetTextData(CF_UNICODETEXT)), so we copy to clipboard text and we get the numbers in the Immediate window, to copy these as parameters in a ListenUnicode() function.


    Revision 2,
    I found a missing statement from Elroy's code:
    Code:
     SendMessage hwndTT, TTM_SETMAXTIPWIDTH, 0&, 0
    Without this we didn't get additional lines which the CreateTool introduce these on the wrapping function.
    Attached Files Attached Files
    Last edited by georgekar; Nov 18th, 2020 at 05:17 PM. Reason: New Version

  12. #2972
    Addicted Member
    Join Date
    Jul 2016
    Posts
    164

    Re: CommonControls (Replacement of the MS common controls)

    Hey, is it possible to have columns in the treeview?

    Sample image from the net attached.
    Attached Images Attached Images  

  13. #2973
    Addicted Member
    Join Date
    Jul 2016
    Posts
    164

    Re: CommonControls (Replacement of the MS common controls)

    Or something like this? Looks like a listview per row within a treeview.
    Attached Images Attached Images  

  14. #2974
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,923

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by OldClock View Post
    Or something like this? Looks like a listview per row within a treeview.
    A little off topic but one look at this post and WPF immediately came to mind. WPF can do wild and crazy stuff like this very easily. If you're like me and prone to wanting all kinds of crazy combinations of layouts and controls for your UI, you owe it to yourself to check out WPF some time in your life. You will not be disappointed.
    Last edited by Niya; Nov 25th, 2020 at 04:40 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  15. #2975
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,060

    Re: CommonControls (Replacement of the MS common controls)

    The vsFlexGrid is capable of showing a tree in a column of the grid.
    Maybe Krool will implement something like this in his vbFlexGrid control

  16. #2976
    Addicted Member
    Join Date
    Jul 2016
    Posts
    164

    Re: CommonControls (Replacement of the MS common controls)

    Thank you, but as far as I can tell, WPF is not VB6.

    Is it possible to have word-wrap/newlines in a row in a VBCCR16/17 listview?

  17. #2977

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,659

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by OldClock View Post
    Thank you, but as far as I can tell, WPF is not VB6.

    Is it possible to have word-wrap/newlines in a row in a VBCCR16/17 listview?
    No. SysListView32 does not support it.

  18. #2978
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,146

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    No. SysListView32 does not support it.
    @OldClock

    You can accomplish your desired outputs quite easily, when you use Virtual-List-Controls.

    Here's two different ones, I've posted into the CodeBank (both without RichClient-dependencies, though still quite small CodeBases):
    https://www.vbforums.com/showthread....TreeList-Demo)
    https://www.vbforums.com/showthread....)-TileView-Ctl

    HTH

    Olaf

  19. #2979
    New Member
    Join Date
    Dec 2020
    Posts
    1

    Re: CommonControls (Replacement of the MS common controls)

    I registered the "VBCCR17.OCX" in Windows 10, and then tried to use Krool's controls in VFP 9's IDE, unfortunately, the VFP 9 crash.
    It seems that Krool's controls (OCX version) can only work with VB6, but MS common controls can support VFP, delphi or any other programming language correctly.

  20. #2980
    Member
    Join Date
    Oct 2016
    Posts
    63

    Re: CommonControls (Replacement of the MS common controls)

    Hi!
    I browsed through this thread which mentions that its possible to use Transparent images with the the imagelist/toolbar.
    I assume that you would need to use PNG files.
    I would appreciate on some guidance on how to load PNG files, because the standard methods don't work

  21. #2981
    Addicted Member
    Join Date
    Mar 2009
    Posts
    205

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    Hi!
    I browsed through this thread which mentions that its possible to use Transparent images with the the imagelist/toolbar.
    I assume that you would need to use PNG files.
    I would appreciate on some guidance on how to load PNG files, because the standard methods don't work
    Isn't it just using a mask color for that, or Icon files?

  22. #2982
    Member
    Join Date
    Oct 2016
    Posts
    63

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by SuperDre View Post
    Isn't it just using a mask color for that, or Icon files?
    mask colour is a nice way to improvise, and that's what i have been doing until now.
    Using PNG files is much cleaner and in my opinion a better way to work (if it is possible).

  23. #2983
    Fanatic Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    551

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    Using PNG files is much cleaner and in my opinion a better way to work (if it is possible).
    We all want VB6 to support PNGs but it is a limitation of the product.

    You can incorporate La Volpe's code and then you will be able to read and display PNGs in your VB6 image controls. You can also work with GDI+ or similar as it can handle PNGs natively and display them within your VB6 program.

    I have used both in my recent creations to handle PNGs. It is a considerable workaround but can be done.

    Just expanded VFP 9 to find it means Visual Fox Pro... that is not VB6. The BASIC advice will receive here will not help you much.
    Last edited by yereverluvinuncleber; Dec 27th, 2020 at 09:06 AM.

  24. #2984
    Addicted Member
    Join Date
    Mar 2009
    Posts
    205

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by myfav View Post
    I registered the "VBCCR17.OCX" in Windows 10, and then tried to use Krool's controls in VFP 9's IDE, unfortunately, the VFP 9 crash.
    It seems that Krool's controls (OCX version) can only work with VB6, but MS common controls can support VFP, delphi or any other programming language correctly.
    Ofcourse if the OXC crashes VFP 9's IDE there is a problem with the OCX as it should not do that. Does it crash on the usage of a specific component of the OCX or does it crash completely?

  25. #2985
    Lively Member
    Join Date
    Jul 2017
    Posts
    114

    Lightbulb textbox maximum character

    vbccr v1.7.1

    i can't enter the maximum supported character length of 32K chars using the textboxW control.

    i tried it with the following code:

    textboxW.text = String(32000, "a")
    or
    textboxW.text = String(6500, "a")

    none of them above filled the textbox!

    but String(650, "a") works!

    the maxlength property is set to 0.

    Edit:
    after some testing i found out that the limit is 4095 chars...

    Edit2:
    Problem solved:
    the property .MultiLine=True enables the support of 32K maximum characters!
    Last edited by Mith; Dec 29th, 2020 at 10:11 PM.

  26. #2986
    Lively Member
    Join Date
    Jul 2017
    Posts
    114

    Question RichTextBox cutting the text after word wrap

    vbccr v1.7.1

    i load a 6 MB text file into a RichTextBox using the command:

    Code:
    rtfLog.LoadFile sLogFile, RtfLoadSaveFormatUnicodeText
    now the size of the RichTextBox content is 3102656 bytes determined by the command:
    Code:
    Len(rtfLog.Text)
    after that i do a word wrap with the command:

    Code:
    rtfLog.ScrollBars = vbVertical
    after the word wrap the content of the RichTextBox is truncated: now the size is only 67731 bytes!

    any idea how to word wrap without cutting the content of the RichTextBox?
    or is this a bug?

    control properties:

    Name:  Screenshot - 15.01.2021 , 12_30_53.png
Views: 84
Size:  17.4 KB

  27. #2987

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,659

    Re: RichTextBox cutting the text after word wrap

    Quote Originally Posted by Mith View Post
    vbccr v1.7.1

    i load a 6 MB text file into a RichTextBox using the command:

    Code:
    rtfLog.LoadFile sLogFile, RtfLoadSaveFormatUnicodeText
    now the size of the RichTextBox content is 3102656 bytes determined by the command:
    Code:
    Len(rtfLog.Text)
    after that i do a word wrap with the command:

    Code:
    rtfLog.ScrollBars = vbVertical
    after the word wrap the content of the RichTextBox is truncated: now the size is only 67731 bytes!

    any idea how to word wrap without cutting the content of the RichTextBox?
    or is this a bug?

    control properties:

    Name:  Screenshot - 15.01.2021 , 12_30_53.png
Views: 84
Size:  17.4 KB
    Changing the ScrollBars to vbVertical triggers internally a re-creation of the rich text box.
    So try to put the code before you load the 6MB file for a quick fix.
    However, I would like to test whats the problem. Can you wrap up a demo project?

  28. #2988
    Lively Member
    Join Date
    Jul 2017
    Posts
    114

    Re: RichTextBox cutting the text after word wrap

    Quote Originally Posted by Krool View Post
    Changing the ScrollBars to vbVertical triggers internally a re-creation of the rich text box.
    So try to put the code before you load the 6MB file for a quick fix.
    However, I would like to test whats the problem. Can you wrap up a demo project?
    i guess the text content get truncated somewhere at the re-creation function.

    Is it really necessary to re-create the whole control when switching the scrollbars?

    Isnt there any SendMessage/SetWindowLong command to hide/show the scrollbars?

    Example:

    Style = GetWindowLong(rtbHandle, GWL_STYLE)
    Style = Style And WS_VSCROLL
    SetWindowLong (rtbHandle,GWL_STYLE,Style)

  29. #2989

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,659

    Re: RichTextBox cutting the text after word wrap

    Quote Originally Posted by Mith View Post
    i guess the text content get truncated somewhere at the re-creation function.

    Is it really necessary to re-create the whole control when switching the scrollbars?

    Isnt there any SendMessage/SetWindowLong command to hide/show the scrollbars?

    Example:

    Style = GetWindowLong(rtbHandle, GWL_STYLE)
    Style = Style And WS_VSCROLL
    SetWindowLong (rtbHandle,GWL_STYLE,Style)
    When you find a way of changing it without re-creation, please advise. However, I could have gone like the MS RichTextBox and throw out an error when attempting to change at runtime.

  30. #2990
    Lively Member
    Join Date
    Jul 2017
    Posts
    114

    Re: RichTextBox cutting the text after word wrap

    Quote Originally Posted by Krool View Post
    When you find a way of changing it without re-creation, please advise.
    it's not possible. i tried but after i read this at the MS doc: "After the control has been created, these styles cannot be modified, except as noted.": https://docs.microsoft.com/en-us/win...control-styles

    looks like re-creation is the only way to to this...

    btw, i found out that using TextMode=1 solves my problem:
    the text content doesnt got manipulated after switching the scrollbars!

    using TextMode=0 and switching the scrollbars to enable WordWrap truncates the text!
    Maybe you will check this out.

Page 75 of 75 FirstFirst ... 256572737475

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