Page 23 of 94 FirstFirst ... 13202122232425263373 ... LastLast
Results 881 to 920 of 3756

Thread: CommonControls (Replacement of the MS common controls)

  1. #881

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    This is the 1.3 ActiveX Control version. (End of support)

    Removed
    Last edited by Krool; Nov 4th, 2017 at 05:27 PM.

  2. #882

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Update released. (Discard the update yesterday)

    There was an issue with the CoolBar. It can be reproduced with the Demo project.

    Compile .exe at 96 DPI setting. Change system to 120 DPI and you will notice the CoolBar is not sized correctly.
    Everything will "increase" in size (because of higher DPI) but due to the Childs there can be a scenario which can cause a problem.
    The CoolBar will try to queeze the child control into the given borders, but some controls (like the ImageCombo) which have an internal resizing can "reject" the squeeze. The CoolBar will back down and gives the ImageCombo the necessary space and thus the CoolBar resizes but will not notify the parent via RBN_HEIGHTCHANGE. And that's actually the issue. My UserControl is then unaware of this play and does not resize accordingly. (as no RBN_HEIGHTCHANGE notification in this scenario)
    As long as IDE and .exe are both in same DPI setting this issue does not pop up. But in case the DPI setting is on one of the side different there is a difference in size and causing the issue.
    This was solved by simply calling UserControl_Resize whenever a Child control is set to the CoolBar control.

  3. #883
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    Re: CommonControls (Replacement of the MS common controls)

    I have a small issue, excuse me if it seems stupid

    I have this bit of code :

    Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.TreeView1.SelectedItem = Me.TreeView1.HitTest(X, Y)
    End Sub

    Private Sub TreeView1_NodeClick(ByVal Node As TvwNode, ByVal Button As Integer)

    On Error GoTo MyErrorHandler

    AgentSelected = TreeView1.SelectedItem.Text

    etc
    end sub

    the issue is that when I click in the Treeview1 it executes the NODE_CLICK before Treeview1_MouseDown

    I need to execute the mouse down event first or somehow reproduce the same code in treeview1_mousedown at the moment I have to click twice on a item before it updates correctly.

    help please

  4. #884

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by jpskiller View Post
    I have a small issue, excuse me if it seems stupid

    I have this bit of code :

    Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.TreeView1.SelectedItem = Me.TreeView1.HitTest(X, Y)
    End Sub

    Private Sub TreeView1_NodeClick(ByVal Node As TvwNode, ByVal Button As Integer)

    On Error GoTo MyErrorHandler

    AgentSelected = TreeView1.SelectedItem.Text

    etc
    end sub

    the issue is that when I click in the Treeview1 it executes the NODE_CLICK before Treeview1_MouseDown

    I need to execute the mouse down event first or somehow reproduce the same code in treeview1_mousedown at the moment I have to click twice on a item before it updates correctly.

    help please
    Oh.
    This is a side effect caused by my update from 21-Nov-2015.
    The update was reasonable.
    Will look soon for a fix to bring the events in right order.
    This bug now affects only ListView and TreeView.

    The problem is due to internal DragDetect and thus WM_LBUTTONDOWN hangs.
    Last edited by Krool; Jan 1st, 2016 at 03:35 PM.

  5. #885

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Important update released.

    Mouse events now again in correct order in the ImageCombo, TreeView and ListView control.
    And there are raised 'After'. How it should be.

    Problem was an internal modal message loop on these controls. (DragDetect)
    This is also documented by MSDN.

    Solution:
    Custom message now implemented "UM_BUTTONDOWN".
    This is posted (PostMessage API) to the control right before passing WM_LBUTTONDOWN/WM_RBUTTONDOWN to the control.
    Last edited by Krool; Jan 1st, 2016 at 03:45 PM.

  6. #886

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Could be important when using the ListView control as the Shift parameter in the ItemActivate event was not properly set. (LVN_ITEMACTIVATE handler)

  7. #887
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,714

    Re: CommonControls (Replacement of the MS common controls)

    Just wanted to point out a pretty significant omission given the level of feature-completeness of this project: overlays for treeview and listview. LVIS_OVERLAYMASK/TVIS_OVERLAYMASK, and the ability to add them in the ImageList control. Would be cool to have, but no biggie.

  8. #888
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: CommonControls (Replacement of the MS common controls)

    This came up in another thread, but is there an example on how to use the Use Chevron Dropdown and ChevronPressed event of your Coolbar Control replacement?

  9. #889

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by DEXWERX View Post
    This came up in another thread, but is there an example on how to use the Use Chevron Dropdown and ChevronPressed event of your Coolbar Control replacement?
    You have to enable "UseChevron" and define the "IdealWidth" value in a band.
    The chevron button is shown if the band is smaller than "IdealWidth". When clicking on the button the event "ChevronPushed" is fired.

    Name:  CoolBarChevron.png
