Page 94 of 94 FirstFirst ... 448491929394
Results 3,721 to 3,745 of 3745

Thread: CommonControls (Replacement of the MS common controls)

  1. #3721

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,389

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Nouyana View Post
    The old problem with DEMO-project. Krool didn't fixed it. The solution:

    https://www.vbforums.com/showthread....=1#post5632609
    I changed the FontCombo now to FtcStyleDropDownCombo instead of FtcStyleDropDownList.
    However, it would be interesting to know what FontName the RichTextBox has but the FontCombo did not load .. you know what I mean ?

  2. #3722
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    320

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

    Quote Originally Posted by Krool View Post
    I changed the FontCombo now to FtcStyleDropDownCombo instead of FtcStyleDropDownList.
    However, it would be interesting to know what FontName the RichTextBox has but the FontCombo did not load .. you know what I mean ?
    This is "MS Sans Serif". In my system it named "Microsoft Sans Serif".

    wikipedia/Microsoft_Sans_Serif


  3. #3723

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,389

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Nouyana View Post
    This is "MS Sans Serif". In my system it named "Microsoft Sans Serif".

    wikipedia/Microsoft_Sans_Serif

    Yeah, but both are in the FontCombo... So, having FtcStyleDropDownList implies that the RichTextBox has a font which the FontCombo does not have in it's list, thus erroring. FtcStyleDropDownCombo will not error if it's not existing in the list. Can you re-check ?

    Name:  Unbenannt.png
