dcsimg
Page 2 of 61 FirstFirst 123451252 ... LastLast
Results 41 to 80 of 2424

Thread: CommonControls (Replacement of the MS common controls)

  1. #41
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    I have one problem, very often crashes when you compile an application (even an example), and the exe-file is created. And sometimes crashes when you press End in the course of the program.
    Can you tell us how to replicate your "problem"? Can you also point out the code that you suspect is causing the problem?
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  2. #42
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Also for the beautiful subsclassing commandbutton think it will be good to make changes if there is a caption and a picture, you have the image on the left and the caption to the left of the picture. So the picture will not be imposed on the text.
    Is that somehow related to this thread? Also, I think what you're saying, is that you want both the button icon and text to be on the left side of the button. Is this correct?
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  3. #43
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Bonnie West View Post
    Is that somehow related to this thread? Also, I think what you're saying, is that you want both the button icon and text to be on the left side of the button. Is this correct?
    Well, partly it has to do with the topic. But, the project is code imposes sabsclassing on standard components.
    Code:
    Public Sub SetupVisualStyles(ByVal Form As VB.Form)
    If GetComCtlVersion() >= 6 Then SendMessage Form.hWnd, WM_CHANGEUISTATE, MakeDWord(UIS_CLEAR, UISF_HIDEFOCUS Or UISF_HIDEACCEL), ByVal 0&
    If EnabledVisualStyles() = False Then Exit Sub
    Dim CurrControl As Control
    For Each CurrControl In Form.Controls
        Select Case TypeName(CurrControl)
            Case "Frame"
                RemoveVisualStyles CurrControl.hWnd
                SetWindowSubclass CurrControl.hWnd, AddressOf RedirectFrame, ObjPtr(CurrControl), 0
            Case "CommandButton", "CheckBox", "OptionButton"
                If CurrControl.Style = vbButtonGraphical Then
                    If CurrControl.Enabled = True Then SetProp CurrControl.hWnd, StrPtr("Enabled"), 1
                    SetWindowSubclass CurrControl.hWnd, AddressOf RedirectButton, ObjPtr(CurrControl), ObjPtr(CurrControl)
                End If
        End Select
    Next CurrControl
    End Sub

  4. #44
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Bonnie West View Post
    Can you tell us how to replicate your "problem"? Can you also point out the code that you suspect is causing the problem?
    VB crashes after compiling the project, if you open a form MainForm in IDE
    1. open CommonControls.vbp
    2. MainForm.frm open in the GUI
    3. compile the project
    4. After compiling - Crash VB
    Error occurs both on windows xp, and Windows 7.
    The compiled exe with no problems

  5. #45
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    OK, I can confirm that on XP, the IDE does indeed crash while compiling the exe. I believe it's due to the heavy subclassing involved, even in the IDE. I think what happens is that some controls are destroyed "abruptly" by VB6, i.e., the UserControl_Terminate() doesn't fire, giving the UserControl(s) no chance of unsubclassing properly, thus causing a crash. Of course, the simplest workaround is to close the MainForm first before compiling. BTW, crashes are to be expected when subclassing, as it's very easy to reference invalid memory addresses.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  6. #46
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Well, partly it has to do with the topic. But, the project is code imposes sabsclassing on standard components.
    You may want your post(s) to be transferred to the Fix Visual Styles Issues (Themes) thread, as it's the more appropriate thread. Ask a moderator about it by clicking the black triangle icon on the bottom left side of your post.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  7. #47

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

    Re: CommonControls (Replacement of the MS common controls)

    If you set by the StatusBar the compile option "ImplementDesignModeSubclass" to False then it should not crash anymore when you compile your project with a opened form that contains a StatusBar.
    Last edited by Krool; May 20th, 2013 at 11:12 AM.

  8. #48
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    Only the latest version on 9/may has crash issue while compiling with Mainform open after you updated SubclassProc. I didn't see any crash before. Please double check where and what you have modified since last update.

  9. #49
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    If you set by the StatusBar the compile option "ImplementDesignModeSubclass" to False then it should not crash anymore when you compile your project with a opened form that contains a StatusBar.
    Thank you. This solution helped.

  10. #50
    New Member
    Join Date
    May 2013
    Posts
    2

    Re: CommonControls (Replacement of the MS common controls)

    Lovely controls. I see however, that the MOUSEUP event works kinda wierd. (I am specifically referring to the listview control). When I right-click an item in the listview, the MOUSEUP event does not fire. Double-clicking (right button) does fire the event. Is this by design (different to the way the listview works in VB6) or did I miss something?

  11. #51

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

    Re: CommonControls (Replacement of the MS common controls)

    See this article from MSDN referring to the WM_RBUTTONUP message by the ListView controls.

    "Note that the control processes the corresponding WM_RBUTTONUP message, and does not dispatch it. Applications thus cannot see this message, even by subclassing the control."

    You may use the "ContextMenu" event for your purpose, as this will be fired when the right mouse button goes up. (but also when pressing SHIFT + F10, but you can filter this case out by checking if the X and Y values are not -1)

    Another solution is that you split the Click() event by seperating the NM_CLICK and NM_RCLICK. So you can catch then the NM_RCLICK. Somehow like a RClick() event then.

    And again a other sultion is just to handle the ItemClick() event and check if the Button value is vbRightButton, but this will only be fired when your mouse is over an item.
    Last edited by Krool; May 23rd, 2013 at 01:56 PM.

  12. #52
    New Member
    Join Date
    May 2013
    Posts
    2

    Re: CommonControls (Replacement of the MS common controls)

    Thanks, the "ContextMenu" solution works great.

  13. #53

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

    Re: CommonControls (Replacement of the MS common controls)

    Update released.
    Last edited by Krool; Jun 4th, 2013 at 04:31 PM.

  14. #54
    Addicted Member
    Join Date
    Mar 2009
    Posts
    195

    Re: CommonControls (Replacement of the MS common controls)

    Thanx to Bonnie West I noticed this great control set.. Look absolutely awesome.. I too don't like to have to link to OCX, especially after I noticed a crash (when you reorder a listview) with a specific MSCOMCTL.OCX (6.1.97.82).. And I also like to have as much control over the controls as possible, so I love this, as if you run into a problem/or missing something you like you can just add it and it's avaible to all your forms where you use the controls, now we use functions/methods located in modules to do what should be a method/property on some controls.. hehe..

    With the current version (common controls demo) the problem of Vb6 crashing after compile when the form is open, is still there (windows 7 ultimate x64)..

    Keep up the great work, and thanx..

  15. #55
    New Member
    Join Date
    Jun 2013
    Posts
    8

    Re: CommonControls (Replacement of the MS common controls)

    This looks nice... and thanks for your efforts. But is there a reason I can't embed your ListView implementation in a VB6 UserControl? I need a Unicode-aware ListView in my ancient file i/o control. I don't seem to get events when I do this--the ListView shows up, and I can add items, but not much else is working... I'm calling
    Code:
        Call ComCtlsInitIDEStopProtection
        Call InitVisualStyles
    in my UserControl_Initialize. Is there something I'm missing?

  16. #56

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by RichInSoquel View Post
    But is there a reason I can't embed your ListView implementation in a VB6 UserControl?
    I just released an update that fixes a bug in the WM_MOUSEACTIVATE handler for this case.
    I suggest you download the project again.

    Then you need to add the following code to your UserControl:

    Code:
    Implements OLEGuids.IOleInPlaceActiveObjectVB
    
    Private Sub IOleInPlaceActiveObjectVB_TranslateAccelerator(ByRef Handled As Boolean, ByRef RetVal As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal Shift As Long)
    On Error Resume Next
    Dim This As OLEGuids.IOleInPlaceActiveObjectVB
    Set This = UserControl.ActiveControl.Object
    This.TranslateAccelerator Handled, RetVal, wMsg, wParam, lParam, Shift
    End Sub
    This is necessary because in this case the Container (UserControl) of the embedded controls receive the TranslateAccelerator message. If the ActiveControl of the UserControl implements the IOleInPlaceActiveObjectVB interface (That are the common controls from my project), then it delegates to it and perform the TranslateAccelerator for that control.
    Last edited by Krool; Jun 25th, 2013 at 01:49 PM.

  17. #57
    New Member
    Join Date
    Jun 2013
    Posts
    8

    Re: CommonControls (Replacement of the MS common controls)

    Thanks for you suggestions.

    I've downloaded the latest, and added your suggested code into my UserControl. Now I am seeing some events. I see one ItemSelect Event from your ListView (it arrives as I add the first item into ListView.ListItems). None are received by my UserControl after that. I have debug.prints in your code that report when RaiseEvents are fired by you:

    When I click on an item,
    You raise I receive
    ItemSelect [nothing]
    ItemSelect [nothing]
    ItemClick [nothing]

    When I click on a column header,
    You raise I receive
    ColumnClick ColumnClick

    When I start to resize a column
    You raise I receive
    ColumnBeforeSize [nothing]

    When I click on a row with no item in it,
    You raise I receive
    ItemSelect [nothing]
    MouseUp MouseUp

    When I left double-click on a row with no item in it,
    You raise I receive
    DblClick DblClick
    MouseUp MouseUp

    I'm fairly sure there is something in my ancient code that is still causing trouble, because I've made an ultimately simple test bed that has a UserControl with your ListView in it that's used on a simple VB6 form, and I get most of the missing Events there. [However, there are other problems --when I add ColumnHeaders, they aren't visible.

    Obviously, I'm not asking for you to debug my code, I just hope these symptoms may suggest something...

    Thanks for any help you can give.

  18. #58
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by RichInSoquel View Post
    But is there a reason I can't embed your ListView implementation in a VB6 UserControl? ... I'm calling

    . . .

    in my UserControl_Initialize.
    Quote Originally Posted by RichInSoquel View Post
    ... and added your suggested code into my UserControl. ... None are received by my UserControl after that.

    . . .

    ... I've made an ultimately simple test bed that has a UserControl with your ListView in it that's used on a simple VB6 form, ...
    Just so we're clear, are you saying that you have a User Control that has Krool's ListView User Control in it? That is, a User Control within another User Control?
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  19. #59
    New Member
    Join Date
    Jun 2013
    Posts
    8

    Re: CommonControls (Replacement of the MS common controls)

    Right. I'm trying to replace the old VB6 ListView with Krool's ListView inside a big File I/O UserControl I wrote about 10 years ago.

  20. #60

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

    Re: CommonControls (Replacement of the MS common controls)

    I think it is difficult to help you more without seeing the code in your UserControl.
    I have tested your scenario within a blank UserControl and everything seems to work.

  21. #61
    New Member
    Join Date
    Jun 2013
    Posts
    8

    Re: CommonControls (Replacement of the MS common controls)

    I'm working on stripping as much other stuff out of my UserControl as I can. Either I'll get to a place where it starts working, or I'll send you a reasonable-sized chunk that shows the problems. Thanks.

  22. #62
    New Member
    Join Date
    Jun 2013
    Posts
    8

    Re: CommonControls (Replacement of the MS common controls)

    Name:  ListView ItemClick.jpg
