Page 85 of 86 FirstFirst ... 35758283848586 LastLast
Results 3,361 to 3,400 of 3416

Thread: CommonControls (Replacement of the MS common controls)

  1. #3361
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,067

    Re: CommonControls (Replacement of the MS common controls)

    Some bugs with the DTPicker:

    1) The CheckBox of the DTPicker control appears too big at 120 DPI:


    Name:  DTPicker_CheckBox.png
Views: 846
Size:  9.3 KB

    The other controls are from your control set too, and they display the checkbox properly.


    2) The default date is not the current date.
    In my user locale I have this setting: "d/m/yyyy", today it is 23/3/2022 (March 23 of 2022) and the control displays "3/ 1/2022" (January 3 of 2022)

    Thanks for your work. It is becoming the default control set to use (specially for globalized programs UI, since that needs Unicode support).

  2. #3362
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,067

    Re: CommonControls (Replacement of the MS common controls)

    In the CommonDialog object, the ShowFolderBrowser method does not show the new folder button, and there is a flag, but only to hide the button: CdlBIFNoNewFolderButton.

  3. #3363
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,067

    Re: CommonControls (Replacement of the MS common controls)

    I'm using your component more and more, so I hope you don't mind if I keep reporting bugs and making suggestions.

    For having full Unicode replacement, I see that the Kill Statement should be also replaced.

    Code:
    Private Declare Function DeleteFileW Lib "kernel32.dll" (ByVal lpFileName As Long) As Long
    
    ' (VB-Overwrite)
    Public Sub Kill(ByVal sFileName As String)
        If DeleteFileW(StrPtr(sFileName)) = 0 Then
            Err.Raise 70
        End If
    End Sub

  4. #3364
    New Member
    Join Date
    Jun 2021
    Location
    Germany
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    Hello Krool,
    I am getting error 35773 with the DTPicker when trying to enter time in 24 hour format.
    How can I resolve this?
    Thank you!

    Edit:
    Ok, I found out what is happening.
    The DTP was set to use DataFormat "Time"
    I was setting the DTP value to TimeSerial(), but I didn't take into consideration, that TimeSerial also returns a default date of 31-12-1899, and the MinDate property wasn't set to at least that (which may be another problem - Errors out if set less)

    Otherwise, for me, it works now.

    Edit again:
    I thought it was working, but the DTP MinDate property doesn't accept a date less than 31-12-1900.
    Last edited by clintc; Mar 31st, 2022 at 05:16 AM.

  5. #3365
    Addicted Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    230

    TextBox Validate Event bug

    VB6SP6, Win7, VBCCR 1.7.37

    hi Krool,

    i found an annoying bug using the textbox control inside a picture control:

    1. The textbox has the focus with the cursor.
    2. now i click on the picture control (parent)
    3. The validate event of the textbox is not triggered...

    If i use TAB or click on another textbox on the form the validate event of the textbox is triggered!

    BTW: The VB-textbox in a picture control still triggers the validate event when i click on the picturebox!

    Any ideas how to fix this?

    Name:  Screenshot - 13.04.2022 , 08_25_25.png
Views: 722
Size:  3.4 KB

  6. #3366

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

    Re: TextBox Validate Event bug

    Quote Originally Posted by Mith View Post
    VB6SP6, Win7, VBCCR 1.7.37

    hi Krool,

    i found an annoying bug using the textbox control inside a picture control:

    1. The textbox has the focus with the cursor.
    2. now i click on the picture control (parent)
    3. The validate event of the textbox is not triggered...

    If i use TAB or click on another textbox on the form the validate event of the textbox is triggered!

    BTW: The VB-textbox in a picture control still triggers the validate event when i click on the picturebox!

    Any ideas how to fix this?

    Name:  Screenshot - 13.04.2022 , 08_25_25.png
