dcsimg
Page 11 of 63 FirstFirst ... 8910111213142161 ... LastLast
Results 401 to 440 of 2507

Thread: CommonControls (Replacement of the MS common controls)

  1. #401

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

    Re: CommonControls (Replacement of the MS common controls)

    This is the 1.1 ActiveX Control version. (End of support)

    Removed
    Last edited by Krool; Nov 4th, 2017 at 05:25 PM.

  2. #402
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    Normally Yes

    VBA Version
    Attachment 116209

    VB6.EXE 6.0.81.76
    VB6IDE.DLL 6.0.97.82
    VB6.DLL 6.0.0.9782

    What would you like me to try the other?

    Be careful, my system is in french!

  3. #403

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    Normally Yes

    VBA Version
    Attachment 116209

    VB6.EXE 6.0.81.76
    VB6IDE.DLL 6.0.97.82
    VB6.DLL 6.0.0.9782

    What would you like me to try the other?

    Be careful, my system is in french!
    Change again "Parent.Controls" with "ParentControls" in the hidden ControlsEnum properties and then try following:

    Instead of this
    Code:
    Dim ControlEnum As Object
    For Each ControlEnum In .ControlsEnum
        If TypeName(ControlEnum) = "ImageList" Then
            ComboImageList.AddItem ProperControlName(ControlEnum)
        End If
    Next ControlEnum
    do this
    Code:
    If .ControlsEnum.Count > 0 Then
        For i = 0 To .ControlsEnum.Count - 1
            If TypeName(.ControlsEnum(i)) = "ImageList" Then
                ComboImageList.AddItem ProperControlName(.ControlsEnum(i))
            End If
        Next i
    End If
    for instance in the "PPTreeViewGeneral.pag"

  4. #404
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    Yes

    When I saw my version of VBE.EXE and that of my folder ServicePacks VB6, I had a doubt.
    VB6.EXE 6.0.81.76 (current) and VB6.EXE 6.0.97.82 (Service Pack)

    After a New Update (again)
    VB6.EXE 6.0.97.82

    And it changes everything!

    It seems that ControlsEnum working properly now!

    Sorry for the time wasted on a failure who did not was not

  5. #405

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    Yes

    When I saw my version of VBE.EXE and that of my folder ServicePacks VB6, I had a doubt.
    VB6.EXE 6.0.81.76 (current) and VB6.EXE 6.0.97.82 (Service Pack)

    After a New Update (again)
    VB6.EXE 6.0.97.82

    And it changes everything!

    It seems that ControlsEnum working properly now!

    Sorry for the time wasted on a failure who did not was not
    Ok. Thats good. But would be interesting to know if the For...Next bypass would also solve it. Even on your VB6.EXE 6.0.81.76 level.

  6. #406
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    confirmed

    With VB6.EXE 6.0.81.76 level.
    Attachment 116225


    With VB6.EXE 6.0.97.82
    OK No problems.

    I found the cause and Workarounds in the following links.

    http://support.microsoft.com/kb/q223104

    http://codes-sources.commentcamarche...ients-80010108

    The right question is:
    What is the difference between UserControl.ParentControls and UserControl.Parent.Controls?
    Last edited by lrd_VB6; Jul 10th, 2014 at 12:00 PM.

  7. #407

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    The right question is:
    What is the difference between UserControl.ParentControls and UserControl.Parent.Controls?
    Referring to your linked KB-Article from MS: This problem is only occuring when there are 32 or more controls on the form. And the bug is fixed when at least SP3 is installed. Just as info.

    The UserControl.ParentControls returns also the parent itself. So the count is always 1 higher than the UserControl.Parent.Controls.

    Anyhow, everyone should use SP6. As for sure there are also other problems which gets fixed by SP6.
    But I don't want to look for every single problem when not SP6 is installed.
    So I think I will stay with UserControl.ParentControls. And hey, this problem reminded you to update your VB6.
    Last edited by Krool; Jul 10th, 2014 at 03:06 PM.

  8. #408
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    Normally it should have been be the good version!
    Mystere

    Just for information,

    What version of the VB6.EXE you use?

    What interest to change the type of ControlsEnum in VBRUN.ParentControls if it is a hidden property?
    Last edited by lrd_VB6; Jul 10th, 2014 at 03:52 PM.

  9. #409

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    Normally it should have been be the good version!
    Mystere

    Just for information,

    What interest to change the type of ControlsEnum in VBRUN.ParentControls if it is a hidden property?
    The hidden property is used in the property page of the concerned control.
    For general it is always better to cast the object directly to which it belongs instead of generic 'Objects'. (Performance)

  10. #410
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    Hello

    In "TvwNodes.cls", Is it possible to change

    Code:
    Public Function Add(Optional ByVal Relative As Variant, _
                        Optional ByVal Relationship As TvwNodeRelationshipConstants, _
                        Optional ByVal Key As String, _
                        Optional ByVal Text As String, _
                        Optional ByVal Image As Long, _
                        Optional ByVal SelectedImage As Long) As TvwNode
    In

    Code:
    Public Function Add(Optional ByVal Relative As Variant, _
                        Optional ByVal Relationship As TvwNodeRelationshipConstants = TvwNodeRelationshipNext, _
                        Optional ByVal Key As String, _
                        Optional ByVal Text As String, _
                        Optional ByVal Image As Long, _
                        Optional ByVal SelectedImage As Long) As TvwNode
    This is the default reaction of Nodes.Add

    http://msdn.microsoft.com/en-us/libr...=vs.60%29.aspx

  11. #411
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    Hello

    I proceeded a "few" changes to routines TreeView and Node(s).
    I submit for your approval.

    Now the Image and SelectedImage properties function as in the original.
    You can use the keys as text or numeric.

    Everything seems to work fine, but you never know ...

    best regards

  12. #412

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    I proceeded a "few" changes to routines TreeView
    What did you exactly suggest to change in the TreeView itself?

    Quote Originally Posted by lrd_VB6 View Post
    Now the Image and SelectedImage properties function as in the original.
    You can use the keys as text or numeric.
    Ok. But what is the sense of have the Image and SelectedImage return a String if it was passed by a string, e.g. as "1" ? I dislike that overhead work.
    Last edited by Krool; Jul 12th, 2014 at 02:36 PM.

  13. #413
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    Everything is in the Zip file!

    Before

    Code:
    Public Function Add(Optional ByVal Relative As Variant, _
                        Optional ByVal Relationship As TvwNodeRelationshipConstants , _
                        Optional ByVal Key As String, _
                        Optional ByVal Text As String, _
                        Optional ByVal Image As Long, _
                        Optional ByVal SelectedImage As Long) As TvwNode
    Now

    Code:
    Public Function Add(Optional ByVal Relative As Variant, _
                        Optional ByVal Relationship As TvwNodeRelationshipConstants = TvwNodeRelationshipNext, _
                        Optional ByVal Key As String, _
                        Optional ByVal Text As String, _
                        Optional ByVal Image As Variant, _
                        Optional ByVal SelectedImage As Variant) As TvwNode
    In MainForm

    Code:
        TreeView1.Nodes.Add , , , "1", "FOLDER_CLOSE", "FOLDER_OPEN"
        TreeView1.Nodes.Add(1, TvwNodeRelationshipChild, , "1-1", "MAIL", "OPEN").ForeColor = vbBlue
        TreeView1.Nodes.Add(1, TvwNodeRelationshipChild, , "1-2", 1).ForeColor = vbBlue
        TreeView1.Nodes.Add , TvwNodeRelationshipNext, , "2", 1
    Code:
    ?TreeView1.Nodes(1).Image 
    FOLDER_CLOSE
    ?TreeView1.Nodes(1).SelectedImage
    FOLDER_OPEN
    ?TreeView1.Nodes(2).Image 
    MAIL
    ?TreeView1.Nodes(3).Image 
     1
    Values ​​"Image" or "SelectedImage" can be either text or numerical form.
    This is normal operation.
    I wrote a program that uses ONLY key in text form ..

  14. #414

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    Values ​​"Image" or "SelectedImage" can be either text or numerical form.
    This is normal operation.
    I wrote a program that uses ONLY key in text form ..
    Oh, Ok. Did not know that this can be a KEY of a ListImage.
    Then this also effects to other controls?

  15. #415
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    Yes

    All controls that use a "ListImage" work like that.

    ToolBar, ListView etc..

    Example code snippet I wrote

    Code:
    Private Function ModeleActif() As Boolean
        ModeleActif = (Toolbar1.Buttons(KEY_CONFIG).Image = "LOCK_GO" And Len(iniModele.IniFileName) > 0)
    End Function
    
    Private Sub ActiveModele(Name As String)
        iniModele.IniFileName = Name
    
        With Toolbar1.Buttons(KEY_CONFIG)
    
            If Len(Name) Then
                .Image = "LOCK_GO"
            Else
                .Image = "LOCK_OPEN"
            End If
    
        End With
    
        SetMainCaption
    End Sub
    For cons, I have a question:
    I saw in the TwNode class (and elsewhere)

    Code:
    Public Property Get NextSibling() As TvwNode
    Set NextSibling = ShadowTreeView.FNodeNextSibling(PropHandle)
    End Property
    
    Public Property Set NextSibling(ByVal Value As TvwNode)   ' Why???
    Err.Raise Number:=383, Description:="Property is read-only"
    End Property
    Why was the Property Set ?
    If one does put THAT Property Get," then the property IS Read-only


    Thank you to enlighten me.


    best regards

  16. #416

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

    Re: CommonControls (Replacement of the MS common controls)

    Minor change done in the 'InitReleaseVisualStyles' function in VisualStyles.bas.
    Instead of
    Code:
    CopyMemory IUnk, VarPtr(VTableHeaderPointer), 4
    changed to
    Code:
    CopyMemory IUnk, ByVal VTableHeaderPointer, 4
    As this seems to be more "stable". Under "strange" circumstances there is a possibility to get a error no. 16 "Expression too complex". This was solved by this change..

  17. #417
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

    Re: CommonControls (Replacement of the MS common controls)

    Good topic!

    I do not know if you know this place but the following link should interest you.

    This should simplify some routines.

    http://www.xbeat.net/vbspeed/i_VBVM6Lib.html

    As in the following code in the supplied Zip

    Code:
    lPrivate Function IHookXP_Message(ByVal hWnd As Long, _
                                     ByVal uiMsg As Long, _
                                     ByVal wParam As Long, _
                                     ByVal lParam As Long, _
                                     ByVal dwRefData As Long) As Long
    Dim pt As POINTAPI, hMouseWnd As Long, Shift As Long, Delta As Integer
    
        Select Case uiMsg
    
     
    
            Case WM_SETCURSOR, &H2A2
                'Call TrackMouseEvent(mET)
                MouseMove_Msg "WM_SETCURSOR"
    
            Case WM_MOUSEHOVER
                'Debug.Print "WM_MOUSEHOVER:"; hWnd, uiMsg, wParam, VBVM6Lib.AsDWord(lParam).HiWord, VBVM6Lib.AsDWord(lParam).LoWord
    
            Case WM_MOUSEMOVE, WM_NCMOUSEMOVE
                Call TrackMouseEvent(mET)
                MouseMove_Msg "WM_MOUSEMOVE"
                Debug.Print "WM_MOUSEMOVE:"; hWnd, uiMsg, wParam, VBVM6Lib.AsDWord(lParam).HiWord, VBVM6Lib.AsDWord(lParam).LoWord
            
            Case WM_MOUSEWHEEL
                GetCursorPos pt
                hMouseWnd = WindowFromPoint(pt.x, pt.y)
    
                If wParam And MK_CONTROL Then Shift = Shift Or vbCtrlMask
                If wParam And MK_SHIFT Then Shift = Shift Or vbShiftMask
                Delta = VBVM6Lib.AsDWord(wParam).HiWord
                Debug.Print "WM_MOUSEWHEEL "; ObjName(hMouseWnd), Delta, Shift, Hex$(VBVM6Lib.AsDWord(wParam).LoWord)
    
           Case WM_MOUSEHWHEEL
                Debug.Print "WM_MOUSEHWHEEL "; ObjName(hWnd), uiMsg, wParam, lParam
     
            Case WM_NCDESTROY
                Call HookClear(Me.hWnd, Me)
            Case Else
                Debug.Print Hex$(uiMsg); ":"; hWnd, uiMsg, wParam, lParam
        End Select
    
        IHookXP_Message = HookDefault(hWnd, uiMsg, wParam, lParam)
    End Function

  18. #418

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    For cons, I have a question:
    I saw in the TwNode class (and elsewhere)

    Code:
    Public Property Get NextSibling() As TvwNode
    Set NextSibling = ShadowTreeView.FNodeNextSibling(PropHandle)
    End Property
    
    Public Property Set NextSibling(ByVal Value As TvwNode)   ' Why???
    Err.Raise Number:=383, Description:="Property is read-only"
    End Property
    Why was the Property Set ?
    If one does put THAT Property Get," then the property IS Read-only
    If you have only a 'Get' then VB6 always crash if you want to 'Write' on that Property. If there is a 'Set' and/or 'Let' with error raising then you have a chance to not crash the app when 'On Error Goto/Resume Next' is in place. It's like in the original controls. On many Read-Only properties you get a "manual" error raised.

  19. #419
    Junior Member
    Join Date
    Jul 2014
    Posts
    16

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Intrinsic controls are those controls who are always available, even on a blank project. If they also do not show the visual styles then something is wrong with your VB6.exe resource.
    Here's my VB version.
    i installing update sp 6

    Name:  upload.jpg