Views: 311
Size:  7.1 KB

    PS: Both MS Sans Serif and Microsoft Sans Serif are valid and both should exist. MS Sans Serif is a bitmap font and Microsoft Sans Serif is a true-type font.

  4. #3724
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    320

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

    Quote Originally Posted by Krool View Post
    Yeah, but both are in the FontCombo... Can you re-check ?
    Not in my FontCombo. WinXP SP3 (edition 2021 from here).



    Quote Originally Posted by Krool View Post
    Both MS Sans Serif and Microsoft Sans Serif are valid and both should exist...
    Should, but not must. This is a clean WinXP SP2 with MS Office 2002:


  5. #3725
    Hyperactive Member
    Join Date
    May 2018
    Location
    Russia
    Posts
    320

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

    Yahoo!!! I've found it!

    Yes, this is not true-type font, so I've found it in a notepad...


  6. #3726

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,389

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Accelerator keys support in a VBA environment.
    The same technique as in the VBFlexGrid control (which supports it already a while ago) is now implemented on each control where accelerator keys are applicable. (PreTranslateMsg)

    To note is that this is a preparation for a future 1.8 OCX. This will not be implemented in the 1.7 OCX as it would be necessary to delete the .exd files in the VBE and Forms folder.
    So, I decided to have it ready then for a fresh 1.8 someday.

  7. #3727
    Hyperactive Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    269

    Re: CommonControls (Replacement of the MS common controls)

    Krool,

    I am using the ListView control. It works great especially in virtual mode. However, I want to change the width of a column and I can't figure out how to do it. In the old ListView control you would use .Controls.item(x).Width = somevalue but your control does not have "Controls" or "Item()". I looked at your code for Get/Set ColumnWidth and you can set or get a Single that is the ColumnWidth but there doesn't seem to be any way to specify which column to use. I know it must be possible and probably easy but I can't figure out how to do it.

  8. #3728
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    450

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by MountainMan View Post
    Krool,

    I am using the ListView control. However, I want to change the width of a column...
    use ListView1.ColumnHeaders(1).Width to set the column width.

  9. #3729
    Hyperactive Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    269

    Re: CommonControls (Replacement of the MS common controls)

    That works. Thanks!

  10. #3730
    Hyperactive Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    269

    Re: CommonControls (Replacement of the MS common controls)

    Another question: I was surprised a while back that you got LabelW to have hWnd as a property. I didn't think much more about it until this week. When I run the debugger in VB6, I don't get any LabelW controls but I do get a lot of controls that look like and are named as labels but appear as TextBoxes. So it seems to me that you don't use the Label control and what we are calling LabelW's are actually restricted TextBoxes that appear as labels and that is how you can get an hWnd for a label. Is this correct?

  11. #3731

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,389

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by MountainMan View Post
    Another question: I was surprised a while back that you got LabelW to have hWnd as a property. I didn't think much more about it until this week. When I run the debugger in VB6, I don't get any LabelW controls but I do get a lot of controls that look like and are named as labels but appear as TextBoxes. So it seems to me that you don't use the Label control and what we are calling LabelW's are actually restricted TextBoxes that appear as labels and that is how you can get an hWnd for a label. Is this correct?
    I don't understand.
    The LabelW is windowless, no hWnd property.
    What I added a while back was a new control called WindowedLabel.

  12. #3732
    Hyperactive Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    269

    Re: CommonControls (Replacement of the MS common controls)

    I'll investigate further.

    However, on a related note, I am using your latest VBCCR17.OCX version and it does not include WindowedLabel.

    When I run the ComCtlsDemo and look in the form toolbox it is there.

    Is there a reason it is not in VBCCR17.OCX or am I doing something wrong?

  13. #3733

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,389

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by MountainMan View Post
    I'll investigate further.

    However, on a related note, I am using your latest VBCCR17.OCX version and it does not include WindowedLabel.

    When I run the ComCtlsDemo and look in the form toolbox it is there.

    Is there a reason it is not in VBCCR17.OCX or am I doing something wrong?
    I accumulate a certain set of new features until I release VBCCR18.
    I can't update VBCCR17 as I did some breaking changes, RichTextBox and OLE props/events.

  14. #3734
    Lively Member
    Join Date
    Oct 2016
    Posts
    112

    Re: CommonControls (Replacement of the MS common controls)

    can the limit to the contents of the RichTextBox. be increased to more than 65536

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

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

    You can send the "EM_EXLIMITTEXT" message to increase the characters limit:

    Code:
    Private Const EM_EXLIMITTEXT As Long = &H435, lMaxLimit As Long = &H7FFFFFFF
    
    SendMessage RichTextBox.hWnd, EM_EXLIMITTEXT, 0&, lMaxLimit

  16. #3736
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    450

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    can the limit to the contents of the RichTextBox. be increased to more than 65536
    What limit? I tried the code below and get a text length of 70.000:

    Code:
    rtfLog.Text = String(70000, "a")
    Debug.Print rtfLog.textLength

  17. #3737
    Lively Member
    Join Date
    Oct 2016
    Posts
    112

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    What limit? I tried the code below and get a text length of 70.000:

    Code:
    rtfLog.Text = String(70000, "a")
    Debug.Print rtfLog.textLength
    this is true, but when I type I am limited to 65536, and when I paste only the first 65536 characters are pasted.

  18. #3738
    Lively Member
    Join Date
    Oct 2016
    Posts
    112

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by VanGoghGaming View Post
    You can send the "EM_EXLIMITTEXT" message to increase the characters limit:

    Code:
    Private Const EM_EXLIMITTEXT As Long = &H435, lMaxLimit As Long = &H7FFFFFFF
    
    SendMessage RichTextBox.hWnd, EM_EXLIMITTEXT, 0&, lMaxLimit
    thank you
    This gives me 1697420, I need more, much more

  19. #3739
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    can the limit to the contents of the RichTextBox. be increased to more than 65536
    When I'm in this situation, and I've been there, I typically turn to the Scintilla OCX control. That thing will do just about anything you want to throw at it (within the limits of what a 32-bit program can do).

    Also, it feels like we're spamming this codebank thread. I'm not sure why this isn't in the typical Q&A section.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  20. #3740

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,389

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Included the Resize event in the FrameW control. (like the VB.Picture control)
    A control container should have such event to re-arrange it's contained controls.
    However, the VB.Frame control does not have it.

  21. #3741
    New Member
    Join Date
    Feb 2022
    Posts
    14

    Re: CommonControls (Replacement of the MS common controls)

    If I use SendMessageW(combo,CB_ADDSTRING,0,1) to add contents to a combo, when I click on the combo it only opens up with one item, as opposed to showing 10 items.

    Any help appecirated

  22. #3742
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    450

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by logley View Post
    If I use SendMessageW(combo,CB_ADDSTRING,0,1) to add contents to a combo, when I click on the combo it only opens up with one item, as opposed to showing 10 items.

    Any help appecirated
    combo.hWndList ?

  23. #3743
    New Member
    Join Date
    Feb 2022
    Posts
    14

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    combo.hWndList ?
    I got around it by doing the following :

    Code:
        For iSockets = 0 To 9999
            If iSockets < 10 Then
                cmbSockets.AddItem iSockets
                cmbSockets.ItemData(cmbSockets.NewIndex) = iSockets
            Else
                lngAddIndex = SendMessageW(cmbSockets.hWnd, CB_ADDSTRING, 0, StrPtr(iSockets))
                SendMessageW cmbSockets.hWnd, CB_SETITEMDATA, lngAddIndex, ByVal iSockets
            End If
        Next iSockets
        cmbSockets.ListIndex = 0
    Even though the Combo supports the .Redraw method, whilst doing tests, I still find using SendMessage a quicker way to add large amounts to combos.

    Lee.

  24. #3744
    Addicted Member
    Join Date
    Mar 2024
    Posts
    222

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    I changed the FontCombo now to FtcStyleDropDownCombo instead of FtcStyleDropDownList.
    However, it would be interesting to know what FontName the RichTextBox has but the FontCombo did not load .. you know what I mean ?
    I am trying a test of the richtextbox control to see if I can paste in some chinese text.
    I created a new project and put a reference to oleguids.tlb, that file located in the project folder but none of the new controls are there.

    I also tried regserv32 that file in the syswow64 folder but it gave me error.

    I am running windows 11 PRO

    What do I need to do?

    Whatever I am doing is not working
    Attached Images Attached Images   

  25. #3745

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,389

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by sdowney1 View Post
    I am trying a test of the richtextbox control to see if I can paste in some chinese text.
    I created a new project and put a reference to oleguids.tlb, that file located in the project folder but none of the new controls are there.

    I also tried regserv32 that file in the syswow64 folder but it gave me error.

    I am running windows 11 PRO

    What do I need to do?

    Whatever I am doing is not working
    You don't need to register it via regsvr32.
    Just reference it in vb6 via references -> browse file.

Page 94 of 94 FirstFirst ... 448491929394

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