Views: 722
Size:  3.4 KB
    I can't replicate with the OCX or std-exe. Can you bundle a demo?

  7. #3367
    Addicted Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    230

    Re: TextBox Validate Event bug

    Quote Originally Posted by Krool View Post
    I can't replicate with the OCX or std-exe. Can you bundle a demo?
    Attached you will find my demo project.

    How to reproduce instructions:

    1. click inside the TextBoxW control
    2. now click on the picture control under the TextBoxW
    3. the validate event doesnt trigger and no msgbox will show up

    1. click inside the VB-TextBox control
    2. now click on the picture control under the VB-TextBox
    3. the validate event works and a msgbox will show up

    goofy:

    1. click inside the TextBoxW control
    2. now click inside the VB-TextBox control
    3. now the validate event works and a msgbox will show up!

    BTW:

    i tested this inside the IDE and with a compiled exe. both the same results. tested with win7x64.
    Attached Files Attached Files
    Last edited by Mith; Apr 13th, 2022 at 09:21 AM.

  8. #3368

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

    Re: CommonControls (Replacement of the MS common controls)

    Mith,
    it looks like a VB6 bug itself.

    When I place a new innocent UserControl on a PictureBox it has the same issue.

    Maybe others may comment on this VB6 bug. It should be a known issue somehow.

  9. #3369
    Addicted Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    it looks like a VB6 bug itself.
    When I place a new innocent UserControl on a PictureBox it has the same issue.
    Thanks for the information!
    In this case the use of the validate event is complete useless...
    I got some bug reports from users and never understood why!
    Now i understand it, because the validation code for the textbox content was never triggered!

  10. #3370
    Addicted Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Maybe others may comment on this VB6 bug. It should be a known issue somehow.
    i found an answer at StackOverflow

  11. #3371

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by clintc View Post
    Hello Krool,
    I am getting error 35773 with the DTPicker when trying to enter time in 24 hour format.
    How can I resolve this?
    Thank you!

    Edit:
    Ok, I found out what is happening.
    The DTP was set to use DataFormat "Time"
    I was setting the DTP value to TimeSerial(), but I didn't take into consideration, that TimeSerial also returns a default date of 31-12-1899, and the MinDate property wasn't set to at least that (which may be another problem - Errors out if set less)

    Otherwise, for me, it works now.

    Edit again:
    I thought it was working, but the DTP MinDate property doesn't accept a date less than 31-12-1900.
    The MinDate for DTP is 01-01-1900 and MaxDate is 31-12-9999.

    Quote Originally Posted by Eduardo- View Post
    Some bugs with the DTPicker:

    1) The CheckBox of the DTPicker control appears too big at 120 DPI:


    Name:  DTPicker_CheckBox.png
