Windows Develop Bookmark and Share   
 index > Windows Forms General > Can I merge buttons in vb ?
 

Can I merge buttons in vb ?

Is it possible tomerge buttons in vb ?
a vb beginner  Monday, September 28, 2009 10:56 PM
You can just position them next to each other.

Alternatively, you could make a UserControl that contained the two buttons, and always kept them aligned. The UserControl could then work like a single "button", and expose the events and properties you wish.
Reed Copsey, Jr. - http://reedcopsey.com
  • Marked As Answer bya vb beginner Monday, September 28, 2009 11:56 PM
  •  
Reed Copsey, Jr.  Monday, September 28, 2009 11:11 PM
Ah, I see what you mean. Like two mechanical triggers covered by a single button face. Like many volume up and down controls in a TV remote: Just one plastic cover over two individual triggers (more and less volume).

It is not possible. If you want something like that, you may of course create your own button control based on UserControl or Control.

But maybe you want something simpler? Maybe you will settle for two individual buttons position next to each other with a flat style?? Try it out. Maybe it suits your needs.
MCP
  • Marked As Answer bya vb beginner Monday, September 28, 2009 11:56 PM
  •  
webJose  Monday, September 28, 2009 11:34 PM
Just do the following:

  1. Create the user control with the two buttons.
  2. Build the project (Ctrl+Shift+B)
  3. Go to your form - At the top of the Toolbox, there will be a section with your UserControl, named something like "WindowsApplication1 Components"
  4. Drag your user control onto the form

Reed Copsey, Jr. - http://reedcopsey.com
  • Marked As Answer bya vb beginner Monday, September 28, 2009 11:56 PM
  •  
Reed Copsey, Jr.  Monday, September 28, 2009 11:48 PM
I'm not sure what you mean by "merge" in this case.

Do you mean to take the text from two buttons and put that text onto a third button?

Or do you mean something else?
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
  • Unmarked As Answer bya vb beginner Tuesday, September 29, 2009 9:02 AM
  • Marked As Answer bya vb beginner Monday, September 28, 2009 11:56 PM
  •  
DeborahK  Monday, September 28, 2009 11:07 PM
I mean to make them stuck to each other.
a vb beginner  Monday, September 28, 2009 11:09 PM
You can just position them next to each other.

Alternatively, you could make a UserControl that contained the two buttons, and always kept them aligned. The UserControl could then work like a single "button", and expose the events and properties you wish.
Reed Copsey, Jr. - http://reedcopsey.com
  • Marked As Answer bya vb beginner Monday, September 28, 2009 11:56 PM
  •  
Reed Copsey, Jr.  Monday, September 28, 2009 11:11 PM
I mean to make them look like one button but each one of them works separately.
Is this possible?
a vb beginner  Monday, September 28, 2009 11:16 PM
Ah, I see what you mean. Like two mechanical triggers covered by a single button face. Like many volume up and down controls in a TV remote: Just one plastic cover over two individual triggers (more and less volume).

It is not possible. If you want something like that, you may of course create your own button control based on UserControl or Control.

But maybe you want something simpler? Maybe you will settle for two individual buttons position next to each other with a flat style?? Try it out. Maybe it suits your needs.
MCP
  • Marked As Answer bya vb beginner Monday, September 28, 2009 11:56 PM
  •  
webJose  Monday, September 28, 2009 11:34 PM
That's what I need , but how canI add this user control to the windows form?
a vb beginner  Monday, September 28, 2009 11:41 PM
Just do the following:

  1. Create the user control with the two buttons.
  2. Build the project (Ctrl+Shift+B)
  3. Go to your form - At the top of the Toolbox, there will be a section with your UserControl, named something like "WindowsApplication1 Components"
  4. Drag your user control onto the form

Reed Copsey, Jr. - http://reedcopsey.com
  • Marked As Answer bya vb beginner Monday, September 28, 2009 11:56 PM
  •  
Reed Copsey, Jr.  Monday, September 28, 2009 11:48 PM
Yes, it's working.
Thanks for you all.
a vb beginner  Monday, September 28, 2009 11:55 PM

You can use google to search for other answers

Custom Search

More Threads

• Adding Pages on HandleCreated
• Newbie here...
• how to control the remote system from my system?
• Pixeled text when drawing string on transparent form
• Using an embedded image for a button's background image
• Web crawler
• Annoying GDI+ Window
• Copy Text From WebBrowser control to Clipboard
• Custom Control and TypeConverter problem, help!
• Same DateTimePicker control in win 2003 and win 2008 / Vista