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.
7 posts Page 1 of 1
Contributors
User avatar
Mark
VIP - Donator
VIP - Donator
Posts: 372
Joined: Mon Aug 17, 2009 10:35 pm

custom control tutorial
Mark
hello,

can anyone do a tutorial on a custom button and make it a dll.
http://www.mbappz.com
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

Re: custom control tutorial
Napster1488
I can Post one later ;)
YouTube Downloader v3.0
Image
Image
Image
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: custom control tutorial
MrAksel
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
User avatar
Mark
VIP - Donator
VIP - Donator
Posts: 372
Joined: Mon Aug 17, 2009 10:35 pm

Re: custom control tutorial
Mark
no for a personal project?.
http://www.mbappz.com
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: custom control tutorial
mandai
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.
User avatar
Mark
VIP - Donator
VIP - Donator
Posts: 372
Joined: Mon Aug 17, 2009 10:35 pm

Re: custom control tutorial
Mark
can anyone make a tutorial for me?
http://www.mbappz.com
User avatar
dj1437
VIP - Donator
VIP - Donator
Posts: 504
Joined: Tue Dec 21, 2010 2:02 am

Re: custom control tutorial
dj1437
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
Return to “Tutorial Requests”