Views: 846
Size:  9.3 KB

    The other controls are from your control set too, and they display the checkbox properly.


    2) The default date is not the current date.
    In my user locale I have this setting: "d/m/yyyy", today it is 23/3/2022 (March 23 of 2022) and the control displays "3/ 1/2022" (January 3 of 2022)

    Thanks for your work. It is becoming the default control set to use (specially for globalized programs UI, since that needs Unicode support).
    1) I have no influence about the appearance on high DPI for the DTP.

    2) You may set the today's date at Form_Load.

  12. #3372
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,614

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    i found an answer at StackOverflow
    That is VB.Net code. If the problem is the same one you're having then it might not even be a VB6 problem but it is instead a Windows problem, specifically a problem with the Common Controls.
    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

  13. #3373
    New Member
    Join Date
    Mar 2020
    Posts
    7

    Re: CommonControls (Replacement of the MS common controls)

    Hi,
    I’ve got difficulties to print a RichTextBox on a printer.

    Code:
        Printer.CurrentX = 800
        Printer.CurrentY = 800
        Printer.Print "x"
        
        RichTextBox1.PrintDoc Printer.hDC, False, , 700, 700, 800, 800
        
        Printer.CurrentX = 900
        Printer.CurrentY = 900
        Printer.Print "y"
        
        Printer.EndDoc
    In this example, I would like to print ‘x’, ‘y’ and RichTextBox1 on the same page, but I always get ‘x’ and RichTextBox1 on one page and ‘y’ on another one.

    It is as if RichTextBox1.PrintDoc fires a Printer.EndDoc even if I set CallStartEndDoc to False.

    What am I doing wrong ?

  14. #3374
    New Member
    Join Date
    Jun 2020
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    i have encountered some situations where case sensitive entries for Treeview were required, since they contained different data, like registry and Registry having different registry keys. This works well with the microsoft control, but not with the CCR Treeview. I am using the std exe and somehow I managed to get a working case sensitive option in the property page and the control so I am happy for now. I don't know if it could be a useful addition for other people as well.

  15. #3375
    Lively Member
    Join Date
    Oct 2016
    Posts
    82

    Re: CommonControls (Replacement of the MS common controls)

    is it possible to have a toolbar button style to be TbrButtonStyleCheck and TbrButtonStyleDropDown

  16. #3376

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    is it possible to have a toolbar button style to be TbrButtonStyleCheck and TbrButtonStyleDropDown
    Unfortunately not. BTNS_CHECK and BTNS_DROPDOWN are not combinable.

  17. #3377
    Lively Member
    Join Date
    Oct 2016
    Posts
    82

    Re: CommonControls (Replacement of the MS common controls)

    is it possible to add images to Toolbar ButtonMenus

    BTW: Your Project is fantastic I use a a lot, Thank you

  18. #3378
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,477

    picbox > ImageList extract to dragIcon causes black square

    PROBLEM: I am populating a control's dragIcon from an MSCOMCTL imageList control but the resulting dragIcon is black when I use Krool's imageList. However, it all works fine with the MSCOMCTL imageList control.



    BACKGROUND:
    The source image is a PNG. The source image is written to a temporary picBox named picDragIcon using the picbox device context using GDI+, specifically, GdipDrawImageRectRectI. To accomplish this, I am using LaVolpe's C32dppDIP method to read PNGs into a VB6 picture control. In this case the picbox is merely a temporary holding control and I want to put that image into a dragIcon.


    First step, I use an MSCOMCTL imageList and add the image from the temporary picbox as the sole image in the imageList.

    Code:
        ImageList1.ListImages.Add , "arse", picDragIcon.Image
    I then extract that image from the imageList and set it to be the dragIcon for the target control.

    Code:
        picRdMap(Index).DragIcon = ImageList1.ListImages("arse").ExtractIcon
    As a result, the dragIcon shows perfectly. Why do I use an imageList? If I load the dragIcon directly from the temporary picBox as below:

    Code:
        picRdMap(Index).DragIcon = picDragIcon.Image ' this only works for .ico types
    Then the dragIcon shows nothing, nothing at all. I think it is due to the fact that the temporary image is rendered using GDI+ or only handles .ico types. That is why I use the MSCOMCTL imageList as it somehow seems to convert the GDI+ rendered image on the picBox correctly to something the .dragIcon can use. Some sort of bitmap, anyhow, it does the job.

    However, back to my problem. I want to use Krool's version of the imageList control. I prefer to use Krool's imageList as I have so far avoided using any control from MSCOMCTL instead using all of Krool's alternatives.



    If I substitute Krool's imagelist the dragicon is a black square. Any ideas? I suspect this is because Krool's control is not expecting a transparent image in a standard picturebox. Any guidance would be useful.
    Last edited by yereverluvinuncleber; May 29th, 2022 at 06:37 AM. Reason: Managed to add some screenshots
    By the power invested in me, all the threads I start are Niya and Olaf free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  19. #3379
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,614

    Re: CommonControls (Replacement of the MS common controls)

    My guess is that Krool's ImageList isn't converting converting the HBITMAP to an HICON properly for this specific image. Have you tried writing your own conversion?
    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

  20. #3380
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,477

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Niya View Post
    My guess is that Krool's ImageList isn't converting converting the HBITMAP to an HICON properly for this specific image. Have you tried writing your own conversion?
    I was hoping not to have to, hoping that the Krool version would simply provide the same conversion. I may have to do so though.

    For the moment though I will stick with the MSCOMCTL version as it works. We'll just have to see if this is a bug in Krool's own imageList or missing functionality.
    By the power invested in me, all the threads I start are Niya and Olaf free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  21. #3381
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,614

    Re: CommonControls (Replacement of the MS common controls)

    Ah ok. Fair enough.
    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

  22. #3382

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

    Re: picbox > ImageList extract to dragIcon causes black square

    Quote Originally Posted by yereverluvinuncleber View Post
    PROBLEM: I am populating a control's dragIcon from an MSCOMCTL imageList control but the resulting dragIcon is black when I use Krool's imageList. However, it all works fine with the MSCOMCTL imageList control.



    BACKGROUND:
    The source image is a PNG. The source image is written to a temporary picBox named picDragIcon using the picbox device context using GDI+, specifically, GdipDrawImageRectRectI. To accomplish this, I am using LaVolpe's C32dppDIP method to read PNGs into a VB6 picture control. In this case the picbox is merely a temporary holding control and I want to put that image into a dragIcon.


    First step, I use an MSCOMCTL imageList and add the image from the temporary picbox as the sole image in the imageList.

    Code:
        ImageList1.ListImages.Add , "arse", picDragIcon.Image
    I then extract that image from the imageList and set it to be the dragIcon for the target control.

    Code:
        picRdMap(Index).DragIcon = ImageList1.ListImages("arse").ExtractIcon
    As a result, the dragIcon shows perfectly. Why do I use an imageList? If I load the dragIcon directly from the temporary picBox as below:

    Code:
        picRdMap(Index).DragIcon = picDragIcon.Image ' this only works for .ico types
    Then the dragIcon shows nothing, nothing at all. I think it is due to the fact that the temporary image is rendered using GDI+ or only handles .ico types. That is why I use the MSCOMCTL imageList as it somehow seems to convert the GDI+ rendered image on the picBox correctly to something the .dragIcon can use. Some sort of bitmap, anyhow, it does the job.

    However, back to my problem. I want to use Krool's version of the imageList control. I prefer to use Krool's imageList as I have so far avoided using any control from MSCOMCTL instead using all of Krool's alternatives.



    If I substitute Krool's imagelist the dragicon is a black square. Any ideas? I suspect this is because Krool's control is not expecting a transparent image in a standard picturebox. Any guidance would be useful.
    Thanks for the report. I just want to test something.

    Instead of
    Code:
    ImageList1.ListImages.Add , "arse", picDragIcon.Image
    can you test following ?
    Code:
    Set picDragIcon.Picture = picDragIcon.Image
    ImageList1.ListImages.Add , "arse", picDragIcon.Picture
    If that works (if you confirm) the bugfix in the ImageList would be (in order to get your initial code to work)
    Code:
    Friend Sub FListImagesAdd(Optional ByVal Index As Long, Optional ByVal Picture As IPictureDisp)
    ...
        Set UserControl.Picture = Picture
        Set Picture = UserControl.Picture
        Set UserControl.Picture = Nothing
    ...

  23. #3383
    Junior Member
    Join Date
    Mar 2020
    Location
    Germany (BW)
    Posts
    25

    Re: CommonControls (Replacement of the MS common controls)

    Hello, Krool!

    I'm trying to work with the richtext control from the replacement of the common controls, latest version.
    It seems to be impossible to set the right margin so that it reflects the textwidth of a line, e.g. a right margin of 500 units should lead to a textwidth of 500 units (no left margin set), regardless of the width of the control.
    But any positive value of a right margin leads to constant space between the control's right edge and the text, wrapping the text (according to the scrollbars setting).
    How do I set a right margin to reflect the textwidth?

    Regards, Seniorchef

  24. #3384
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,477

    Re: CommonControls (Replacement of the MS common controls)

    Krool, your workaround of using set with .picture works. The resulting image is not exactly the same but it will certainly do.

    With your control the .dragIcon becomes a white box surrounding the original image, which is different but perfectly acceptable for what I want to do



    The MS imageList in comparison creates a dragIcon with a transparent background in BOTH cases. I suppose (as Niya suggests) that the MS version is converting it to an HIcon.

    Sorry to give you more work. At least this means I can continue to avoid using MSCOMCTL except for testing.
    By the power invested in me, all the threads I start are Niya and Olaf free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  25. #3385

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by yereverluvinuncleber View Post
    Krool, your workaround of using set with .picture works. The resulting image is not exactly the same but it will certainly do.

    With your control the .dragIcon becomes a white box surrounding the original image, which is different but perfectly acceptable for what I want to do



    The MS imageList in comparison creates a dragIcon with a transparent background in BOTH cases. I suppose (as Niya suggests) that the MS version is converting it to an HIcon.

    Sorry to give you more work. At least this means I can continue to avoid using MSCOMCTL except for testing.
    You could try setting the UseMaskColor to true and set the MaskColor accordingly. (You need to check the exact RGB, probably it's only vbWhite value)

    EDIT: gonna update the fix with the UserControl.Picture and Picture object swap. (to allow passing an .Image picture object)
    Last edited by Krool; May 30th, 2022 at 08:31 AM.

  26. #3386
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,477

    Re: CommonControls (Replacement of the MS common controls)

    I'll leave it as it is at the moment, setting the mask colour to white does the job of making the dragIcon transparent but it has side effects - other unrelated controls on the form suddenly have their mask turned off revealing the black portions of all their transparencies.



    To get around this I tried enabling and disabling the use of the mask just prior to the vbBeginDrag,

    ImageList1.UseMaskColor = True

    - then disabling it when the vbEndDrag has done its job, it seems that UseMaskColor is not a property that can be easily be enabled at the correct points at runtime.

    For the moment the white box is a usable workaround. I'll wait for any bugfix and test for you. No hurry, I have a workaround!
    By the power invested in me, all the threads I start are Niya and Olaf free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  27. #3387

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by yereverluvinuncleber View Post
    I'll leave it as it is at the moment, setting the mask colour to white does the job of making the dragIcon transparent but it has side effects - other unrelated controls on the form suddenly have their mask turned off revealing the black portions of all their transparencies.



    To get around this I tried enabling and disabling the use of the mask just prior to the vbBeginDrag,

    ImageList1.UseMaskColor = True

    - then disabling it when the vbEndDrag has done its job, it seems that UseMaskColor is not a property that can be easily be enabled at the correct points at runtime.

    For the moment the white box is a usable workaround. I'll wait for any bugfix and test for you. No hurry, I have a workaround!
    The fix is released.

    You only need the MaskColor "active" during the .Add to the ImageList. So you can turn it on before, add picture to the ImageList, then turn off in the next code line.

    Btw, UseMaskColor property is True by default. The MaskColor default is &HC0C0C0.

  28. #3388
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,477

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    The fix is released.

    You only need the MaskColor "active" during the .Add to the ImageList. So you can turn it on before, add picture to the ImageList, then turn off in the next code line.

    Btw, UseMaskColor property is True by default. The MaskColor default is &HC0C0C0.
    understood and thanks!
    By the power invested in me, all the threads I start are Niya and Olaf free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  29. #3389
    Junior Member
    Join Date
    Mar 2020
    Location
    Germany (BW)
    Posts
    25

    Re: CommonControls (Replacement of the MS common controls)

    Okay, here I am again.
    My issue about the richtext-control still is unanswered.
    No hints, no solutions, no questions?
    Anyone out there who uses the richtextbox and margins?
    Maybe I'm using the wrong documentation, but what is the right one?
    Thank's

  30. #3390

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Seniorchef View Post
    Okay, here I am again.
    My issue about the richtext-control still is unanswered.
    No hints, no solutions, no questions?
    Anyone out there who uses the richtextbox and margins?
    Maybe I'm using the wrong documentation, but what is the right one?
    Thank's
    I hate this printer margin topic on the richtextbox. It was an issue already several times and I thought now it's properly done.
    So, do you have a sample demo which shows the different outcomes between MS richttextbox and VBCCR richtextbox ?
    Because as of now I would first suspect a mis-use in your code and not in the routine inside the richtextbox, but I could be wrong of course.

  31. #3391
    Junior Member
    Join Date
    Mar 2020
    Location
    Germany (BW)
    Posts
    25

    Re: CommonControls (Replacement of the MS common controls)

    Hello, Krool!

    I never mentioned a printer output.

    For The sample, you need a form with a MSRichtext-control and a VBCCR-Richtext control with not extra settings.

    Code:
    Private Sub Form_Load()
       With msRtf
          .RightMargin = 2500
          .Text = "This is a sample text in the richtext control with a right margin on "
       End With
       
       With vbRtf
          .RightMargin = 2500
          .Text = "This is a sample text in the richtext control with a right margin on "
       End With
    End Sub
    
    Private Sub Form_Resize()
       msRtf.Move 30, 30, ScaleWidth, ScaleHeight / 2
       vbRtf.Move 30, ScaleHeight / 2 + 30, ScaleWidth, ScaleHeight / 2
       vbRtf.Refresh
       msRtf.Refresh
    End Sub
    Drag the window to change the width and you see the difference: the msRichtext keeps the text unchanged while the vbcontrol doesn't. The RightMargin in the MSRtf is independant from the width of the control. That's all.

    My App shows text in forms that can be formatted by the user, for which purpose ever. The formatting of paragraphs should stay even after resizing the window.

    Regards

  32. #3392

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Seniorchef View Post
    Hello, Krool!

    I never mentioned a printer output.

    For The sample, you need a form with a MSRichtext-control and a VBCCR-Richtext control with not extra settings.

    Code:
    Private Sub Form_Load()
       With msRtf
          .RightMargin = 2500
          .Text = "This is a sample text in the richtext control with a right margin on "
       End With
       
       With vbRtf
          .RightMargin = 2500
          .Text = "This is a sample text in the richtext control with a right margin on "
       End With
    End Sub
    
    Private Sub Form_Resize()
       msRtf.Move 30, 30, ScaleWidth, ScaleHeight / 2
       vbRtf.Move 30, ScaleHeight / 2 + 30, ScaleWidth, ScaleHeight / 2
       vbRtf.Refresh
       msRtf.Refresh
    End Sub
    Drag the window to change the width and you see the difference: the msRichtext keeps the text unchanged while the vbcontrol doesn't. The RightMargin in the MSRtf is independant from the width of the control. That's all.

    My App shows text in forms that can be formatted by the user, for which purpose ever. The formatting of paragraphs should stay even after resizing the window.

    Regards
    I see your point. I guess that's a behavior change in the underlying richedit library. The msRichTextBox uses richedit v1.0.

  33. #3393
    Junior Member
    Join Date
    Mar 2020
    Location
    Germany (BW)
    Posts
    25

    Re: CommonControls (Replacement of the MS common controls)

    Ok - so I guess i will live with it.
    Maybe I'll write a workaround in my code.
    And again, thank you, Krool.
    Last edited by Seniorchef; Jun 9th, 2022 at 12:58 AM.

  34. #3394
    New Member
    Join Date
    Jun 2021
    Location
    Germany
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    Hallo Krool,

    https://www.vbforums.com/showthread....=1#post5563715

    The MinDate for DTP is 01-01-1900 and MaxDate is 31-12-9999.
    So, this is not possible:
    Code:
    DTPicker.Value = TimeValue("07:00")

  35. #3395
    Addicted Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    230

    VBCCR not work anymore after upgrading to 1.7.38

    VB6, Win7x64

    I upgraded VBCCR 1.7.37 to VBCCR 1.7.38. and now i get the error message "object library not registered" when i open a VB6 project that is using the ocx.

    I get the same error message when i create a complete new project at the VB6-IDE and add the VBCCR17-OCX. I can add the older VBCCR16-OCX or other OCX-files without any errors.

    I tried to switch back to VBCCR 1.7.37 but it doesnt help; the error message "object library not registered" still pops up.

    I tried to unregister and re-register but nothing helps.

    The vb-projects-exe-files compilied with v1.7.37 are running fine with the new VBCCR 1.7.38 OCX!

    But i cant open and use any of my vb-projects anymore

    Im lost and need some help...
    Last edited by Mith; Jun 9th, 2022 at 07:57 PM.

  36. #3396
    Addicted Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    230

    Lightbulb Re: VBCCR not work anymore after upgrading to 1.7.38

    i found a solution for the "object library not registered" problem:

    Code:
    cd C:\Windows\SysWOW64
    regtlib msdatsrc.tlb
    All vb6-projects using VBCCR17 can be loaded without the error message again!

  37. #3397
    PowerPoster
    Join Date
    Jun 2013
    Posts
    6,049

    Re: VBCCR not work anymore after upgrading to 1.7.38

    Quote Originally Posted by Mith View Post
    i found a solution for the "object library not registered" problem:

    Code:
    cd C:\Windows\SysWOW64
    regtlib msdatsrc.tlb
    All vb6-projects using VBCCR17 can be loaded without the error message again!
    @Krool...

    I think you should look into that (since it would break also the "regfree-mode" via manifests)...

    IMO, somewhere you're probably exposing a type from msdatsrc.tlb on the OCX'es Public Interface...

    Olaf

  38. #3398

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

    Re: VBCCR not work anymore after upgrading to 1.7.38

    Quote Originally Posted by Schmidt View Post
    @Krool...

    I think you should look into that (since it would break also the "regfree-mode" via manifests)...

    IMO, somewhere you're probably exposing a type from msdatsrc.tlb on the OCX'es Public Interface...

    Olaf
    Thanks for your comment.
    I'm not willingly exposing it. I assume it's automagically due to DataBindingBehavior set to 1 - vbSimpleBound on some controls..

  39. #3399
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    143

    Re: CommonControls (Replacement of the MS common controls)

    Dear Krool,

    Warm Greetings! Happy to be writing to you again, after quite some period of time, and getting the opportunity thus to thank you once again, profoundly, for your monumental efforts.

    In this post, I have attached a small project, a test app ("1. Scrollbar issues in Richtextbox.zip") to highlight two issues with scrollbars which I encountered while using the RichTextBox control.

    A screenshot of the test app below, just after starting it.
    Name:  Test App 1 - Scrollbar issues in RichTextBox - Issue No.1.png
Views: 88
Size:  15.2 KB

    A screenshot of the test app below, after clicking the two buttons in it, one after the other.
    Name:  Test App 1 - Scrollbar issues in RichTextBox - Issue No.2.png
Views: 87
Size:  15.1 KB

    Note-1: Please do read the comments in my code, wherever they appear. Those comments are very important, as far as this 'test app' is concerned.

    Note-2
    : The scrollbars do reappear correctly in rtb1 and rtb2 once I start scrolling the texts in them.

    Note-3: In case the scrollbars do appear correctly only, at your end, always, then kindly bear with me and kindly let me know what could be the mistake I am doing at my end which makes the scrollbars disappear or get painted incompletely.

    Note-4:
    My vb6 IDE is themed. My OS is Windows10, 64-bit. Screen resolution is 1920*1080. Under 'Scale and Layout' in Display settings, it shows '100% (Recommended)'.

    Note-5: If the above-explained issues do occur at your end too, but if they are not due to your control, then kindly let me know as to what I should do further. As of now, my own workarounds which I have mentioned (in the test app) do help solve the scrollbar issues in my projects. But then, for each RichTextBox, I need to necessarily have these workarounds.

    Note-6: This is the 2nd time ever (and the first time ever, in this thread) that I am posting a project. So, if any mistake on my part in the way I have presented my project, kindly bear with me.

    Kind regards.
    Attached Files Attached Files
    Last edited by softv; Jun 12th, 2022 at 11:33 AM.

  40. #3400
    Addicted Member
    Join Date
    Feb 2014
    Posts
    254

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    I have been away from programming for a few years and am now back. First thing I look at is your controls and of course download the latest version. I have two computers Win 10 Pro 21H2 and since I am having this problem on only one, I know the problem is at my end. I have try for a few days but no luck so maybe I try asking here.

    I am getting this error (screenshot) when I tried to open any of the Forms in the Std-Exe demo. Also has this error when I try to run the demo. Any idea where I should be looking?

    Thank you.
    Attached Images Attached Images   
    Last edited by chosk; Jun 12th, 2022 at 04:38 AM.

Page 85 of 86 FirstFirst ... 35758283848586 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