Views: 1792
Size:  73.5 KB

    I'm trying to come in from both sides. I have a very simple test bed (as you mention), and agree that everything works fine there. I'm several hours into cutting out other parts of the real case with no progress. I do see something I don't quite understand: In the attached screen shot, you can see that I added an On Error Resume Next and some debug.prints in your subclassed Window proc, and you can see the results in the Immediate window... After the line
    Code:
               RaiseEvent ItemClick(Me.ListItems(NMIA.iItem + 1), vbLeftButton)
    it looks like nothing is executed. Guess I don't really remember if On Error should work inside a subclassed WinProc... but obviously something is going wrong.

  23. #63
    New Member
    Join Date
    Jun 2013
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Hi I'm new here. I've just encountered the same mscomctl.ocx problem that others have been on about for a while. Eventually that brought me here (and what a wealth of useful information I must say).
    I'm sorry if I'm being monumentally thick, but I've downloaded the zip file, and compiled comctlsdemo into an exe. The thick bit ... how do I now get to use that in an existing project. I presume I need to include something to replace mscomctl.ocx.
    Thanks in advance (and sorry for introducing myself and flagging up my ignorance all at the same time).

  24. #64
    New Member
    Join Date
    Jun 2013
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Hi, I've recently encountered the mscomctl.ocx problem having just revisited an old VB6 project I need to upgrade.
    Eventually that brought me to this form - and a wealth of knowledge and useful info I must say.
    Sorry, but I'm being monumentally thick here, I've downloaded the zip file and compiled the project into an EXE. How do I now use that in my own project as a replacement for the common control that aren't working.
    Thanks in advance and apologies again for introducing myself with what is probably a very simple question.

  25. #65
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by dartguru View Post
    how do I now get to use that in an existing project. I presume I need to include something to replace mscomctl.ocx.
    Quote Originally Posted by dartguru View Post
    How do I now use that in my own project as a replacement for the common control that aren't working.
    Which specific common control(s) do you wish to use?
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  26. #66
    New Member
    Join Date
    Jun 2013
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Bonnie West View Post
    Which specific common control(s) do you wish to use?
    It looks like just lstView and ProgressBar1

  27. #67
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by dartguru View Post
    It looks like just lstView and ProgressBar1
    Copy/Move the following files and folders to a new folder:


    • [ListView]
    • [ProgressBar]
    • ComCtlsBase.bas
    • Common.bas
    • VisualStyles.bas
    • VTableHandle.bas
    • Enumeration.cls
    • ISubclass.cls
    • VTableSubclass.cls


    Finally, copy/move the OLEGuids.tlb file to the "Windows\System32\" directory and set a reference to it through the VB6 IDE's References dialog box.



    EDIT

    Of course, you'll have to import all of those files into your project (except for *.CTX files). The easiest way of doing that is to drag and drop them onto the Project Explorer window.
    Last edited by Bonnie West; Jun 28th, 2013 at 06:33 AM.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  28. #68
    New Member
    Join Date
    Jun 2013
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Thanks for the reply.
    I've included the .bas and .cls files into my project and the OLEGuids.tlb files into system32.

    (I've figured out how to register it now).
    Next problem is that I was expecting to be able to drag-n-drop lstView and ProgressBar1 object to my form(s) to replace the old ones.
    I think I'm just not understanding how these new controls work.
    Last edited by dartguru; Jun 28th, 2013 at 06:01 AM.

  29. #69
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by dartguru View Post
    Next problem is that I was expecting to be able to drag-n-drop lstView and ProgressBar1 object to my form(s) to replace the old ones.
    I think I'm just not understanding how these new controls work.
    To replace your old controls, copy their names first and then delete them from the Form. You should be able to see the new User Control's icons on the Toolbox. Add them to the Form either by double-clicking or clicking and drawing them on the Form. Rename them using the names of the old controls. Every property, method and event of the old controls should continue to work as they did before. If not, then post here the issues you've encountered.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  30. #70
    New Member
    Join Date
    Jun 2013
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    I see. I think I've got there now. I'd missed the need to drag the contents of the Builds/ListView and Builds/ProgressBar (excluding the CTX) into my project.
    The controls are now there and I've successfully replaced my old ones with them.
    I've also removed mscomctl.ocx so I've definitely replaced ALL instances of the old controls.

    > If not, then post here the issues you've encountered.

    When I try and compile, I get the following compilation errors using listView....

    The types ListItem and ColumnHeader do not exist for the ListView control
    The column alignment constants are missing for lvwColumnLeft, lvwColumnCenter and lvwColumnRight

    Also, when trying to save and exit the project, I hit the CreateSubclass debug.assert in VTableSubclass when trying to save the form with ListView on it.


    I have to say, if I can get over these errors, then this is a great replacement for mscomctl. krool should geta medal

  31. #71
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by dartguru View Post
    When I try and compile, I get the following compilation errors using listView....
    I think we should wait for Krool to show up since I'm not familiar with that part.

    Quote Originally Posted by dartguru View Post
    I have to say, if I can get over these errors, then this is a great replacement for mscomctl. krool should geta medal
    Indeed!
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  32. #72

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by dartguru View Post
    I see. I think I've got there now. I'd missed the need to drag the contents of the Builds/ListView and Builds/ProgressBar (excluding the CTX) into my project.
    You can also include the CTX file into your project. (It contains a custom toolbox bitmap for displaying a ListView symbol in the components tab)

    Quote Originally Posted by dartguru View Post
    The types ListItem and ColumnHeader do not exist for the ListView control
    The column alignment constants are missing for lvwColumnLeft, lvwColumnCenter and lvwColumnRight
    You have to make some renamings. For instance "Dim Test As ListItem" would then be "Dim Test As LvwListItem" or "Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)" would then be "Private Sub ListView1_ColumnClick(ByVal ColumnHeader As LvwColumnHeader)"

    The constants are also different. In your case you need to rename lvwColumnLeft, lvwColumnCenter and lvwColumnRight to LvwColumnHeaderAlignmentLeft, LvwColumnHeaderAlignmentRight and LvwColumnHeaderAlignmentCenter.

    Quote Originally Posted by dartguru View Post
    Also, when trying to save and exit the project, I hit the CreateSubclass debug.assert in VTableSubclass when trying to save the form with ListView on it.
    This always happens when the IDE crashed and is supposed to be.

  33. #73

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool nice to meet you, this is a very nice and large project, contains 33.760 lines of code. I have a tools for formatting VB6 code maybe worth for you thanks. http://www.vbforums.com/showthread.p...ode-Formatter)

  34. #74
    New Member
    Join Date
    Jun 2013
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    You can also include the CTX file into your project. (It contains a custom toolbox bitmap for displaying a ListView symbol in the components tab)



    You have to make some renamings. For instance "Dim Test As ListItem" would then be "Dim Test As LvwListItem" or "Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)" would then be "Private Sub ListView1_ColumnClick(ByVal ColumnHeader As LvwColumnHeader)"

    The constants are also different. In your case you need to rename lvwColumnLeft, lvwColumnCenter and lvwColumnRight to LvwColumnHeaderAlignmentLeft, LvwColumnHeaderAlignmentRight and LvwColumnHeaderAlignmentCenter.



    This always happens when the IDE crashed and is supposed to be.
    Thanks krool, I've made these changes and got everything compiling.

    (It wouldn't let me drag the ctx into the project though - not important)

    One final question, in debug mode I seem to hit this assert every time I run, and I have to close down VB and re-open the project to re-run in debug. Is that correct, and what would cause the IDE to crash?
    This is just me running my app in debug, and closing it down at the end. The only thing I can think is that I try to compact the attached database and this fails depending on what version of Access is in use, but I've got this trapped behind "on error goto"....

    On Error GoTo CompactDBFailure
    DBEngine.CompactDatabase sDBCopyName, gDataBaseLocation
    On Error GoTo 0

    Is there a problem is just commenting out the debug.assert line ?

  35. #75

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by dartguru View Post
    (It wouldn't let me drag the ctx into the project though - not important)
    Don't import it. Just copy it to the same folder as the ctl file than it should work.

    Quote Originally Posted by dartguru View Post
    One final question, in debug mode I seem to hit this assert every time I run, and I have to close down VB and re-open the project to re-run in debug. Is that correct, and what would cause the IDE to crash?
    Is this also happening in the demo project?

    Quote Originally Posted by dartguru View Post
    Is there a problem is just commenting out the debug.assert line ?
    If you comment it out then the IDE is immediatly crashed. Without leting have you a chance to still save the project. (it will fire the debug.assert again when saving, but it is saved)

  36. #76
    New Member
    Join Date
    Jun 2013
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Thanks krool.
    The assert is hit whenever I close after failing to compact the DB. If I remove the compaction code, it doesn't occur.
    It does not happen with the demo project.

  37. #77

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

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    OptionButtonW control is added. (Unicode)
    It can be combined with the intrinsic VB OptionButton.
    Last edited by Krool; Jul 14th, 2013 at 03:01 PM.

  38. #78
    Hyperactive Member
    Join Date
    Feb 2008
    Posts
    265

    Re: CommonControls (Replacement of the MS common controls)

    Superb work! You really should post this in the coding contest!
    Last edited by vibiEn; Jul 13th, 2013 at 08:30 AM.

  39. #79
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Update released.

    OptionButtonW control is added. (Unicode)
    It can be combined with the intrinsic VB OptionButton.
    Thank you for this release. OptionButton not enough options for multi-line text or wrap text by default if it is not included in the controller. Standard control VB can do

    Kroll, You can extend the functionality of ProgressBar?
    It would be nice if the progress bar for added display of progress on the taskbar. An example can be found here http://sourceforge.net/p/audica/code...skBarList3.cls

  40. #80
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Kroll, You can extend the functionality of ProgressBar?
    It would be nice if the progress bar for added display of progress on the taskbar. An example can be found here http://sourceforge.net/p/audica/code...skBarList3.cls
    See the DispInvokeDemo.zip linked here.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

Page 2 of 61 FirstFirst 123451252 ... 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