CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2007
    Posts
    491

    Question Graphical buttons...?

    I need graphical buttons for my project, I just took a look at the button properties and I was surprise to discover that there was no "Style" propertie, is there a way to create a graphical buttons in C#?

    Thanks.

    BTW: I think Ill stop asking here questions each 2 hours, I guess you got no power for me anymore (You are all too polite to say that :P).
    Ill stop bother you xD

  2. #2
    Join Date
    Nov 2006
    Location
    North Bend, WA
    Posts
    487

    Re: Graphical buttons...?

    There is an "Image" property. Would that work for you?

  3. #3
    Join Date
    Jan 2007
    Posts
    491

    Re: Graphical buttons...?

    Quote Originally Posted by dcell59
    There is an "Image" property. Would that work for you?
    Not really, I want a button with a backcolor (not a gray backcolor), but when I make a colourful backcolor the border of the button stays gray and it's ugly :/

    Is there a way to color ALL the button?

  4. #4
    Join Date
    Nov 2006
    Location
    North Bend, WA
    Posts
    487

    Re: Graphical buttons...?

    I created a button, put an image on it, and then made the FlatStyle "Flat" and turned off the border.

    I also made a square red button with no borders by setting the button's BackColor to red and doing the same FlatStyle changes as above.

    What else do you want to be able to do?

  5. #5
    Join Date
    Jan 2007
    Posts
    491

    Re: Graphical buttons...?

    Quote Originally Posted by dcell59
    I created a button, put an image on it, and then made the FlatStyle "Flat" and turned off the border.

    I also made a square red button with no borders by setting the button's BackColor to red and doing the same FlatStyle changes as above.

    What else do you want to be able to do?
    Oh, lolz, it's a command button :/
    Now I discovered it

    emm... There is a command in the components, but when I it's just don't want to be added to my toolbar
    does anybody knows how do I declare on a command-button?
    Code:
    ??? command1 = new System.???

  6. #6
    Join Date
    Sep 2006
    Location
    Eastern, NC, USA
    Posts
    907

    Re: Graphical buttons...?

    Quote Originally Posted by Talikag
    Oh, lolz, it's a command button :/
    Now I discovered it
    Are you creating a windows form app or a web app? I believe that command buttons are only for web apps (but again, I could be wrong).

    /P
    Last edited by petes1234; January 28th, 2007 at 03:01 PM.

  7. #7
    Join Date
    Jan 2007
    Posts
    491

    Re: Graphical buttons...?

    Quote Originally Posted by petes1234
    Are you creating a windows form app or a web app? I believe that command buttons are only for web apps (but again, I could be wrong).

    /P
    It's a window application, but Im not able to do somethin like this:
    Code:
    command x = new System.Web.(...).Command();
    I don't know what to do :/, without the command-buttons it's so ugly and tasteless

  8. #8
    Join Date
    Nov 2006
    Location
    North Bend, WA
    Posts
    487

    Re: Graphical buttons...?

    What's special about a command button that a Windows Forms button doesn't do?

    BTW, when working with Windows Forms, it's a good idea to set the Help Index filter to "Windows Forms Development" to help avoid trying to use features from ASP.NET.

  9. #9
    Join Date
    Jan 2007
    Posts
    491

    Re: Graphical buttons...?

    Quote Originally Posted by dcell59
    What's special about a command button that a Windows Forms button doesn't do?

    BTW, when working with Windows Forms, it's a good idea to set the Help Index filter to "Windows Forms Development" to help avoid trying to use features from ASP.NET.
    I just can't create a board from normal labels, it looks verrrry bad, emm.. Take a look at the window's minesweeper, those are command buttons (or at least what I want)... If I won't success to create 1 I think Ill do it flat.. :P

  10. #10
    Join Date
    Sep 2006
    Location
    Eastern, NC, USA
    Posts
    907

    Re: Graphical buttons...?

    Quote Originally Posted by Talikag
    Take a look at the window's minesweeper, those are command buttons
    I think you may misunderstand what command buttons are. The windows minesweeper game is not an internet app and so cannot use command buttons.
    /Pete

  11. #11
    Join Date
    Nov 2006
    Location
    North Bend, WA
    Posts
    487

    Re: Graphical buttons...?

    I see what you're talking about. I just assumed you were using the Windows Forms Button control. That's what I based my response on.

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

Featured