Views: 2592
Size:  60.5 KB

    what i must to do?

  20. #420

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by putuoka View Post
    Here's my VB version.
    i installing update sp 6

    Name:  upload.jpg
Views: 2592
Size:  60.5 KB

    what i must to do?
    When you put a normal VB.CommandButton on the Form. Are the visual themes visible in your IDE?

  21. #421

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

    Re: CommonControls (Replacement of the MS common controls)

    Important/Critical update released, when using the CoolBar control.

    There were some major mistakes done on the update from 13-Jul-2014. Sorry..
    Now everything should work.

  22. #422
    Junior Member
    Join Date
    Jul 2014
    Posts
    16

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    When you put a normal VB.CommandButton on the Form. Are the visual themes visible in your IDE?
    i think yes, it's visible
    here's more information from procmon(process monitor tools) when i drag your stylish button to the form
    http://pastebin.com/raw.php?i=bdPVa0tN

  23. #423
    Addicted Member
    Join Date
    Jun 2009
    Location
    C:\Windows\SysWOW64\
    Posts
    223

    Re: CommonControls (Replacement of the MS common controls)

    Judging by the about form, the obvious answer is no, because its buttons are not styled, either.


  24. #424
    Junior Member
    Join Date
    Jul 2014
    Posts
    16

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Cube8 View Post
    Judging by the about form, the obvious answer is no, because its buttons are not styled, either.
    so what should i do to make this custom component work?

  25. #425
    Fanatic Member DrUnicode's Avatar
    Join Date
    Mar 2008
    Location
    Natal, Brazil
    Posts
    631

    Re: CommonControls (Replacement of the MS common controls)

    It is a good idea to have 2 copies of Vb6.exe
    One is the original.
    Second is with embedded resource for Theme support so you can see Themed controls in the IDE without needing to compile every time.
    Then it is just a matter copying the desired Vb6.exe to "C:\Program Files (x86)\Microsoft Visual Studio\VB98" folder.

    There is obviously something wrong with your Manifest or it didn't get embedded.
    Your about screen should look like this?

    Name:  Vb6About.png
