Page 19 of 94 FirstFirst ... 9161718192021222969 ... LastLast
Results 721 to 760 of 3726

Thread: CommonControls (Replacement of the MS common controls)

  1. #721
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: CommonControls (Replacement of the MS common controls)

    I am definitely a proponent of Github. I can't expound enough of how beneficial it is to legacy projects like this. Especially ones that are this valuable to the community. (this is an amazing code base Krool)

    It's quite a shame that CCRP didn't open their sources. (for similar reason's why the OCX's here are technically not open source)
    Last edited by DEXWERX; Jun 23rd, 2015 at 12:41 PM.

  2. #722
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Hi, Krool!
    Please see my project (https://github.com/ADIAProject/DIA), I can not understand in any of the components of the error. Or checkboxw from your kit or on the button that I use or scrollframe.
    On checkbox has a black frame, but not on all elements, but only those which do not start at the time of focus.
    Name:  b4CffYVj.jpg
Views: 2757
Size:  60.1 KB

    For programs require the driverspacks, you can download torrent here
    http://driveroff.net/sam/
    or here http://driverpacks.net/driverpacks/latest
    Last edited by Romeo91; Jun 23rd, 2015 at 12:51 PM.

  3. #723

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Included the network address validation functionality into the TextBoxW control.

    When the property 'NetAddressValidator' is set to true the TextBoxW control is internally a "msctls_netaddress" window and not a "Edit" window.

    Example of how to validate:

    Code:
    Private Sub Command1_Click()
    TextBoxW1.NetAddressType = TxtNetAddressTypeIPv6Address
    Dim ErrVal As Long
    On Error Resume Next
    TextBoxW1.ValidateNetAddress
    ErrVal = Err.Number
    On Error GoTo 0
    If ErrVal <> 0 Then
        TextBoxW1.ShowNetAddressErrorTip
        Exit Sub
    Else
        MsgBox "Success!", vbOKOnly, "Validation Results"
    End If
    End Sub
    The following point must be realized that "On Error Resume Next" on UserControls works:
    - In order to trap error raises via "On Error Goto ..." or "On Error Resume Next" it is necessary to have "Break on Unhandled Errors" selected instead of "Break in Class Module" on Tools -> Options... -> General -> Error Trapping.

  4. #724
    New Member
    Join Date
    Jun 2015
    Posts
    8

    Re: CommonControls (Replacement of the MS common controls)

    Please,
    Use a static code analyzer how:

    http://www.axtools.com/products-codesmart-vb6.php

    or

    http://www.mztools.com/v3/download.aspx

    Your code is terrible!

    Too many code Dead, function, variable, constants...

  5. #725
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    But it works well and gets rid of MS BS and their constantly inconsistent controls; a never ending MS MESS is now over...

  6. #726

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

  7. #727
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by pepegriyo View Post
    Please,
    Use a static code analyzer how:

    http://www.axtools.com/products-codesmart-vb6.php

    or

    http://www.mztools.com/v3/download.aspx

    Your code is terrible!

    Too many code Dead, function, variable, constants...
    Your comment is too rude and could hurt Krool who put tremendous effort for this great project. I believe there're more than thousands around the world using Krool's open source CommonControls.
    You can use FORMAT tools to format the alignment. Don't force us to use the tools.
    Last edited by Jonney; Jul 7th, 2015 at 08:24 PM.

  8. #728
    Addicted Member
    Join Date
    Mar 2009
    Posts
    244

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Jonney View Post
    Your comment is too rude and could hurt Krool who put tremendous effort for this great project. I believe there're more than thousands around the world using Krool's open source CommonControls.
    You can use FORMAT tools to format the alignment. Don't force us to use the tools.
    Yes, it's not quite nice for Krool who put in a lot of work in the excellent controls, but the tools pepegriyo is refering to are about removing/pinpointing dead/unused variables/code, and it's good practice to use it as in the end it also makes life easier for yourself.. So it's not about format alignement, it's about removing dead code.. Format alignement is something that is always in the eye of the beholder, what you think is a good format might be crap for others (for instance, I think aligning all variable declaraction makes the code more readable, but others think it's just a waste of time..

  9. #729
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by pepegriyo View Post
    Please,
    Use a static code analyzer how:

    http://www.axtools.com/products-codesmart-vb6.php

    or

    http://www.mztools.com/v3/download.aspx

    Your code is terrible!

    Too many code Dead, function, variable, constants...
    Even the best apps have these problems. Have you ever read the comments about the Doom source code by programmers who ported it to modern operating systems ? By all accounts its one huge mess but it changed the world still. As long as a program works well for the people using it, and its not too much of a hassle for the people maintaining it, this shouldn't really matter. Your concern about dead code and such only really matters when multiple developers are involved in its maintenance and these developers aren't the original creators who would have been aware of the quirks in the source code. In other words, its more of a concern for large open source projects that may be updated and maintained by hundreds of developers.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

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

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

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  10. #730
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: CommonControls (Replacement of the MS common controls)

    many lazy coders leave dead code in, as a sort of documentation, with references and placeholders for future work.
    It's not the best practice, but honestly - not worth most people's time to fix.

    If you don't like it - you can spend some time and clean it up yourself. That's the beauty of open source.


    I don't know that I've ever heard an experienced programmer complain about dead code....
    Last edited by DEXWERX; Jul 9th, 2015 at 08:14 AM.

  11. #731

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Fixed a critical and stupid bug in the CDDS_ITEMPREPAINT handler in the ListView control.
    Most likely impact for the bug was when using the 'Tile' view.

  12. #732
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    control replacement changes and below is list of screen explored and changed basically for “Comctl32.ocx” (TabStrip, Toolbar, Statusbar, Progressbar, Treeview, Listview, Imagelist, Slider). We are working on phase manner to have better control with replacing "ComCtl32.ocx" file as first phase, once done with it we will work on to replace the “Comdlg32.ocx”.


    Faced issues with below screens having Toolbar control with button click event. Commented currently as VBCCR11 doesn't have click event, we will revisit this once we found a solutions for this.

    • frmMainTaskBar.frm (Toolbar)
    o Private Sub ADVControl_ButtonClick(ByVal Button As VBCCR11.Button)


    We have replaced COMDLG32.ocx control with VBCCR11.CommonDialog in below screens list. Since there is no control available in VBCCR11 control list (screenshot A) had to explore on sample application to study the replacement working. Based on the analysis found that on declaring in the screen as “Dim CommonDialog1 As New VBCCR11.CommonDialog” it worked Ok. However VBCCR11.CommonDialog control doesn’t support few events/methods/properties as stated hence have commented them.
    • NumCopies = CommonDialog1.Copies
    • CommonDialog1.FontBold = txtFontType(Index).FontBold
    • CommonDialog1.FontItalic = txtFontType(Index).FontItalic
    • CommonDialog1.FontName = txtFontType(Index).FontName
    • CommonDialog1.FontSize = txtFontType(Index).FontSize

    On Monday we will look into different screens for our commented properties/events/methods and possible fixing.

  13. #733
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    Krool, can you help on the following???

    To update you,
    Explored for more replacement control for Toolbar, ListView, CommonDialog as some events/methods/properties are not supported by “VBCCR” (VB Common Control Replacement). Below are the few links we explored. Lately we found one “ctoolbar” control (screenshot A) but it too had 2 events viz.DragDrop and DragOver similar to “VBCCR” control toolbar.

    http://www.vbaccelerator.com/home/VB...ete_Source.asp
    http://btmtz.mvps.org/listview/
    http://www.freevbcode.com/ShowCode.asp?ID=5716
    https://groups.google.com/forum/#!to...pi/4zsGrOEDdgg

    Currently controls with below events/methods/properties are required in the “QMCAPFTProgram”.
    • VBCCR Toolbar has only DragDrop, DragOver but application needs Toolbar button click event.
    • VBCCR ListView has only DragDrop, DragOver, GotFocus, LostFocus but application needs Listview item click event.
    • VBCCR CommonDialog doesn’t support below property.
    o NumCopies = CommonDialog1.Copies
    o CommonDialog1.FontBold = txtFontType(Index).FontBold
    o CommonDialog1.FontItalic = txtFontType(Index).FontItalic
    o CommonDialog1.FontName = txtFontType(Index).FontName
    o CommonDialog1.FontSize = txtFontType(Index).FontSize

    In the absence of replacement controls fulfilling the above requirements please let us know how you want us to proceed.


    Thanks, Paul

  14. #734

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Paul@QMC.net View Post
    Currently controls with below events/methods/properties are required in the “QMCAPFTProgram”.
    • VBCCR Toolbar has only DragDrop, DragOver but application needs Toolbar button click event.
    • VBCCR ListView has only DragDrop, DragOver, GotFocus, LostFocus but application needs Listview item click event.
    • VBCCR CommonDialog doesn’t support below property.
    o NumCopies = CommonDialog1.Copies
    o CommonDialog1.FontBold = txtFontType(Index).FontBold
    o CommonDialog1.FontItalic = txtFontType(Index).FontItalic
    o CommonDialog1.FontName = txtFontType(Index).FontName
    o CommonDialog1.FontSize = txtFontType(Index).FontSize
    Something in your environment is not OK as the ToolBar has a button click event, the ListView has a item click Event...
    For the CommonDialog properties. Instead of ".FontBold" you should use ".Font.Bold". There is also no ".Copies" property in the CommonDialog class. The value can be retrieved and set via the "VB.Printer.Copies".

    Are the events for ToolBar and ListView available in the Demo project?

  15. #735
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    Thanks, we are checking the Demo project... Paul

  16. #736
    New Member
    Join Date
    Jul 2015
    Posts
    2

    Re: CommonControls (Replacement of the MS common controls)

    I believe the ListBoxW using style "1 - vbListBoxCheckbox" has a bug. When I set the selected state of an item in code, it is not rendering as checked in the UI. Furthermore, the selected state property of a checked item is not correctly returned as "True."

    Sample snippet:
    ListBoxW1.Selected(0) = True

    This does not result in the first item of a ListBoxW being selected. The same snippet works fine against a native VB6 ListBox.

    I cross referenced the common controls test harness and there are no ListBoxW controls with checkboxes used.
    Last edited by vb6rocks!; Jul 16th, 2015 at 08:05 AM.

  17. #737
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    Moving all projects to VB6, latest SP...

    • We will move to VB6 platform using same VBCCR11.ocx as it seems to give most event in VB6 than VB5 platform.

    • We will work to replace Microsoft comdlg32.ocx and comctl32.ocx with VBCCR11.ocx. For other controls we need to do some research.

    • If possible try to reach VB Programer and find his work on VB6.

    • As suggested by you in the below example of Treeview control we will have to explore on the proper replacement for events/properties/methods and passing values.
    ‘>>>>
    'Private Sub tvQMCProgram_NodeClick(ByVal Node As Node) - Old MS Mess w/Win XP to Win 10 and no-reason-whatsover MS BS Update just to cause complete chaos & stop all from working!
    Private Sub tvQMCProgram_NodeClick(MyName) - New Krool w/no issues in VB6, for all Win Platforms

    On Error Resume Next
    Dim vTmp As Variant

    'vTmp = Node.Key
    'MyName = vTmp 'MS BS

    vTmp = MyName 'Krool
    StatusLabel.Enabled = True
    ‘<<<<

    To update you,
    We downloaded and installed the given “ComCtlsDemo.rar.zip” in the virtual Pc with VB5 but on full compiling (Ctrl + F5) ComCtlsDemo gave screenshot A error. Explored on this error and as per screenshot B details this application points to be VB6 application. However continued with ComCtlsDemo application and commented the code highlighted in screenshot C for similar issue across various forms.
    This lead to screenshot D error “Missing: OLE Guid and interface definitions”. To fix this browsed to “ComCtlsDemo\OLEGuids” folder and picked “OLEGuids.tlb” which helped to fix the issue but started showing other issues like in screenshot E.

    Further
    • Setup a fresh virtual machine with VB6 and on it registered VBCCR11.OCX control. Created VB6- Test application, added Toolbar and Listview controls. In the screen code it displayed various events for both these controls (screenshot F).
    • Next installed VB5 on this virtual machine having VB6. Created VB5- Test application added Toolbar and Listview controls. In the screen code it displayed only few events for both these controls as shown in QMCAPFTProgram (screenshot G).
    • From this it seems VBCCR11.OCX –Toolbar and Listview are not fully compatible with VB5.

    Summary> Use VB6

    Or:

    In VB5 use,

    Private Sub Command1_Click()
    On Error Resume Next
    For I = 1 To tvQMCProgram.Nodes.Count + 1
    IsChecked = tvQMCProgram.Nodes(I).Selected
    MYOLDNAME = tvQMCProgram.Nodes(I).Text
    If IsChecked = True Then
    tvQMCProgram.Nodes(I).Selected = True
    MyName = tvQMCProgram.Nodes(I).Text
    Call tvQMCProgram_NodeClick(MyName)
    tvQMCProgram.Nodes(I).Selected = False
    tvQMCProgram.SingleSel = False
    End If
    Next I
    j = tvQMCProgram.Nodes.Count
    End Sub

    By adding Button Control w/Krools TreeView

    Thanks Krool, we are almost there,,, Paul

  18. #738

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Quote Originally Posted by vb6rocks! View Post
    I believe the ListBoxW using style "1 - vbListBoxCheckbox" has a bug. When I set the selected state of an item in code, it is not rendering as checked in the UI. Furthermore, the selected state property of a checked item is not correctly returned as "True."
    There was an embarrassing bug in the Selected property that it just did not work in a single selection ListBoxW. This has been fixed now.
    Also the "ItemClick" event will be fired when a change is resulted.

    I know that in the intrinsic ListBox the checked item is rendered within the Selected property and the "ItemClick" event is fired once again when effectively a item is checked.
    But in the ListBoxW control this has been changed as following: (Kind of break to MS ListBox)
    - The "ItemCheck" event is fired when an item is effectively checked. This is more clear that this is seperated to the "ItemClick".
    - When you want to change the checked state of an item by code then use the ItemChecked property and not the Selected property.

    @ Paul@QMC.net
    When using the Std-EXE method you need to have VB6.
    For the OCX method, as you noticed, you will not be happy with VB5.
    Last edited by Krool; Jul 16th, 2015 at 02:46 PM.

  19. #739
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    Thanks, all looks good for total withdrawal from MS. Paul

  20. #740
    New Member
    Join Date
    Jul 2015
    Posts
    5

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    Can you please provide me link to the latest download for VBCCR11.OCX control for VB6.

    Thanks

  21. #741
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: CommonControls (Replacement of the MS common controls)

    The download links are in the first post of this thread:
    http://www.vbforums.com/showthread.p...=1#post4277565

  22. #742
    New Member
    Join Date
    Jul 2015
    Posts
    2

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

    Quote Originally Posted by Krool View Post
    Update released.



    There was an embarrassing bug in the Selected property that it just did not work in a single selection ListBoxW. This has been fixed now.
    Also the "ItemClick" event will be fired when a change is resulted.

    I know that in the intrinsic ListBox the checked item is rendered within the Selected property and the "ItemClick" event is fired once again when effectively a item is checked.
    But in the ListBoxW control this has been changed as following: (Kind of break to MS ListBox)
    - The "ItemCheck" event is fired when an item is effectively checked. This is more clear that this is seperated to the "ItemClick".
    - When you want to change the checked state of an item by code then use the ItemChecked property and not the Selected property.

    @ Paul@QMC.net
    When using the Std-EXE method you need to have VB6.
    For the OCX method, as you noticed, you will not be happy with VB5.
    Thanks Krool! I'll download the latest version and give it a shot.

  23. #743
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    Re: CommonControls (Replacement of the MS common controls)

    in the List of revisions:
    31-May-2015
    - Included the ForeColor/Style/DownPicture/DisabledPicture/UseMaskColor/MaskColor/DrawMode property and OwnerDraw event in the CommandButtonW control.
    Sorry, but why cant I see those properties and event, I have revision 38

  24. #744

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by ishalom View Post
    Sorry, but why cant I see those properties and event, I have revision 38
    That update was released after VBCCR11.OCX was published. Only bugfixes are implemented into the VBCCR11.OCX as those revisions do not break compatibility. Either you use the Std-EXE Version or wait until VBCCR12.OCX will be published.

  25. #745
    New Member
    Join Date
    Jul 2015
    Posts
    5

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    We are using VBCCR11.ocx.
    Declaring object variable gives error. What is the alternative. Please suggest.

    Dim mnodEditNode As Node
    Dim itmX As ListItem
    Dim imgX As ListImage

  26. #746
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    Re: CommonControls (Replacement of the MS common controls)

    how do I set RightToLeft Property to the controls?
    You can't. The controls are same as the ambient RighToLeft property.
    It's not working, is it possible to add the RightToLeft on each control like VBs controls do have.

  27. #747

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by PankajMewada View Post
    We are using VBCCR11.ocx.
    Declaring object variable gives error. What is the alternative. Please suggest.

    Dim mnodEditNode As Node
    Dim itmX As ListItem
    Dim imgX As ListImage
    The object names are slightly different. The following should work:

    Dim mnodEditNode As TvwNode
    Dim itmX As LvwListItem
    Dim imgX As ImlListImage

  28. #748
    New Member
    Join Date
    Jul 2015
    Posts
    5

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,


    We replaced microsoft comctl32.ocx and comdlg32.ocx with VBCCR11.ocx in VB6 application. But noted the Toolbar was reset to default height and Toolbar buttons there in microsoft toolbar were missing now, the ImageList too was having images but after replacement it was empty.

    FYI: We have only changed references of control.

    Please let us know what steps we need to follow so the above control details remain as it is.


    Regards

  29. #749

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by PankajMewada View Post
    We replaced microsoft comctl32.ocx and comdlg32.ocx with VBCCR11.ocx in VB6 application. But noted the Toolbar was reset to default height and Toolbar buttons there in microsoft toolbar were missing now, the ImageList too was having images but after replacement it was empty.

    FYI: We have only changed references of control.

    Please let us know what steps we need to follow so the above control details remain as it is.
    You need to create them new from scratch, e.g. inserting again the images in the ImageList control.

    If somebody knows how to avoid this "issue" please let me know.

  30. #750
    Addicted Member
    Join Date
    Mar 2009
    Posts
    244

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    You need to create them new from scratch, e.g. inserting again the images in the ImageList control.

    If somebody knows how to avoid this "issue" please let me know.
    Change the link to the OCX control in the frm outside (the first line(s) in the frm when opened in a texteditor) the IDE before loading the project? I don't know if it will work in this case..

  31. #751

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    The ActiveX Control version 1.2 is now available.

  32. #752
    New Member
    Join Date
    Jul 2015
    Posts
    5

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    Please let us know the difference between ActiveX control VBCCR11.ocx and VBCCR12.ocx.

    Thank You,

  33. #753

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by PankajMewada View Post
    Please let us know the difference between ActiveX control VBCCR11.ocx and VBCCR12.ocx.
    Only bugfixes were implemented by the time into the VBCCR11.OCX and not any new functionality.
    The Std-EXE project is always up-to-date but the OCX project not. Only every half year or so there is a new version with all the added functionalities.

  34. #754
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    in ShowPrinterEx:

    VB.Printer.PrintQuality = DMODE.DMPrintQuality doesn't work.
    I see DMODE.DMPrintQuality =300 but .PrintQuality always maintains 600dpi.

    is the unit dpi or VB Constants?

    vbPRPQDraft
    vbPRPQlow
    vbPRPQMedium
    vbPRPQHigh
    Last edited by Jonney; Aug 5th, 2015 at 02:52 AM.

  35. #755

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Jonney View Post
    in ShowPrinterEx:

    VB.Printer.PrintQuality = DMODE.DMPrintQuality doesn't work.
    I see DMODE.DMPrintQuality =300 but .PrintQuality always maintains 600dpi.

    is the unit dpi or VB Constants?
    This seems to be a common issue.
    You can avoid this issue by not be dependent on the VB.Printer object.
    For instance you can include the flag 'CdlPDReturnDC' in the '.Flags' property of the CommonDialog class and use the '.hDC' property at return from the dialog box.

  36. #756
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    This seems to be a common issue.
    You can avoid this issue by not be dependent on the VB.Printer object.
    For instance you can include the flag 'CdlPDReturnDC' in the '.Flags' property of the CommonDialog class and use the '.hDC' property at return from the dialog box.
    Thank you sir, I got it.

  37. #757
    Fanatic Member
    Join Date
    Apr 2015
    Location
    Finland
    Posts
    679

    Re: CommonControls (Replacement of the MS common controls)

    Thank you Krool. Excellent replacement controls. However - quickly looked contols properties and found out, that from DTPicker and Monthview controls - Week property is missing.

    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx
    •The Week property returns the number of the week containing the selected date.
    Same applies to Monthview control also.
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx

    So at least these does not function as 'drop in' replacement/substitutes for the MS DTPicker or Monthview controls.

  38. #758

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Tech99 View Post
    Thank you Krool. Excellent replacement controls. However - quickly looked contols properties and found out, that from DTPicker and Monthview controls - Week property is missing.

    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx


    Same applies to Monthview control also.
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx

    So at least these does not function as 'drop in' replacement/substitutes for the MS DTPicker or Monthview controls.
    Thanks for this info. Just want to mention that the MS DTPicker (for VB6) do not have a 'Week' property. Only the MS MonthView control has.
    Last edited by Krool; Aug 14th, 2015 at 03:43 PM.

  39. #759
    Fanatic Member
    Join Date
    Apr 2015
    Location
    Finland
    Posts
    679

    Re: CommonControls (Replacement of the MS common controls)

    Name:  DTPicker - Week number bug.jpg
Views: 1938
Size:  41.8 KB
    Quote Originally Posted by Krool View Post
    Just want to mention that the MS DTPicker (for VB6) do not have a 'Week' property.
    Yes, so it seems, despite of MS online documentation.
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx

    Fiddled with some calendar dates. There is a bug in week numbering display (week 53 vs. 1) also, altought this is corect in MS component.

    fex. 29/12/2003 is week 1 not 53.
    Attachment in left is MS common control-2 SP6 version MSCOMCT2.OCX and in right replacement control.
    Last edited by Tech99; Aug 14th, 2015 at 04:13 PM.

  40. #760

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Tech99 View Post
    Name:  DTPicker - Week number bug.jpg
Views: 1938
Size:  41.8 KB

    Yes, so it seems, despite of MS online documentation.
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx

    Fiddled with some calendar dates. There is a bug in week numbering display (week 53 vs. 1) also, altought this is corect in MS component.

    fex. 29/12/2003 is week 1 not 53.
    Attachment in left is MS common control-2 SP6 version MSCOMCT2.OCX and in right replacement control.
    Update released.

    Included the Week property in the MonthView control.
    Also the workaround for bug in the DatePart function is implemented as the MS MonthView does also.
    Though I let it allow to set a Week 53 in the Property Let procedure as the MS MonthView allows also.
    Another point is that the MS MonthView calculates the week based on the system setting and not based on the start of week setting set for the control. This is weird. So I decided to always base on the start of week setting set to the control.

    Also did some internal improvements in the DTPicker and MonthView control concerning the Year/Month/Day and Hour/Minute/Seconds property.

    Thanks for your help.

Page 19 of 94 FirstFirst ... 9161718192021222969 ... 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
  •  



Click Here to Expand Forum to Full Width