Page 87 of 94 FirstFirst ... 377784858687888990 ... LastLast
Results 3,441 to 3,480 of 3726

Thread: CommonControls (Replacement of the MS common controls)

  1. #3441

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    Are there any functions I could use for the image processing in VBCCR?
    Or another idea which is not a large additional library?
    No.

    ---

    Btw(!), just noticed that DrawState API in the StatusBar crashes when the StrPtr() of the Text property is 0. I guess that's due to a recent MS update..
    Will make a fix for that soon.

    EDIT: Bugfix done.
    Last edited by Krool; Aug 30th, 2022 at 11:45 AM.

  2. #3442
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    Here's the DLL and PNG stuff.
    It is quite old and probably there are more elegant solutions.
    Also it is a adjusted to my needs.

    Attachment 180641

    I think #3089 is answered when you inspect the libs.
    in the Module m_PNG_Resource there is a call to a function Resize, (it is called from a procedure ResDLLToPicture ).

    i can not find this function in the code you attached could you be so kind and send it to me.

  3. #3443
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    in the Module m_PNG_Resource there is a call to a function Resize, (it is called from a procedure ResDLLToPicture ).

    i can not find this function in the code you attached could you be so kind and send it to me.
    Here:
    m_GDIPlusResize.zip

  4. #3444
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    from (Toolbar index problem)

    Quote Originally Posted by Krool View Post
    I understand.. However, the "solution" is not easy.
    No solution needed.
    I decided for a DisabledImagelist with the same count and order as the Imagelist.

    ---

    I didn't compare the behavior to CC5; most probably the problem is the same.
    Last edited by Karl77; Sep 1st, 2022 at 06:22 AM.

  5. #3445

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    from (Toolbar index problem)



    No solution needed.
    I decided for a DisabledImagelist with the same count and order as the Imagelist.

    ---

    I didn't compare the behavior to CC5; most probably the problem is the same.
    Yes the MSCOMCTL.OCX behavior is the same for the ToolBar.

    So, yes. I keep everything like it is. Adding a "DisabledImage", "HotImage" property in a Button object would complicate everything and might be confusion due to the back-compat thing of the "fallback" to "Image" property.

  6. #3446
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    2 RICHTEXTBOX PROBLEMS

    1)
    VBCCR17 OCX and EXE:
    Make a new project and place a RichTextBox1 on the form.

    RightToLeftMode = 0
    RightToLeft = True

    Run.

    In here the whole RichTextBox1 renders black.


    2)
    I use an older version of the VBCCR RichTextBox.
    The black background issue is not in it.

    Question:
    What should I do to add some spaces to the text?
    When I put them after the \cf4, they do not appear.
    Surprisingly the spaces are found before the text 'Boing'.
    Other characters like . do work and appear at the end.
    For now I begin with the spaces - they appear at the end (m1 in the example).
    Not a good 'fix'.


    Code:
    Dim m          As String
    Dim m1          As String
    Dim m2          As String
    
    Dim SomeSpaces As String
    SomeSpaces = "    " '5 spaces
    
    
    'spaces are after the text
    m1 = "{\rtf1 " & _
       "{\colortbl ;\red227\green38\blue33;\red0\green128\blue0;\red51\green51\blue204;\red0\green0\blue0;}" & _
       "\cf1" & _
       SomeSpaces & _
       "Boing \cf2Bum \cf3Tschak\cf4 "
    
    'spaces are before the text
    m2 = "{\rtf1 " & _
       "{\colortbl ;\red227\green38\blue33;\red0\green128\blue0;\red51\green51\blue204;\red0\green0\blue0;}" & _
       "\cf1Boing \cf2Bum \cf3Tschak \cf4 " & _
       SomeSpaces
    
    m = m1 'or m2
    
    RichTextBox1.TextRTF = m

    I can't compare with Richtx32.ocx, it doesn't have RTL.
    Last edited by Karl77; Sep 10th, 2022 at 07:15 AM.

  7. #3447
    Fanatic Member
    Join Date
    Oct 2005
    Posts
    558

    Re: CommonControls (Replacement of the MS common controls)

    Just a head's up. The demo for this project still doesn't run (as I reported in 2017). The .tbl files are included in a sub folder but they aren't registered so the reference to them fails and the demo dies at that point. If there was a readme included that explained how to register a TBL file, it could go a long way towards fixing this. Sadly, if the demo doesn't run, most people will quickly bail. Which is a real shame. This is an incredible project and it deserves to be seen and shared and used. But as I say... with a non-functional demo, it will be only used by a handful of people who can get it working.

    That said, you can download the compiled OCX from a different thread. Most people should know how to register an OCX even without a readme and it works fine. Thanks for sharing this project and all the hard work that has gone into it.
    Last edited by Darkbob; Sep 10th, 2022 at 08:43 AM.

  8. #3448
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,647

    Re: CommonControls (Replacement of the MS common controls)

    I have no problem getting the demo project to run.

    TLB files (assuming that's what you mean) get registered when you add them or open a project referencing them. You might run into trouble if you have a previous version registered and the path no longer exists. In that case the new version wouldn't register. You'd have to use the old path for the tlb, or recreate it (new version is fine), unregister, then delete it and open with the new path.

  9. #3449

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    2 RICHTEXTBOX PROBLEMS

    1)
    VBCCR17 OCX and EXE:
    Make a new project and place a RichTextBox1 on the form.

    RightToLeftMode = 0
    RightToLeft = True

    Run.

    In here the whole RichTextBox1 renders black.


    2)
    I use an older version of the VBCCR RichTextBox.
    The black background issue is not in it.

    Question:
    What should I do to add some spaces to the text?
    When I put them after the \cf4, they do not appear.
    Surprisingly the spaces are found before the text 'Boing'.
    Other characters like . do work and appear at the end.
    For now I begin with the spaces - they appear at the end (m1 in the example).
    Not a good 'fix'.


    Code:
    Dim m          As String
    Dim m1          As String
    Dim m2          As String
    
    Dim SomeSpaces As String
    SomeSpaces = "    " '5 spaces
    
    
    'spaces are after the text
    m1 = "{\rtf1 " & _
       "{\colortbl ;\red227\green38\blue33;\red0\green128\blue0;\red51\green51\blue204;\red0\green0\blue0;}" & _
       "\cf1" & _
       SomeSpaces & _
       "Boing \cf2Bum \cf3Tschak\cf4 "
    
    'spaces are before the text
    m2 = "{\rtf1 " & _
       "{\colortbl ;\red227\green38\blue33;\red0\green128\blue0;\red51\green51\blue204;\red0\green0\blue0;}" & _
       "\cf1Boing \cf2Bum \cf3Tschak \cf4 " & _
       SomeSpaces
    
    m = m1 'or m2
    
    RichTextBox1.TextRTF = m

    I can't compare with Richtx32.ocx, it doesn't have RTL.
    Update released. There was a tiny bug in the RightToLeft property which causes trouble if you set the two properties at design-time only..
    That's now fixed. Please confirm.

    The other question with the \cf4 I don't get..

  10. #3450
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Update released. There was a tiny bug in the RightToLeft property which causes trouble if you set the two properties at design-time only..
    That's now fixed. Please confirm.
    Tried in the EXE project and OCX.
    Blackness bug is gone.

    The other question with the \cf4 I don't get..
    Simplified example:

    Set a RichTextBox to RTL.
    Code:
    RichTextBox1.TextRTF = "{\rtf1Boing Bum Tschak" & "     "
    See the right aligned words in the RichTextBox.
    The spaces should come after Tschak.
    But the spaces are before Boing.
    You can see this easily when you CTRL+A the RichTextBox content.

    Now try
    Code:
    RichTextBox1.TextRTF = "{\rtf1" & "     " & "Boing Bum Tschak"
    The spaces are after Tschak.

    Name:  2022-09-10_19-41-46.jpg
