dcsimg
Page 64 of 68 FirstFirst ... 145461626364656667 ... LastLast
Results 2,521 to 2,560 of 2688

Thread: CommonControls (Replacement of the MS common controls)

  1. #2521

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Eduardo- View Post
    I want to comment that I tested updating to your latest version but I experienced an issue, so I went back to the previous one.

    The issue can be seen also in your demo project.
    To do so please open MainForm and go to the code in Form_Load.
    Then put a stop watch in the first line (Call SetupVisualStylesFixes(Me)) by pressing F9.
    Press F5 to run.
    When it stops on that line, press F8 to continue step by step.

    If the problem is reproduced successfully there, you'll see that the code flow goes to the line:
    Code:
    Private Function IOleControl_AddRef(ByRef This As Long) As Long
    in VTableHandle module and does not move further by pressing F8 more times. It only resumes by pressing F5, but then lossing the possibility to run step by step.
    removed

    Quote Originally Posted by Eduardo- View Post
    I also found by chance an error in your demo project: to see it click on the button "RichTextBox Demo". The test program is trying to assign a read-only property.
    I can't reproduce that. Please provide more details.
    Last edited by Krool; Feb 6th, 2020 at 02:25 PM.

  2. #2522
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Going back to VTable subclass is NO option.
    Is there anything dangerous/wrong with the VTable subclass approach?
    (I ask because now I'm sticking to the older version that use that technique)

    Quote Originally Posted by Krool View Post
    2. Go to the VTableHandlingSupported routine in VTableHandle.bas and add a InIDE() IF like below...

    Of course this disables the IOleControl features during debugging.
    Thank you for the tip, in case I decide to use the latest version.

    What are the IOleControl features, something related to navigating with arrow keys?

    Quote Originally Posted by Krool View Post
    I can't reproduce that. Please provide more details.
    When clicking the "Rich TextBox demo" button, it loads RichTextBoxForm and at the end of the Form_Load it is the line:

    Code:
    If Not IsNull(RichTextBox1.SelFontName) Then FontCombo1.Text = RichTextBox1.SelFontName
    since RichTextBox1.SelFontName is not null, it tries to set "MS Sans Serif" to FontCombo1.Text, but FontCombo control's property Text is read-only. Hence it raises the error at the line:

    Code:
    Err.Raise Number:=383, Description:="Property is read-only"
    Last edited by Eduardo-; Feb 6th, 2020 at 01:13 PM.

  3. #2523
    Member
    Join Date
    Apr 2019
    Posts
    51

    Re: CommonControls (Replacement of the MS common controls)

    Hi All,

    I am trying to extract icons from DLL file and add them to ImageList and then show them in ListView. The code is as follows:

    Code:
    ListView1.ListItems.Clear
    ImageList1.ListImages.Clear
    ImageList1.ImageHeight = 32
    ImageList1.ImageWidth = 32
    ImageList1.ColorDepth = ImlColorDepth24Bit
    
    
    For i = 0 To UBound(arrSomething)
                Picture1.Cls
                Picture1.Picture = GetIconFromFile(arrSomething(i).IconPath, True) ' Yep, the extracted icon is correct
    
                ImageList1.ListImages.Add i+1 , , GetIconFromFile(arrSomething(i).IconPath, True) '<- this function return large icon as StdPicture
              ' ImageList1.ListImages.Add i+1 , , Picture1.Picture ' Just for testing - works but randomly
    
              ' Picture1.Picture = ImageList1.ListImages(i + 1).ExtractIcon ' This works always
    
                With ListView1.ListItems.Add(, , arrSomething(i).Name, i+1) 
                        ....
                End With
    Next i
    It works...randomly - sometimes I have all the icons, sometimes not; after a listview refresh, sometimes they disappear; after a few refreshes, they come back again eventually. Picture1 always receives the icon, no matter if it's from the function or from the ImageList.

    Am I doing something wrong or it's a bug in the ListView?!

    Thank you.

  4. #2524

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

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Improvement (cosmetic, not a bug) in VTableHandle.bas so that IOleControl do not disturb anymore in IDE on debugging.
    Setting breakpoints (F9, F8 etc.). This cosmetic issue only affected the Std-EXE version and NOT the OCX.

    Quote Originally Posted by Eduardo- View Post
    I want to comment that I tested updating to your latest version but I experienced an issue, so I went back to the previous one.

    The issue can be seen also in your demo project.
    To do so please open MainForm and go to the code in Form_Load.
    Then put a stop watch in the first line (Call SetupVisualStylesFixes(Me)) by pressing F9.
    Press F5 to run.
    When it stops on that line, press F8 to continue step by step.

    If the problem is reproduced successfully there, you'll see that the code flow goes to the line:
    Code:
    Private Function IOleControl_AddRef(ByRef This As Long) As Long
    in VTableHandle module and does not move further by pressing F8 more times. It only resumes by pressing F5, but then lossing the possibility to run step by step.
    You know what? This issue is resolved. It was easier than I thought and pretty straight forward solution.
    So, there is nothing issue for you to update everything to the latest version.

    Quote Originally Posted by Eduardo- View Post
    Is there anything dangerous/wrong with the VTable subclass approach?
    (I ask because now I'm sticking to the older version that use that technique)
    I described this in post #2472

    Quote Originally Posted by Eduardo- View Post
    Thank you for the tip, in case I decide to use the latest version.

    What are the IOleControl features, something related to navigating with arrow keys?
    Just ignore the tip, as it's resolved. I deleted the tip to avoid confusion.

    Quote Originally Posted by Eduardo- View Post
    When clicking the "Rich TextBox demo" button, it loads RichTextBoxForm and at the end of the Form_Load it is the line:

    Code:
    If Not IsNull(RichTextBox1.SelFontName) Then FontCombo1.Text = RichTextBox1.SelFontName
    since RichTextBox1.SelFontName is not null, it tries to set "MS Sans Serif" to FontCombo1.Text, but FontCombo control's property Text is read-only. Hence it raises the error at the line:

    Code:
    Err.Raise Number:=383, Description:="Property is read-only"
    In fact the FontCombo.Text is not always read-only. It's only when there is no match in the list.
    This behavior is the same as in the VB.ComboBox.

    Here is a portion of the Text property in FontCombo:
    Code:
    Case FtcStyleDropDownList
        If FontComboHandle <> 0 And FontComboDesignMode = False Then
            Dim Index As Long
            Index = SendMessage(FontComboHandle, CB_FINDSTRINGEXACT, -1, ByVal StrPtr(Value))
            If Not Index = CB_ERR Then
                Me.ListIndex = Index
            Else
                Err.Raise Number:=383, Description:="Property is read-only"
            End If
        Else
            Exit Property
        End If
    As you see, it's only read-only when CB_FINDSTRINGEXACT returns CB_ERR. So in other words, "MS Sans Serif" is missing in your FontCombo1 list.
    I don't have the issue because in my FontCombo1 "MS Sans Serif" is contained.
    Can you please check which fonts are in your list and if "MS Sans Serif" is missing?

  5. #2525
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    You know what? This issue is resolved. It was easier than I thought and pretty straight forward solution.
    So, there is nothing issue for you to update everything to the latest version.
    Great!, thank you very much Krool

    Quote Originally Posted by Krool View Post
    In fact the FontCombo.Text is not always read-only. It's only when there is no match in the list...

    Can you please check which fonts are in your list and if "MS Sans Serif" is missing?
    MS Sans Serif is not on the list of the FontCombo control, but it is on the font list of other programs such as Notepad.

    I'll try to investigate the code to find the cause why it is skipped, but I'll do it later.
    I'll update this post then. (*)
    (I think that font is a type of font that is not vector based, that might be the cause -just a guess-)

    * Update: I found that the cause was that I have Windows configured as the language for non Unicode programs to Hebrew (because I'm working with some right-to-left issues in my program).
    As soon as I changed the Language back to Spanish, the MS Sans Serif font got listed on the control.

    Studing the code, I found that while Windows is configured to display Hebrew, the EnumFontFamiliesEx API does not list the MS Sans Serif font. But other programs list it and it is available on the system.
    Last edited by Eduardo-; Feb 6th, 2020 at 06:23 PM.

  6. #2526
    Lively Member
    Join Date
    Jan 2018
    Posts
    120

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by ahenry View Post
    Is Windows XP supposed to be supported? I fired up a small XP VM and get some runtime errors with the Toolbar or maybe the related ImageList. I'm not planning to deploy to XP, so I won't bother looking into it any further if that OS isn't supported by VBCCR16.OCX.
    It turned out my issue was with 32-bit pictures. VBCCR16 was failing with runtime error 50003 when I tried to open the form, but when I tried to load 32-bit images in a clean project, I got an "invalid picture format" error. Not a big deal; I don't need XP to work anyhow.

  7. #2527
    Registered User
    Join Date
    Feb 2020
    Posts
    2

    Re: CommonControls (Replacement of the MS common controls)

    krool,nice job,I am trying to get Msgbox text,But get null,thank you!
    Private Sub CommandButtonW1_Click()
    kkk
    End Sub
    Private Function kkk() As Long
    Dim Result As Long
    Dim strErrMsg As String
    Dim intOldMousePointer As Long

    On Error GoTo errHandler

    intOldMousePointer = Screen.MousePointer
    Screen.MousePointer = vbHourglass
    Result = -1
    If Result = -1 Then
    Err.Description = "this is test"
    GoTo errHandler:
    End If
    errHandler:
    Screen.MousePointer = intOldMousePointer
    strErrMsg = Err.Description

    On Error Resume Next

    MsgBox strErrMsg
    End Function

  8. #2528
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,744

    Re: CommonControls (Replacement of the MS common controls)

    You raise an error by calling err.raise and specifying the error number.
    Nothing to do with Krools Common Controls

  9. #2529
    Registered User
    Join Date
    Feb 2020
    Posts
    2

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Arnoutdv View Post
    You raise an error by calling err.raise and specifying the error number.
    Nothing to do with Krools Common Controls
    thanks Arnoutdv
    add code: debug.print strErrMsg,the strErrMsg is null(use vbcc CommandButtonW)
    add code: debug.print strErrMsg,the strErrMsg is "this is test"(use vb CommandButton)

    I get the reason,"Screen.MousePointer = intOldMousePointer",it created some mouse messages,and WindowProcControl received the mouse messages。I have solved the problem(use SetCapture、ReleaseCapture)。

  10. #2530
    Member
    Join Date
    Sep 2016
    Posts
    34

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool

    Please how to change the Statusbar Backcolor property ?

  11. #2531
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by darjeeling View Post
    how to change the Statusbar Backcolor property ?
    First set VisualStyles to False and then set the BackColor.

  12. #2532
    Member
    Join Date
    Sep 2016
    Posts
    34

    Re: CommonControls (Replacement of the MS common controls)

    Hi Eduardo
    Yes this works but the SizeGrip Backcolor remain unchanged !

  13. #2533
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by darjeeling View Post
    Hi Eduardo
    Yes this works but the SizeGrip Backcolor remain unchanged !
    If you need only the SizeGrip and not the whole StatusBar, you can use this control.

  14. #2534
    New Member
    Join Date
    Jan 2020
    Posts
    5

    Re: CommonControls (Replacement of the MS common controls)

    Krool,
    a little difference between ComboBoxW and the standard control: you can not perform ".Additem vbNullString", it raises a strange error.
    It's not a problem, to solve it is enough to use an empty string (""), I just want to let you know.

  15. #2535

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by darjeeling View Post
    Yes this works but the SizeGrip Backcolor remain unchanged !
    Like Eduardo suggested. You can use a special "SizeGrip UserControl".

    I also posted a SizeGrip control here in the forum long time ago which draws on comctl32.dll (either themed or not, depending on manifest) and contrary to Eduardo's solution does not depend on static images.

    My control was updated now to include a BackColor property. (SizeGrip; see link above)

    Quote Originally Posted by sbri View Post
    a little difference between ComboBoxW and the standard control: you can not perform ".Additem vbNullString", it raises a strange error.
    It's not a problem, to solve it is enough to use an empty string (""), I just want to let you know.
    Good point. I was not aware that CB_ADDSTRING or CB_INSERTSTRING returns CB_ERR when the string pointer is 0..

    However, I added following check now inside the AddItem method to avoid such a situation in the ComboBoxW. (update released)
    Code:
    Public Sub AddItem(ByVal Item As String, Optional ByVal Index As Variant)
    [...]
    If StrPtr(Item) = 0 Then Item = ""
    Last edited by Krool; Feb 12th, 2020 at 03:39 PM.

  16. #2536
    Addicted Member
    Join Date
    Jul 2017
    Posts
    208

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool ,

    1- In previous posts here , there was a discussion about who is responsible for calling the SetupVisualStyles method and you said that it is the EXE`s responsibility not the ocx . But there is a question here , What about the controls created at runtime ? . I the have to recall the sub again after loading them . This seems normal in simple cases (low repetitive calls , not many controls , the loaded controls are in a form .. etc) . But there are some other cases where calling this method is tricky and overhead like if there are too many controls(loaded in runtime) or when calling this sub for many times depending on the control load logic and behavior in the code and also when these newly created controls are in a nested user control or non-nested one . All the previous cases have a workaround and can be done . But just a thought if it can be handled or being re-thought about this case .

    2- In Dtpicker , while formatted for time and the digits are displayed in Arabic with SegeoUI font , the hours panel is not fully displayed . When the hours are represented in two digits like 12 or 13 etc , the digit 1 is not at all visible . If for example the hour is 23 , the digit 2 is partially visible and so on .This happens only in digits in Arabic format . So , The area for the hours panel is not drawing correctly in this case .

    3- About TextBoxW Balloon Tips , It only shows the balloon for the last textbox . Can this be solved ? . I know this is because it should hide when the text box loses the focus and this is the case when showing these tips .
    If it can be handled without changing focus or capture state it will be nice because it also has some disadvantages . The first one is mentioned above : is that the they can not be shown simultinously .And also , they force the text box to fire both LostFocus and GotFocus events too many times which adds overhead especially when these events contain some code (Like in my case) .

    I used debug.print in both LostFocus and GotFocus events for the TextBox when showing the balloon tip and the result was as following :

    exit
    enter
    enter
    exit
    enter
    exit

    Besides overhead , There is something which is more dangerous that is firing SetFocus event two times one after another which can not happen in normal behavior. Most of code that is placed in gotfocus event is sometimes related to lostfocus event as it is always expected that when gotfocus event is fired , it will never be fired again until it loses the focus .This double call caused a lot of problems in my case and I have just figured out the reason . So , If it is possible for balloon tips to implemented without dealing with setting and releasing the capture , it will add many advantages (Showing many ones at the same time - reducing overhead - solving the double calls for set capture - saving performance by eliminating multiple calls for LostFocus and GotFocus events too many times ) .

    Thanks a lot for you effort .

  17. #2537
    Addicted Member
    Join Date
    Jul 2016
    Posts
    141

    Re: CommonControls (Replacement of the MS common controls)

    Is anyone else experiencing the problem that text inside TextBoxW with alignment set to vbCenter does not get centered?

    Code:
    TextBoxW1.Text = "this should be centered"
    TextBoxW1.Alignment = vbCenter
    Name:  screenshot_20200214_160922.png
Views: 174
Size:  816 Bytes

  18. #2538
    Lively Member
    Join Date
    Jan 2018
    Posts
    120

    Re: CommonControls (Replacement of the MS common controls)

    Works for me in Windows 10. Checked running in the IDE and design mode with the OCX version.

  19. #2539
    Addicted Member
    Join Date
    Jul 2016
    Posts
    141

    Re: CommonControls (Replacement of the MS common controls)

    Windows XP, Home Edition, SP3, version 2002.

    Using VBCCR16.OCX 1.06.0061 3af959d

  20. #2540

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

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    I noticed in a new form-less application that CommonDialog.ShowPrinterEx was not working and raised the error "The PrintDlgEx function failed during initialization." with the error value E_HANDLE.

    The CommonDialog.ShowPrinter was not affected.

    It turns out that the PrintDlg API can deal without owner window whereas on PrintDlgEx the owner window member value cannot be NULL. It returns E_HANDLE when it's NULL.

    The internal function to get the owner window in CommonDialog is as following:
    Code:
    Private Function GetOwnerWindow() As Long
    Dim hWnd As Long, hWndMDIClient As Long
    hWnd = GetActiveWindow()
    If hWnd <> 0 Then hWndMDIClient = FindWindowEx(hWnd, 0, StrPtr("MDIClient"), 0)
    If hWndMDIClient <> 0 Then
        Const WM_MDIGETACTIVE As Long = &H229
        GetOwnerWindow = SendMessage(hWndMDIClient, WM_MDIGETACTIVE, 0, ByVal 0&)
    Else
        GetOwnerWindow = hWnd
    End If
    End Function
    So in a form-less application GetOwnerWindow() is NULL.
    As the other common dialog boxes accepts a NULL value and only PrintDlgEx being an exception I keep GetOwnerWindow() unchanged and do a workaround in the ShowPrinterEx function only, as following: (code in blue is new, added)
    Code:
    .hWndOwner = GetOwnerWindow()
    If .hWndOwner = 0 Then
        ' According to MSDN:
        ' This member must be a valid window handle; it cannot be NULL.
        ' The PrintDlgEx function will return E_HANDLE when this member was NULL.
        .hWndOwner = GetDesktopWindow()
    End If
    Also, which I was not aware of, is that .ShowPrinter (PrintDlg) looks different in a form-less app than in a normal form app. (difference being owner window NULL or not)

    PrintDlg (Valid owner window)
    Name:  print1.gif
Views: 174
Size:  16.2 KB

    PrintDlg (Owner window NULL)
    Name:  print5.gif
Views: 167
Size:  11.0 KB
    Last edited by Krool; Feb 14th, 2020 at 04:54 PM.

  21. #2541
    Lively Member
    Join Date
    Jun 2017
    Posts
    102

    Re: CommonControls (Replacement of the MS common controls)

    hi Krool

    Whether next version can support the following

    http://www.vbforums.com/showthread.p...oplist-problem
    Last edited by quickbbbb; Feb 15th, 2020 at 12:33 AM.

  22. #2542
    Hyperactive Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    510

    Request : Add Horiz. & Vert. Skroolbars to the CommonControls Collection

    Krool,

    I too have a request. Hopefully it isn't too much work. VB6 provides a horizontal and vertical scrollbar for dropping onto your form, however, they don't seem to respond to mouse scroll wheel movement natively.

    My form has your treeview and slider controls, both of which respond to mouse scrollwheel movement (a quick aside - when the treeview's contents extend in x/y beyond the control's boundaries, your treeview only responds to vertical scrolls even when the horizontal scrollwheel has the focus, same as .NET). Regardless of any perceived inconsistency there, that is all well and good for me. I am very impressed by the treeview control.

    My form also uses the VB6 native file listbox which strangely already responds to mouse scrollwheel events. Even better.



    The trouble is that I also have a pseudo-thumbnail view and use both a horizontal and vertical scroll bar, one to navigate through my icons in that thumbnail view and the other horizontal one, to scroll an icon map. Neither of these two standard VB6 scrollbars respond to mouse scroll wheel movement and as a result these controls are inconsistent with the rest of the form.



    My VB.NET version, of course handles all mouse scroll wheel movements as the user would expect but I prefer the VB6 version and I want it to operate as well as the VB.NET does.

    So, my request is: Can you please create the vertical/horizontal scrollbar controls and add them to your collection? I think it would be a useful addition, certainly for me.

    We could call them SKroolbars...
    Last edited by yereverluvinuncleber; Feb 15th, 2020 at 06:55 PM. Reason: Added pictures.

  23. #2543
    Member dseaman's Avatar
    Join Date
    Oct 2004
    Location
    Natal, Brazil
    Posts
    33

    Re: CommonControls (Replacement of the MS common controls)

    your treeview only responds to vertical scrolls even when the horizontal scrollwheel has the focus, same as .NET).
    How about updating Horizontal Scrollbar via MouseWheel when Kybd Shift is pressed.
    That is how it works on Web Scrollbars.

    See ucScrollbar control where Kybd Shift has been implemented for Horizontal Scrollbar.
    http://www.vbforums.com/showthread.p...=1#post5437197

  24. #2544
    Hyperactive Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    510

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by dseaman View Post
    How about updating Horizontal Scrollbar via MouseWheel when Kybd Shift is pressed.
    That is how it works on Web Scrollbars.

    See ucScrollbar control where Kybd Shift has been implemented for Horizontal Scrollbar.
    http://www.vbforums.com/showthread.p...=1#post5437197
    I could do that but I prefer scrollbars to operate as they should and just as they do in other apps and also how they operate in the .NET version of the same application.

    Also, bearing in mind what I said in my request, that the other scrollbars are all functioning just as they ought. It is just these two native scrollbars that do not. It would be logically more sensible to fix the two bars that aren't functioning as expected, rather than have to work on all those that are working correctly in order to make them operate differently and counter-intuitively to most user expectations.

  25. #2545
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,103

    Re: CommonControls (Replacement of the MS common controls)

    Hello Krool, I want to ask you what is the purpose of your MsgBox overwrite function:

    Code:
    ' (VB-Overwrite)
    Public Function MsgBox(ByVal Prompt As String, Optional ByVal Buttons As VbMsgBoxStyle = vbOKOnly, Optional ByVal Title As String) As VbMsgBoxResult
    Thank you.

  26. #2546

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Eduardo- View Post
    Hello Krool, I want to ask you what is the purpose of your MsgBox overwrite function:

    Code:
    ' (VB-Overwrite)
    Public Function MsgBox(ByVal Prompt As String, Optional ByVal Buttons As VbMsgBoxStyle = vbOKOnly, Optional ByVal Title As String) As VbMsgBoxResult
    Thank you.
    The purpose is one word: "Unicode"

  27. #2547
    Lively Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    113

    Re: CommonControls (Replacement of the MS common controls)

    It is Unicode.

  28. #2548
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    The purpose is one word: "Unicode"
    Ah, OK, thank you.

  29. #2549
    Member dseaman's Avatar
    Join Date
    Oct 2004
    Location
    Natal, Brazil
    Posts
    33

    Re: CommonControls (Replacement of the MS common controls)

    If you sort your controls alphanumeric in the Vbp file they will appear sorted in the ToolBox.
    Actually, I usually sort the entire block containing Modules/Classes/Controls/PropertyPages to make the Vbp more readable.

  30. #2550
    Addicted Member
    Join Date
    Jul 2016
    Posts
    141

    Re: CommonControls (Replacement of the MS common controls)

    Is it possible to make a list (listview?) where a row spans multiple lines, possibly using different formatting for some elements?

    An example:
    Name:  Untitled 1.png
Views: 111
Size:  30.2 KB

    Note that the second row is selected, and the name is in bold.

  31. #2551
    Member
    Join Date
    Oct 2016
    Posts
    38

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by OldClock View Post
    Is it possible to make a list (listview?) where a row spans multiple lines, possibly using different formatting for some elements?

    An example:
    Name:  Untitled 1.png
Views: 111
Size:  30.2 KB

    Note that the second row is selected, and the name is in bold.
    this is where ownerdraw come into play
    on the listbox (and some other controls) there is a DrawMode property and corresponding events.
    although I can not see these on the listview control, maybe krool will decide to add it at some point.
    you could still use the windows api to do it
    Last edited by Semke; Feb 17th, 2020 at 12:38 PM.

  32. #2552
    Member
    Join Date
    Oct 2016
    Posts
    38

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Eduardo- View Post
    Hello Krool, I want to ask you what is the purpose of your MsgBox overwrite function:

    Code:
    ' (VB-Overwrite)
    Public Function MsgBox(ByVal Prompt As String, Optional ByVal Buttons As VbMsgBoxStyle = vbOKOnly, Optional ByVal Title As String) As VbMsgBoxResult
    Thank you.
    is this available in the ocx version?

  33. #2553

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    is this available in the ocx version?
    Is that a real question?

    This thread should not answer each beginner's question...

  34. #2554
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,103

    Re: CommonControls (Replacement of the MS common controls)

    Replacing the intrinsic VB functions form the OCX would be possible using ASM code. Sample attached.

    Edit: updated the sample, there were a couple of errors in the one that I posted before.
    Attached Files Attached Files
    Last edited by Eduardo-; Feb 18th, 2020 at 01:15 AM.

  35. #2555
    Member
    Join Date
    Oct 2016
    Posts
    38

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Is that a real question?

    This thread should not answer each beginner's question...
    looks like you misunderstood the question.

    I know I can create the function (Unicode), but the one you created is not exposed in the ocx version.

    I have been working with visual basic since its first version and I am far from being a beginner.

  36. #2556
    Hyperactive Member
    Join Date
    Oct 2005
    Posts
    376

    Re: CommonControls (Replacement of the MS common controls)

    Last time I tried it the sample wouldn't load. I don't think they are really trying to make something people can use. Just tech types having fun I think.

  37. #2557
    Hyperactive Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    510

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Darkbob View Post
    Last time I tried it the sample wouldn't load. I don't think they are really trying to make something people can use. Just tech types having fun I think.
    I don't think you are correct there old chum. You may need some guidance on getting it to work for you but your current attitude is akin to going to the doctor once and saying, "I tried some medicine once and it didn't work. I don't think they are really trying to make people better. Just medico types trying to look important I think."

  38. #2558
    Hyperactive Member
    Join Date
    Oct 2005
    Posts
    376

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by yereverluvinuncleber View Post
    I don't think you are correct there old chum. You may need some guidance on getting it to work for you but your current attitude is akin to going to the doctor once and saying, "I tried some medicine once and it didn't work. I don't think they are really trying to make people better. Just medico types trying to look important I think."
    The demo still doesn't run. Not saying it's impossible to get it to run. But normally you run a demo - it doesn't work - you give up and move on. I asked about it, googled, tried a few things - more than most people would ever bother doing - and it still doesn't run. So for sure it's a terrible demo that makes the entire project look bad. And it's still in the first link here. If people are serious about a project they make sure the demo works. If they are just tech types having fun then they don't care. I get the feeling that's the case here.

    I'll show you what people see when they run this project...

    Name:  demo.jpg
Views: 95
Size:  36.0 KB

    I think I found the problem here:

    Name:  missing.jpg
Views: 95
Size:  40.5 KB

    So you do some digging, find the missing file (it's actually hidden inside the demo if you know where to look)... you fix that problem and you are still no further ahead because of THIS issue...

    Name:  missing2.jpg
Views: 91
Size:  19.9 KB

    Long before this point most people would just give up. As I said.. not really a criticism... just an observation. But this isn't a project where the author is trying to make something useful for most VB programmers. He's having fun doing something he enjoys. Great for him. Unfortunately a potentially great and useful project is ruined by a non functional demo.

    Out of curiosity.. what the heck is "a manifest specifying comctl32.dll version 6.0 or higher" and where would a person get one?

    I found the VBCCR OCX in another thread and registered it and loaded it up to test. Some of the controls do work but about half of them say something like:

    "The linkLabel control requires at least version 6.0 of comctl32.dll".

    I have the version from SP6 so shouldn't it be the right version? And isn't the entire point of this project to get away from comctl32?

    Name:  missing3.jpg
Views: 88
Size:  33.4 KB

    And then the project wants me to make a manifest for VB6... * sigh * Time to give up again. But as I said last time, it's an interesting project. Hopefully some day somebody can get the demo to work right.
    Last edited by Darkbob; Feb 17th, 2020 at 11:29 PM.

  39. #2559

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Darkbob View Post
    The demo still doesn't run. Not saying it's impossible to get it to run. But normally you run a demo - it doesn't work - you give up and move on. I asked about it, googled, tried a few things - more than most people would ever bother doing - and it still doesn't run. So for sure it's a terrible demo that makes the entire project look bad. And it's still in the first link here. If people are serious about a project they make sure the demo works. If they are just tech types having fun then they don't care. I get the feeling that's the case here.

    I'll show you what people see when they run this project...

    Name:  demo.jpg
Views: 95
Size:  36.0 KB

    I think I found the problem here:

    Name:  missing.jpg
Views: 95
Size:  40.5 KB

    So you do some digging, find the missing file (it's actually hidden inside the demo if you know where to look)... you fix that problem and you are still no further ahead because of THIS issue...

    Name:  missing2.jpg
Views: 91
Size:  19.9 KB

    Long before this point most people would just give up. As I said.. not really a criticism... just an observation. But this isn't a project where the author is trying to make something useful for most VB programmers. He's having fun doing something he enjoys. Great for him. Unfortunately a potentially great and useful project is ruined by a non functional demo.

    Out of curiosity.. what the heck is "a manifest specifying comctl32.dll version 6.0 or higher" and where would a person get one?

    I found the VBCCR OCX in another thread and registered it and loaded it up to test. Some of the controls do work but about half of them say something like:

    "The linkLabel control requires at least version 6.0 of comctl32.dll".

    I have the version from SP6 so shouldn't it be the right version? And isn't the entire point of this project to get away from comctl32?

    Name:  missing3.jpg
Views: 88
Size:  33.4 KB

    And then the project wants me to make a manifest for VB6... * sigh * Time to give up again. But as I said last time, it's an interesting project. Hopefully some day somebody can get the demo to work right.
    It's modern nowadays to give up immediately on first problems instead to read the notes or make some research?

    If youwould read the notes in the first thread you would know to make following setting;

    Goto menu Tools -> Options... -> General -> Error Trapping.
    "Break on Unhandled Errors" should be selected instead of "Break in Class Module".

    This is some odd default setting of VB6 whichI can't do something about. However, it's s one-time change in settings and then OK for the end of life of that installation.

    Now the demo runs.

    About the rest make some google research about manifesting and theming.
    It's optional, when you don't want full features you not need to manifest. It's not my restriction. It's windows.

    comctl32.dll is a windows system file, and not an MS OCX. The .dll is part of the core and always pre-installed.

    Please don't post such statements with "half knowledge".
    If it's too overwhelming for you just move on.

    Quote Originally Posted by Semke View Post
    I know I can create the function (Unicode), but the one you created is not exposed in the ocx version.
    It's the responsibility of the >>EXE<< to make such things. It would be ridicolous if an OCX overwrites VB functions without any control and with ASM hacks..
    Last edited by Krool; Feb 18th, 2020 at 12:35 AM.

  40. #2560
    Hyperactive Member
    Join Date
    Oct 2005
    Posts
    376

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post

    If youwould read the notes in the first thread you would know to make following setting;

    Goto menu Tools -> Options... -> General -> Error Trapping.
    "Break on Unhandled Errors" should be selected instead of "Break in Class Module".
    Well... that did change things. Now the whole IDE just closes and exits without any error message. But the demo still doesn't run.

    Just to make sure it wasn't just this new laptop I'm having troubles with I downloaded the demo and ran it on another computer. Identical result. Press Run and * poof * the IDE closes and exits. No error message. Just gone.

    Best of luck on what looks like a very powerful project with a lot of potential. I'll be sure to keep an eye on this thread and see what happens in future.
    Last edited by Darkbob; Feb 18th, 2020 at 12:43 AM.

Page 64 of 68 FirstFirst ... 145461626364656667 ... 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