Adblock breaks this site

CovButton [Source]

Discussion in 'Programming General' started by Covey, Sep 22, 2008.

  1. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    CovButton [Source]

    Kind of annoyed that i had to release the source for this because i'm kind of proud of it :D

    But hopefully someone will be nice enough to fix the problem i cannot seem to get around, when you set the Property "RoundedEdges" to true the Mouse Over (Font changes colour when you mouse over the button) doesn't work.

    Hopefully someone can offer suggestion or actually fix this and repost it ;)
    I consider this a fairly decent button, i still have afew things to add to this control before it would be completed. But it's in a working state at the moment.

    Thanks for any help going to be given. (Looks at Jazz or Holic)
    (UserControl is attached)
     

    Attached Files:

  2. htaed

    htaed Forum Addict
    Banned

    Joined:
    Dec 19, 2005
    Posts:
    336
    Referrals:
    0
    Sythe Gold:
    0
    CovButton [Source]

    Getting an error, refer to .log all the time (start of program, end of program).
    Button when the program is run is all black until mouseover.

    Haven't found anymore problems yet, and the code is really interesting, thanks covey! :D
     
  3. Visual Basic Matt

    Visual Basic Matt Apprentice

    Joined:
    Jan 29, 2008
    Posts:
    647
    Referrals:
    2
    Sythe Gold:
    56
    Discord Unique ID:
    223154494878253056
    CovButton [Source]

    Ill mess with it a little and see what i can do, ill notify you if i do fix it. ;)

    Edit: Only problem i noticed is when control in actually being used in a compiled app, edges don't stay rounded. No color changing or anything...
     
  4. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    CovButton [Source]

    yea small problem with the drawing function of mine, as i said it's not complete yet but to test rounded edges at run time, you just need to add this code to a button so when you click it during run time it will make the rounded edges happen:
    Code:
    covbutton1.roundedges = true
     
  5. Nullware

    Nullware Guru

    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0
    CovButton [Source]

    1)
    Code:
    Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    ...
    .WriteProperty "BorderyStyle", blnBorderStyle, False
    
    Should be "BorderStyle". Also, shouldn't "False" be "CB_DEF_BorderStyle" to preserve the BorderStyle value we want to set..

    2)
    Code:
    Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    ...
    blnBorderStyle = .ReadProperty("BorderStyle", False)
    
    Shouldn't "False" once again be "CB_DEF_BorderStyle" to read the BorderStyle value into that..

    3) To fix mouseover issues with RoundedEdges I simply added "Usercontrol.refresh" at the very end of the Redraw() procedure and that fixed it.

    4) I keep getting this annoying error message "Line 8: Property DrawStyle in CovButton had an invalid value." whenever I test the program or add the control to my forms. It didn't prevent me from doing anything but it's highly annoying.
     
< first program | Which language? >


 
 
Adblock breaks this site