Views: 2551
Size:  35.2 KB

  26. #426

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    Hello

    I proceeded a "few" changes to routines TreeView and Node(s).
    I submit for your approval.

    Now the Image and SelectedImage properties function as in the original.
    You can use the keys as text or numeric.

    Everything seems to work fine, but you never know ...

    best regards
    I think for the moment I will not change this as in the original.
    As this would result in a big overhead. Also for "design time visible" controls, e.g. TabStrip.
    And it would propably slow down some controls, e.g. ListView control...

  27. #427

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

    Re: CommonControls (Replacement of the MS common controls)

    Update. ActiveX Control Version 1.1 released.

  28. #428
    New Member
    Join Date
    Dec 2013
    Posts
    9

    Re: CommonControls (Replacement of the MS common controls)

    good job krool
    thank you

  29. #429
    Junior Member
    Join Date
    Jul 2014
    Posts
    16

    Re: CommonControls (Replacement of the MS common controls)

    Thanks for the update krool also thanks for the help before guys
    now i think i know my problem because of manifest & comctl32.dll
    i got this error

    Name:  Untitled.jpg
Views: 2507
Size:  26.3 KB

    Could anyone help me to fix this please?
    i'm new with vb6 need tutorial to fix this error.
    thank you.

  30. #430
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    35

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

    - Create a copy of "VB6.EXE" and rename to "VB6_XP.EXE".
    - copy attached file in the same folder. (manifest).
    - Rename VB6_XP.EXE.manifest.txt in VB6_XP.EXE.manifest
    - execute "VB6_XP.EXE"
    You have VB6 with the theme and not error.

  31. #431
    Junior Member
    Join Date
    Jul 2014
    Posts
    16

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    - Create a copy of "VB6.EXE" and rename to "VB6_XP.EXE".
    - copy attached file in the same folder. (manifest).
    - Rename VB6_XP.EXE.manifest.txt in VB6_XP.EXE.manifest
    - execute "VB6_XP.EXE"
    You have VB6 with the theme and not error.
    It's working great. Thank you.
    btw why we should change it to VB6_XP.EXE ? is it effect to deployment?

  32. #432
    New Member
    Join Date
    Jul 2014
    Location
    Argentina
    Posts
    6

    Re: CommonControls (Replacement of the MS common controls)

    Hi!
    Is there a way to modify the Tag property so as to use a Variant instead of a String?
    Thanks

  33. #433
    Junior Member
    Join Date
    Jan 2014
    Location
    Oregon
    Posts
    17

    Re: CommonControls (Replacement of the MS common controls)

    Quick question, I did a search on this thread first and didnt return any results.

    On the textbox control, I can change the alignment at runtime on windows 7 but on xp it refuses to change, it even shows the alignment has changed yet does take effect (I use a msgbox to tell me the current alignment and it shows it changed). But on a newer OS it does are works fine. The normal textbox does it just fine on xp, so I am not sure if this is simply needing the v6 like some of the other features do.

    So I have a simple drop down list that the user can set the alignment. In the IDE it doesnt work and it doesnt work when complied on xp. But it works fine on 7.

    Am I missing something?

    Any info would be great, and keep up the great work.

    -Shane

  34. #434

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by SMC1979 View Post
    On the textbox control, I can change the alignment at runtime on windows 7 but on xp it refuses to change, it even shows the alignment has changed yet does take effect (I use a msgbox to tell me the current alignment and it shows it changed). But on a newer OS it does are works fine. The normal textbox does it just fine on xp, so I am not sure if this is simply needing the v6 like some of the other features do.
    I have tested the 'Alignment' property in the TextBoxW control. Worked on XP and 7. (Whether comctl32.dll v5.8x or v6.x)
    Anyone else other results?

  35. #435
    Junior Member
    Join Date
    Jan 2014
    Location
    Oregon
    Posts
    17

    Re: CommonControls (Replacement of the MS common controls)

    Just to clarify, this is when the program is running and not in the IDE, in the IDE it works fine of course. Only changing it after it is running does it not work. But I have only tested on my XP in VMware that I program in, on 7 and 8 it works just fine. So the comctrl32 on the XP machine is 5.8 and of course the other OS's it is v6.

    If it all helpful I could make a small short video showing it.

    Shane

  36. #436
    Junior Member
    Join Date
    Jan 2014
    Location
    Oregon
    Posts
    17

    Re: CommonControls (Replacement of the MS common controls)

    Another thing as well. The combo box. When I have a large list of items in a normal combo box I can start typing and it will pull up the best result. When I do that with the combo box with this one it is only taking the first letter and if I type a 2nd letter after it goes to a different item instead of using the first letter with it.

    So say you have a combo box with these list items

    Apple
    Grape
    Pie

    And the combo current text is blank. You have focus on the combo box and start typing, as soon as you hit "a" apple shows up in the list, then just as quickly you hit "p" after the "a" and instead of staying on apple it goes right to "Pie"

    So is there is a setting or option for the combo box that needs to be set so that it accepts more than just 1 letter when typing into it?

    Shane

  37. #437
    New Member
    Join Date
    Aug 2014
    Posts
    1

    Re: CommonControls (Replacement of the MS common controls)

    Halo Krool,

    in the RichTextBox control (VBCCR11.OCX) there is no SelChange routine.

    Thanks for your attention.

  38. #438

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by akogan View Post
    in the RichTextBox control (VBCCR11.OCX) there is no SelChange routine.
    There is a SelChange event on VBCCR11.OCX. (Even on VBCCR10.OCX is this event available)

    Code:
    Private Sub RichTextBox1_SelChange(ByVal SelType As Integer, ByVal SelStart As Long, ByVal SelEnd As Long)
    Quote Originally Posted by SMC1979 View Post
    Another thing as well. The combo box. When I have a large list of items in a normal combo box I can start typing and it will pull up the best result. When I do that with the combo box with this one it is only taking the first letter and if I type a 2nd letter after it goes to a different item instead of using the first letter with it.

    So say you have a combo box with these list items

    Apple
    Grape
    Pie

    And the combo current text is blank. You have focus on the combo box and start typing, as soon as you hit "a" apple shows up in the list, then just as quickly you hit "p" after the "a" and instead of staying on apple it goes right to "Pie"

    So is there is a setting or option for the combo box that needs to be set so that it accepts more than just 1 letter when typing into it?
    This problem occurs because the ComboBox search is based on one character instead of the complete character set.
    Last edited by Krool; Aug 10th, 2014 at 08:50 AM.

  39. #439
    New Member
    Join Date
    Feb 2011
    Posts
    5

    Re: CommonControls (Replacement of the MS common controls)

    Is it possible to set the RTB background to transparent?

    The following seems to work for the original Rich Text Box, but for some reason not the new one:

    SetWindowLong richtextbox1.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT


    Thanks again for all your hard work

  40. #440
    Junior Member
    Join Date
    Jan 2014
    Location
    Oregon
    Posts
    17

    Re: CommonControls (Replacement of the MS common controls)

    This problem occurs because the ComboBox search is based on one character instead of the complete character set.
    I was able to code a fix around for it. I had to change the combo from a list to a dropdown box, so the user could type in it. As they type the best result shows up (I have it set to show the drop down when they start typing) then, since I needed it as a list and not let them type in something, I have the combo do a find after the drop down closes and if there is a result it sets it, if there isnt it blanks out the text the typed in. So I get the effect that I need if the combo box was set back to a drop down list.

    So I was able to do the effect I was looking for that way :-)

    I dug in some more and think I know how the normal combo box does it. It holds a variable that if another key is pressed under a certain amount of time then it looks for that string, after a small amount of time pasts it resets back to the first letter that is typed next.

    Just like how when you are typing text into the combo box it works fine as the best result comes up. When in drop down list mode you would have to have a variable and a timer to hold what the user is typing and then clear it after say, 1 sec.

    If you like I could do that into the control for you and send your way to see if it is something you could add.

    Shane

Page 11 of 63 FirstFirst ... 8910111213142161 ... 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
  •  



Featured


Click Here to Expand Forum to Full Width