To make custom buttons in visual basic express 08.

Discussion in 'Code Snippets and Tutorials' started by Pocketmonster, Jan 27, 2008.

  1. Pocketmonster

    Pocketmonster Level II

    Joined:
    Nov 20, 2007
    Messages:
    158
    Likes Received:
    0
    Im wishing to make custom buttons that look sharp and I really can't find out how to do it. I have seen that I can't do it without third party programs but I can't find any so links would be helpful thank you :)
     
  2. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Here is a simple tutorial to make a custom control (yeah, you can create a button too!). If you don't want to dynamically create an image (using the Graphics Class), make one first and then use Graphic.DrawImage method. If you need any help don't hesitate to ask.
     
  3. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    Easiest way is to learn the drawing in vb.net. Then create a new class that inherits from the system.windows.forms.button class and just write a new method for on paint
     
  4. Pocketmonster

    Pocketmonster Level II

    Joined:
    Nov 20, 2007
    Messages:
    158
    Likes Received:
    0
    OK thank yea :D But how can I make/get skins for the program itself. And how would I make rounded buttons instead of just square ones
     
  5. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    For rounded you will need to make an eclipse instead of a rectangle. Skins that are premade are very expensive. Your best bet is to do a simple skinning solution that just changes the easily cahnged values in a cotrol like the one I made, or make it look nice without a skin
     
  6. Pocketmonster

    Pocketmonster Level II

    Joined:
    Nov 20, 2007
    Messages:
    158
    Likes Received:
    0
    OK thank you :D
    But do you know how with a web browser do you return the URL to the textbox
    What I have is a button that Uses whats in the text box- URL box and shows the webpage in the webbrowser. Just whenever I go to a site and browse it all I see is the main URL that I typed in. And is there a way for when I press the back/forward buttons it will change the url to the new urls.
     
  7. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    There is an event called navigate, add a new event to it, then have the textbox = txturl.text = web.url