custom control tutorial
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
7 posts
Page 1 of 1
hello,
can anyone do a tutorial on a custom button and make it a dll.
can anyone do a tutorial on a custom button and make it a dll.
You aint doing this for the competition, are you?
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

You could just add a UserControl to the ClassLibrary project, then to use the control you just go to choose items in the toolbox and browse to the dll once you have compiled it.
Well, since nobody is helpful anymore, I guess I should help you.
Button Tutorial, By DJ1437
Get a image for the button. Make a image for when the mouse is hovering and when it is clicked.
Make a form and delete it to make the system references needed.
Code: Select all
Imports System.Drawing
Imports System.windows.forms
Public Class BlackButton
Inherits Windows.Forms.Button
Public Sub New()
Me.Size = New Point(90, 25)
Me.FlatStyle = Windows.Forms.FlatStyle.Flat
Me.FlatAppearance.BorderSize = 0
Me.FlatAppearance.MouseDownBackColor = Color.Transparent
Me.FlatAppearance.MouseOverBackColor = Color.Transparent
Me.BackColor = System.Drawing.Color.Transparent
Me.BackgroundImage = My.Resources.'regular image goes here
Me.BackgroundImageLayout = Windows.Forms.ImageLayout.Stretch
End Sub
Private Sub Class1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
Me.BackgroundImage = My.Resources.'down
Me.BackgroundImageLayout = ImageLayout.Stretch
End Sub
Private Sub Class1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseHover
Me.BackgroundImage = My.Resources.'hover
Me.BackgroundImageLayout = ImageLayout.Stretch
End Sub
Private Sub Class1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave
Me.BackgroundImage = My.Resources.'Regular
Me.BackgroundImageLayout = ImageLayout.Stretch
End Sub
Private Sub Class1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
Me.BackgroundImage = My.Resources.'Regular
Me.BackgroundImageLayout = ImageLayout.Stretch
End Sub
End Class
This is a signature.
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023