i want to create my own button in vb.net
-
instead of inheritting button class i want to create a button in component class. in that class where i can call pen and brush to make button ?
dim mybutton as new Button mybotton.Text="button" sk.haneef@gmail.com
this is haneef
-
instead of inheritting button class i want to create a button in component class. in that class where i can call pen and brush to make button ?
-
dim mybutton as new Button mybotton.Text="button" sk.haneef@gmail.com
this is haneef
-
Use the Paint event. The EventArgs contains a
Graphics
object that you can use for the drawing.--- Year happy = new Year(2007);
-
Imports System.Windows.Forms Imports System.Drawing Public Class FlatButton Public Sub Onpaint() Dim obj As Graphics obj.DrawRectangle(New Pen(Color.DarkOliveGreen), New Rectangle(0, 0, 100, 100)) obj.FillRectangle(New SolidBrush(Color.DarkRed), New Rectangle(0, 0, 100, 100)) End Sub This is my class .now i don't want to enter events and properties.just i want to create one outline of my button.please give me a reply. i want to make dll file of this component in one project and i want to add this button to my form.please anyone give a reply
-
anujose wrote:
but where i will call the paint method in my component class
You don't. The event will be called whenever the control needs to be drawn. That is the way that you provide the code that the system uses to draw your control.
--- Year happy = new Year(2007);