Views: 1356
Size:  10.9 KB

    ---

    What are the spaces for?
    I want a label with right aligned colored text, RichTextBox should do it.
    At the right I want a little offset from the edge.
    A single space char would be enough.
    Last edited by Karl77; Sep 10th, 2022 at 12:47 PM.

  11. #3451
    Fanatic Member
    Join Date
    Oct 2005
    Posts
    558

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by fafalone View Post
    I have no problem getting the demo project to run.

    TLB files (assuming that's what you mean) get registered when you add them or open a project referencing them. You might run into trouble if you have a previous version registered and the path no longer exists. In that case the new version wouldn't register. You'd have to use the old path for the tlb, or recreate it (new version is fine), unregister, then delete it and open with the new path.
    Glad it works for you. It definitely doesn't work for me. I'm using a brand new laptop and it has no tlb files (that I know of) so I don't think it's an old version issue. If anything, it's probably the opposite - it may be that you had an old version installed which allowed you to get the demo to work.

    I don't think most people work with tlb files or would even know what they were or how to register one or delete one. I know I don't and I've been using VB since VB 1.0 for DOS was released.

    It's a shame this information isn't included with the demo. That was the point of my post.

  12. #3452
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,647

    Re: CommonControls (Replacement of the MS common controls)

    You don't need to register them yourself, if you tried, that's probably where the problem arose.

    Krool has updated the tlb in compatibility-breaking ways several times without changing the GUID (as have I with oleexp, so not complaining), so when I've upgraded, I've had to do some manual un registration to use the new version. But I also just built a new system this year so everything was new again; it ran fine.

    TLBs (most of them, like OLEGuids and oleexp) are 100x easier to deal with registration wise than ocx, those are a consistent nightmare.

  13. #3453
    Fanatic Member
    Join Date
    Oct 2013
    Posts
    783

    Re: CommonControls (Replacement of the MS common controls)

    hi krool
    I'm using your textboxes to display data in Arabic from database and they are doing very well.
    However when adding data at runtime :
    eg TextBoxW1.Text = "اللغة العربية" they are showing strange characters.
    as opposed to VB textboxes which are showing data correctly at runtime but strange symbols from database.
    eg Text1.Text = "اللغة العربية"
    thanks
    Last edited by samer22; Sep 30th, 2022 at 02:41 PM.

  14. #3454
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Toolbar problem with .DisabledImagelist

    When a button is set to enabled = false by code the button shows the correct image.
    This does not work when the button is TbrButtonStyleCheck + .Value = TbrButtonValuePressed.

    See attached sample to play with:
    2022-09-16_Toolbar.zip

    EDIT:
    MSCOMTL's toolbar shows the same behavior as in VBCCR17.

    On Enabled = false for a button, the button style has to be default.
    Otherwise the image from the .DisabledImagelist is not used.

    Before setting Enabled = false, style and value must be stored for Enabled = true.
    I wrote a helper function that stores the style and state of a button before appling the image.
    It uses the button Tag to store the values.

    This kind of works ok, but the Tag property is lost for other uses.
    Ok, I could use a companion list instead of the Tag.

    Bad is that this list has to be refreshed on every ButtonClick.

    ---

    The problem is solved so far, but it is a cumbersome approach.


    My wish is that VBCCR17's toolbar button uses the .DisabledImageList independent from the state and style of the button.

    Something to play with:
    2022-09-21_Toolbar.zip
    Last edited by Karl77; Sep 21st, 2022 at 07:06 AM.

  15. #3455
    New Member
    Join Date
    Sep 2022
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    I'm new here. Here can I download the latest version of your CommonControls replacement?

    Thank you

  16. #3456
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)


  17. #3457

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    My wish is that VBCCR17's toolbar button uses the .DisabledImageList independent from the state and style of the button.
    I understand your point(s). But I see no way to fix it..

  18. #3458
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    I understand your point(s). But I see no way to fix it..
    This is solved by a little workaround.

    I decided to store the button data in the tag of the toolbar and not in the tag of the single button.
    Works ok.

    Things I don't like so much:
    1) Setting a button Enabled/Disabled requires a method.
    2) The button state has to be stored on every button click.
    3) The toolbar tag is occupied.

    If someone should have the same problem:
    2022-09-22_Toolbar.zip
    Last edited by Karl77; Sep 22nd, 2022 at 07:00 AM.

  19. #3459
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    i would like to as a SubMenu to the ToolbarButonMenu, how can i get the hMenu(hWnd) for each item
    Last edited by Semke; Sep 22nd, 2022 at 06:55 PM.

  20. #3460

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    i would like to as a SubMenu to the ToolbarButonMenu, how can i get the hMenu(hWnd) for each item
    Good point. The hMenu is created on demand and not persistent.
    So, a solution could be that whenever the popup menu is created a new "InitButtonMenu" event is fired with a TbrButton object and a hMenu pointer. So the developer can adjust the hMenu before it get's displayed by the ToolBar.
    What you think ?

  21. #3461
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Good point. The hMenu is created on demand and not persistent.
    So, a solution could be that whenever the popup menu is created a new "InitButtonMenu" event is fired with a TbrButton object and a hMenu pointer. So the developer can adjust the hMenu before it get's displayed by the ToolBar.
    What you think ?
    I was thinking in that direction, this would also help adding picture to the menu, using ModifyMenu / MF_BITMAP
    Last edited by Semke; Sep 29th, 2022 at 08:10 AM. Reason: typo

  22. #3462

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    I was thinking I that direction, this would also help adding picture to the menu, using ModifyMenu / MF_BITMAP
    Ok. But then there is a problem of the ButtonMenuClick. Currently it fires if wID is > 0 and passed that n-th wID to a ButtonMenu object.
    We would need to cap that, so that ButtonMenuClick only fires if wID is not higher then the ButtonMenus.Count.
    If the wID is not in that range and <> 0 then a new event shall be called, let's say "ButtonSubMenuClick" which just passes the wID and the developer is then responsible for mapping it. Of course the TbrButton class can be passed also for enrichement.
    Your thoughts?

  23. #3463
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Ok. But then there is a problem of the ButtonMenuClick. Currently it fires if wID is > 0 and passed that n-th wID to a ButtonMenu object.
    We would need to cap that, so that ButtonMenuClick only fires if wID is not higher then the ButtonMenus.Count.
    If the wID is not in that range and <> 0 then a new event shall be called, let's say "ButtonSubMenuClick" which just passes the wID and the developer is then responsible for mapping it. Of course the TbrButton class can be passed also for enrichement.
    Your thoughts?
    i understand that you want to apply events for the submenu, i think this would be a never ending affair, one might add subsubmenues etc. i was thinking of just using ModifyMenu/MF_POPUP and programaticly use CreatePopupMenu, AppendMenu and TrackPopupMenu

  24. #3464

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    i understand that you want to apply events for the submenu, i think this would be a never ending affair, one might add subsubmenues etc. i was thinking of just using ModifyMenu/MF_POPUP and programaticly use CreatePopupMenu, AppendMenu and TrackPopupMenu
    True.
    New idea, having just a new "InitButtonMenu" with ByVal hMenu As Long and a ByRef Handled As Boolean.
    If you change Handled to True the ToolBar control will not go further (TrackPopupMenu) and destroys just hMenu, since you decided it's all handled.
    ?

  25. #3465
    Fanatic Member
    Join Date
    Oct 2013
    Posts
    783

    Re: CommonControls (Replacement of the MS common controls)

    hi krool
    I'm using your textboxes to display data in Arabic from database and they are doing very well.
    However when adding data at runtime :
    eg TextBoxW1.Text = "اللغة العربية" they are showing strange characters.
    as opposed to VB textboxes which are showing data correctly at runtime but strange symbols from database.
    eg Text1.Text = "اللغة العربية"
    thanks
    Any idea here Krool?

  26. #3466

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by samer22 View Post
    Any idea here Krool?
    You can't apply unicode literals in the VB6 IDE. You need to use ChrW() for each character and append them together.
    I suggest you could use it for VB.TextBox because maybe your machine is in DBCS mode, so the VB6 IDE is "looks like unicode aware", but only while you are in DBCS mode. And any shipment to a computer which is not in DBCS mode will fail later.

  27. #3467
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    True.
    New idea, having just a new "InitButtonMenu" with ByVal hMenu As Long and a ByRef Handled As Boolean.
    If you change Handled to True the ToolBar control will not go further (TrackPopupMenu) and destroys just hMenu, since you decided it's all handled.
    ?
    I think this would be a good start, although i haven't tested it yet, but i don't think that TrackPopupMenu could be used on an existing menu. i am going to test it and/or find another method to take advantage of this.
    I would rather stay away from callbacks.
    maybe somebody else here could give some idea...

    be that as it may, it would help for those who want to use images in the menu.

  28. #3468
    Lively Member
    Join Date
    Oct 2014
    Posts
    93

    Re: CommonControls (Replacement of the MS common controls)

    Hello Krool!
    Thank you for your great contribution and developed this control, which I have been using all the time. It's great!

    Now there are two questions:

    1. "DTPicker" control lacks "BackColor" and "ForeColor" attributes

    2. The "BackColor" and "ForeColor" properties of the "MonthView" control do not work after being set (the background color and text color will not change)



    Please help us to solve the above problems.

    Thank you.

  29. #3469

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by smileyoufu View Post
    Hello Krool!
    Thank you for your great contribution and developed this control, which I have been using all the time. It's great!

    Now there are two questions:

    1. "DTPicker" control lacks "BackColor" and "ForeColor" attributes

    2. The "BackColor" and "ForeColor" properties of the "MonthView" control do not work after being set (the background color and text color will not change)



    Please help us to solve the above problems.

    Thank you.
    1. Not possible.

    2. Set VisualStyles to False.

  30. #3470
    Lively Member
    Join Date
    Oct 2014
    Posts
    93

    Re: CommonControls (Replacement of the MS common controls)

    I see. Thank you very much

  31. #3471
    Hyperactive Member gaouser's Avatar
    Join Date
    Mar 2022
    Location
    Near the User32.dll
    Posts
    386

    Re: CommonControls (Replacement of the MS common controls)

    So bad that crashes on Win7 Ultimate SP1 i really wanted to see MSCC6 as Manifested

  32. #3472
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,647

    Re: CommonControls (Replacement of the MS common controls)

    You probably saw it on the Discord but I'll add it here for tracking purposes...

    Would be really nice to have an option for PictureAlignment when CommandButton style = graphical, so the image can appear to the left/right/bottom instead of just top. Setting the Alignment option has no impact.

  33. #3473
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

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

    On the toolbar Button the Style Placeholder is missing. So what I have been using until now is, to set the style as TbrButtonStyleSeparator and set the CustomWidth to the desired width.

    Seems ok, But! when the toolbar Wrappable is true the button will not go immediately to the next row of the toolbar. Only after a button with the style is not TbrButtonStyleSeparator which is before the placeholder has also been moved to the next row

    when checking the Button .Left and .Top properties it returns 0 on both, as a result any controls which are dependent on these coordinates move to position 0,0

    This will also be if there are more then one placeholders in sequence; they will not move to next row of buttons until the wrap include the button before all the placeholder(s).



    I hope I explained it enough...

    to test it , create a toolbar with a few buttons, create a button TbrButtonStyleSeparator and set Customwidth to 2000, Autosize= false , create a few more buttons. set toolbar Wrappable =true
    create a picturbox

    in code
    set Picturebox Container = toolbar
    set the picturebox cords to the button cords
    resize the form to the middle of the placeholder and repeat setting the picturebox cords to the button cords (use a form resize event to see it better)


    I have tested it further.
    if i put a TbrButtonStyleSeparator with Autosize=true before the placeholder then the .Left and .Top properties remain as old, but it will not move dow until all buttons with TbrButtonStyleSeparator in the sequence don't fit on the row
    Last edited by Semke; Dec 27th, 2022 at 04:56 PM.

  34. #3474
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    597

    Re: CommonControls (Replacement of the MS common controls)

    OLEGuids.tlb has implemented IStorage, Please do me a favor to add IStream interface so that I can get rid of 'Edanmo's OLE interfaces & fuctions V1.81' in a project and avoid conflicts.

  35. #3475
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,647

    Re: CommonControls (Replacement of the MS common controls)

    The IStorage in oleguids is a stub, you can't use it.

    Code:
        	[
            	uuid(0000000B-0000-0000-C000-000000000046),
            	odl,
        	]
        	interface IStorage : IUnknown
    	{
    		// Not done, guid placeholder only
        	};
    But as noted oleexp.tlb has not modified it from olelib.tlb 1.81 so you can at least only have the two.

    You're best bet it to just explicitly qualify them. Otherwise, the order the TLBs appear in the References dialog is the order they're resolved in if not qualified. Since VBCCR qualifies everything in it's code, it should be fine to just put it 2nd if you don't want to explicitly qualify everything yourself.

  36. #3476
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: CommonControls (Replacement of the MS common controls)

    I would like to have a control to input a value with decimals, a numeric input for prices with specific accuracy (say 3 decimals). which from those control can do that, and how?

  37. #3477
    Addicted Member gilman's Avatar
    Join Date
    Jan 2017
    Location
    Bilbao
    Posts
    176

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by georgekar View Post
    I would like to have a control to input a value with decimals, a numeric input for prices with specific accuracy (say 3 decimals). which from those control can do that, and how?
    See the attached project
    As you can see it is very simply, and you cand freely modify to add more property or events if you need.
    You can put the total number of digits in the Precision property, and the decimal digits in Scal property , I want to call it Scale like in Oracle but is not posible.
    All I try it works fine.
    Attached Files Attached Files

  38. #3478
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: CommonControls (Replacement of the MS common controls)

    Thank you. I found another solution to include units, using Krool TextBoxW. I will post here in the CodeBank

  39. #3479
    Fanatic Member
    Join Date
    Oct 2005
    Posts
    558

    Re: CommonControls (Replacement of the MS common controls)

    Found an issue:

    "Missing: OLE Guid and interface definitions"

    I found the missing file in the demo folder. Not sure if that will help anybody else but for the demo to run, the reference needs to be changed.
    Last edited by Darkbob; Feb 2nd, 2023 at 12:06 AM.

  40. #3480
    Member Dragokas's Avatar
    Join Date
    Aug 2015
    Location
    Ukraine
    Posts
    740

    Re: CommonControls (Replacement of the MS common controls)

    Is it possible to bypass ListView limitation of item's max value length 259 characters?
    Microsoft mscomctl.ocx doesn't have that limitation.

    Code:
        With listView1.ListItems.Add(1, , "Col1")
            .SubItems(1) = String$(1000, "=")
            Debug.Print Len(.SubItems(1)) 'returns 259, mscomctl.ocx unlimited
        End With
    Last edited by Dragokas; Feb 2nd, 2023 at 08:17 AM.
    Malware analyst, VirusNet developer, HiJackThis+ author || my CodeBank works

Page 87 of 94 FirstFirst ... 377784858687888990 ... 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