Views: 2049
Size:  40.6 KB

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    You have to enable "UseChevron" and define the "IdealWidth" value in a band.
    The chevron button is shown if the band is smaller than "IdealWidth". When clicking on the button the event "ChevronPushed" is fired.
    IdealWidth was what I was missing. Perfect.

  11. #891
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Krool, do you plan to do something on the transparency effect of the toolbar buttons?
    I mean the black background issue.

  12. #892

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    Krool, do you plan to do something on the transparency effect of the toolbar buttons?
    I mean the black background issue.
    I don't know how to achive for non-icon picture and w/o mask color...
    You use png files in the ImageList?

  13. #893
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    I don't know how to achive for non-icon picture and w/o mask color...
    You use png files in the ImageList?
    Yeah, that might require GDI+. possibly a can of worms for you to add it to your project, unless you want to do it Via the flatapi.

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    I don't know how to achive for non-icon picture and w/o mask color...
    You use png files in the ImageList?
    Yes, PNG with alpha.
    Tried ICO+alpha instead today.
    Last idea for tomorrow is BMP32.
    I'll report then.

    It would be very good to get it working with your toolbar.
    Because it is the only one I know of which doesn't draw a border around himself.
    And has the ability to set a determined bg color.

    BTW, the PNGs came into the imagelist via GDI+.

  15. #895
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by DEXWERX View Post
    Yeah, that might require GDI+. possibly a can of worms for you to add it to your project, unless you want to do it Via the flatapi.
    Flatapi?

  16. #896
    Frenzied Member
    Join Date
    Dec 2008
    Location
    Melbourne Australia
    Posts
    1,487

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    Flatapi?
    I was wondering if someone would raise that

  17. #897
    Fanatic Member
    Join Date
    Aug 2013
    Posts
    806

    Re: CommonControls (Replacement of the MS common controls)

    Check out PhotoDemon, a pro-grade photo editor written completely in VB6. (Full source available at GitHub.)

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

    Re: CommonControls (Replacement of the MS common controls)

    Last idea for tomorrow is BMP32.
    I'll report then.
    No luck with BMP32.

    The CC5 toolbar accepts the transparency.
    The Krool toolbar should do it the same way, as it is the same control.

    But another wrapper.
    And my assumption is that all is ok with the Krool toolbar.
    But the transparency information gets lost when the image data is handed over.

    I *think* that this could be the only problem.
    Just an idea.

    https://www.freebasic-portal.de/tuto...icons-111.html
    Last edited by Karl77; Feb 17th, 2016 at 10:14 AM.

  19. #899
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: CommonControls (Replacement of the MS common controls)

    Slightly unrelated, but something possibly omitted (but is in the link you posted) Are you going to add TBSTYLE_TRANSPARENT to the toolbar?

    regards,

  20. #900

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    No luck with BMP32.

    The CC5 toolbar accepts the transparency.
    The Krool toolbar should do it the same way, as it is the same control.

    But another wrapper.
    And my assumption is that all is ok with the Krool toolbar.
    But the transparency information gets lost when the image data is handed over.

    I *think* that this could be the only problem.
    Just an idea.

    https://www.freebasic-portal.de/tuto...icons-111.html
    My assumption is that it lies on my ImageList control and the transparency gets lost by the PropertyBag. Did you try with an pure API ImageList and set manually to the ToolBar?

  21. #901
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    My assumption is that it lies on my ImageList control and the transparency gets lost by the PropertyBag. Did you try with an pure API ImageList and set manually to the ToolBar?
    No, I didn't use your imagelist.
    I used the one CC5 provides.
    As this one works with the CC5 toolbar, I think we can exclude this as a cause.

    What can I do to help to track down the issue?

  22. #902
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Krool,

    VERY GOOD NEWS.

    The transparency on the toolbar buttons works.
    I must have done several things wrong before, but I don't really know what...

    I re-downloaded your project.
    Trew out some controls I don't intend to use, and the main form as well.

    So I had the Pager form left.
    Placed a new Krool-imagelist.
    Recreated the icons as BMP32.
    Filled the imagelist in the IDE.
    BANG! Works.

    See:
    Name:  vbf_001.jpg
