Results 1 to 3 of 3

Thread: Circular commandbutton

  1. #1

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330
    Sometime last year I saw some post about shaped command buttons, if I remember right there were an to a control someone had made that let you decide what shape the button would have. I'm experimenting with odd shaped form's and a oval button would fit right in there.

    If anyone knows where I can get that control, or any code that would aloow me to change the apperance of a commandbutton, I would be most thankful.

    Thank you
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217
    The easiest way I know of is to use the Image control (or a Picture control, but try not to) and just use a couple of pictures to represent your odd shaped button, one picture for the regular (depressed) state and another for the pressed state (or just use BitBlt on the first image to manipulate it in to looking like it was clicked). If you go this route you get the added benifit of using all of the Image control's built in methods and events.

    The other route you could go is to create an ActiveX control with no control on it, just a shape that is set by the properties. From here you would have to code all the advanced graphics of the button, such as the button shadow and border, for each side of the irregular shape. You would also have to provide all of the Properties, Events, and Methods through code yourself. Obviously this method is alot more work, but it is the best method in the long run. Once you've created the ActiveX control you can reuse in all your projects without too much effort.

    Hope this was helpful.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    You may change the region of the hwnd to the commandbutton with some api's if you ask me.

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