Results 1 to 5 of 5

Thread: Custom command button for media player

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2007
    Posts
    39

    Custom command button for media player

    Hi i would like to know if there is anyway to make a custom command button using activex. i would like the command button to be a circle so it would have to be a shape. Does anyone have any ideas on how i could start to create a circle command button? (like the ones in wmp 11)

    please help

    cheers

  2. #2

    Thread Starter
    Member
    Join Date
    Oct 2007
    Posts
    39

    Re: Custom command button for media player

    surely sum1 knows there are ones to buy on the web but i want to make one

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Custom command button for media player

    What programming language would you be using?

  4. #4
    Junior Member
    Join Date
    May 2008
    Posts
    21

    Re: Custom command button for media player

    visual basic 6
    < advertising link removed by moderator >

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Custom command button for media player

    There are several examples/postings on this site and others like PSC.com of custom buttons. I don't know your experience level, but custom buttons are not exactly easy.

    To create a cricle shape, you can....
    1. Use the MaskPicture and/or MaskColor properties of the usercontrol
    2. Use APIs (CreateEllipticRgn & SetWindowRgn) to apply a circular shape

    Another option is to use a picturebox, borderless, and use the aforementioned APIs to create the circular shape. Pictureboxes, unlike shape controls, have most of the needed events (i.e., click, gotfocus, etc, etc).

    If you want to go the usercontrol route, this might help and at very least give you some ideas.
    Here is a "template" I wrote for custom buttons. The template does not draw the button and it does not apply shapes to it, those will be your responsibility. What the template does is handle all the typical button events a normal button will, so it is pre-coded in that aspect. It does have a routine that will be called when the button needs to be redrawn. Not saying the template will be suitable for you, but it will give you an idea of some of the complexity involved.

    A great link regarding usercontrols
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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