Views: 1988
Size:  13.8 KB

    I apologize for the whole trouble I made.

    Karl
    Last edited by Karl77; Feb 19th, 2016 at 05:18 AM.

  23. #903
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: CommonControls (Replacement of the MS common controls)

    That looks great. (not being sarcastic because of the ugly green, but it's great that transparency works)
    Now the question remains, can we get the Toolbar itself transparent (Design time Property of the toolbar / TBSTYLE_TRANSPARENT )

  24. #904

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by DEXWERX View Post
    Now the question remains, can we get the Toolbar itself transparent (Design time Property of the toolbar / TBSTYLE_TRANSPARENT )
    I have noted this point in my ToDo list.

  25. #905
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    I have noted this point in my ToDo list.
    You've single handedly surpassed the original CC Replacement project... It may be a can of worms, but donations for this project should also be on your todo.

    Thanks for keeping VB alive. Regards.

  26. #906

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    I have now implemented TBSTYLE_TRANSPARENT. This was useful to have the BackColor property shown/visible at design-time.

    I will also include soon a "Transparent" property. This makes a background as a replica of the underlying background. (simulated transparency)

  27. #907
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by DEXWERX View Post
    donations for this project should also be on your todo.
    I second that.

    Small other remark: PNG works now as well.
    I'll prepare an example next week.

    Great work Krool!

  28. #908
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    So here is the example for the toolbar using PNGs.
    There is still a lot to do, but up to now it works quite well.
    The graphics itself are for testing only, I know they have to be fine-tuned for the different sizes.
    Attached Files Attached Files
    Last edited by Karl77; Feb 22nd, 2016 at 03:33 PM.

  29. #909
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    Re: CommonControls (Replacement of the MS common controls)

    RichTextBox Help

    I know that this auto detects URLS but so far I cant find a way to actual open the url with default app ie Browser / Email etc.

    I have tried a couple of suggestions from around but there based on original and dont seem to work.

    I presume since it auto detects i must be relatively simple to run it!


    ** I have also noticed if I use the RichTextbox on a MDI form and set as child, when close the form it crashes the app, when normal form it is OK

    Help appreiated
    Last edited by jpskiller; Feb 23rd, 2016 at 08:40 AM.

  30. #910
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Busy Slider

    Krool, I have found a small issue in the slider.
    It fires the scroll event 2 times when clicked.
    The 'original' control doesn't show this beahvior.

    To retrace:
    Place a Slider1 on a form (range 1 to 4).
    Place a label "lbl_1" (caption "0").
    In Slider1_Scroll, lbl_1.Caption = CStr(CInt(lbl_1.Caption) + 1)

    Scroll by mousewheel and see how the label increases by 1 on every scroll action.
    But click the slider and see how the label increases by 2.

    Karl

  31. #911

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by jpskiller View Post
    RichTextBox Help
    ** I have also noticed if I use the RichTextbox on a MDI form and set as child, when close the form it crashes the app, when normal form it is OK

    Help appreiated
    Does it also happen with the OCX version?

    On UserControl Version did you include the VisualStyles.bas and init it on Sub_Main?
    Last edited by Krool; Feb 23rd, 2016 at 12:13 PM.

  32. #912
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Does it also happen with the OCX version?

    On UserControl Version did you include the VisualStyles.bas and init it on Sub_Main?
    I dont use the OCX version

    Yes included VisualStyles and have done the Init from submain

  33. #913
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    Re: CommonControls (Replacement of the MS common controls)

    I ment to say I have called this manually from my form_load on MDI form 'Call InitVisualStyles'

    my MDI form is call frmMain and if use the Startup.bas code I get Ambiguous name detect : Main

    *** just remeber I have a main in a different module so have added it there **

    Still same issue
    Last edited by jpskiller; Feb 23rd, 2016 at 01:18 PM.

  34. #914

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by jpskiller View Post
    I ment to say I have called this manually from my form_load on MDI form 'Call InitVisualStyles'

    my MDI form is call frmMain and if use the Startup.bas code I get Ambiguous name detect : Main

    *** just remeber I have a main in a different module so have added it there **

    Still same issue
    Can you try to use the OCX version? Just for debug.
    And can you share a demo which shows the crash?

  35. #915
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    Re: CommonControls (Replacement of the MS common controls)

    Heres a very basic program

    MDi startup, opens form with richtextbox, when close form crash out

    If change sub form to not MDI child then can close with no issues

    Sorry not done OCX demo as I cant use it I have to have no dependencies and dont' know how to set it up with OCX
    Attached Files Attached Files
    Last edited by jpskiller; Feb 23rd, 2016 at 03:29 PM.

  36. #916

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by jpskiller View Post
    Heres a very basic program

    MDi startup, opens form with richtextbox, when close form crash out

    If change sub form to not MDI child then can close with no issues

    Sorry not done OCX demo as I cant use it I have to have no dependencies and dont' know how to set it up with OCX
    I have no crash. What OS do you use?
    In your demo now the VisualStyles.bas was not included.

  37. #917

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    Busy Slider

    Krool, I have found a small issue in the slider.
    It fires the scroll event 2 times when clicked.
    The 'original' control doesn't show this beahvior.

    To retrace:
    Place a Slider1 on a form (range 1 to 4).
    Place a label "lbl_1" (caption "0").
    In Slider1_Scroll, lbl_1.Caption = CStr(CInt(lbl_1.Caption) + 1)

    Scroll by mousewheel and see how the label increases by 1 on every scroll action.
    But click the slider and see how the label increases by 2.
    Done. Thanks

  38. #918
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    Re: CommonControls (Replacement of the MS common controls)

    I use windows 10, and the VisualStyles.bas is showing up under Modules on the demo, I did add it!

  39. #919
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    (Busy slider)

    Quote Originally Posted by Krool View Post
    Done. Thanks
    Slight issue left:
    If you click the control the only one scroll event is produced now - good.
    But when you scroll by mousewheel, there is NO scroll event now...

    (I only exchanged the Builds\Slider folder, as I found no other differences to the former release. Anything more to do?)

  40. #920

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,393

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    Slight issue left:
    If you click the control the only one scroll event is produced now - good.
    But when you scroll by mousewheel, there is NO scroll event now...
    Update released.
    Now it should work as expected.

Page 23 of 94 FirstFirst ... 13202122232425263373 ... 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