Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9107925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:41:10+00:00 2026-06-17T02:41:10+00:00

I want to compile a DLL control, is a Extended Panel but I only

  • 0

I want to compile a DLL control, is a Extended Panel but I only have the class, I don’t like to use classes for add a custom control, i prefer to add the DLL into the toolbox.

Someone can help me to transform this into a class library DLL control?

PS: In addition maybe I can need a guide-step to make the class-library too, it’s my first time trying this.

Thankyou.

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Text
Imports System.Windows.Forms

Namespace GradientPanel
    Public Partial Class GradientPanel
        Inherits System.Windows.Forms.Panel

        ' member variables
        Private mStartColor As System.Drawing.Color
        Private mEndColor As System.Drawing.Color

        Public Sub New()
            ' InitializeComponent()
            PaintGradient()
        End Sub

        Protected Overrides Sub OnPaint(pe As PaintEventArgs)
            ' TODO: Add custom paint code here

            ' Calling the base class OnPaint
            MyBase.OnPaint(pe)
        End Sub


        Public Property PageStartColor() As System.Drawing.Color
            Get
                Return mStartColor
            End Get
            Set
                mStartColor = value
                PaintGradient()
            End Set
        End Property


        Public Property PageEndColor() As System.Drawing.Color
            Get
                Return mEndColor
            End Get
            Set
                mEndColor = value
                PaintGradient()
            End Set
        End Property


        Private Sub PaintGradient()
            Dim gradBrush As System.Drawing.Drawing2D.LinearGradientBrush
            gradBrush = New System.Drawing.Drawing2D.LinearGradientBrush(New Point(0, 0), New Point(Me.Width, Me.Height), PageStartColor, PageEndColor)

            Dim bmp As New Bitmap(Me.Width, Me.Height)

            Dim g As Graphics = Graphics.FromImage(bmp)
            g.FillRectangle(gradBrush, New Rectangle(0, 0, Me.Width, Me.Height))
            Me.BackgroundImage = bmp
            Me.BackgroundImageLayout = ImageLayout.Stretch
        End Sub

    End Class
End Namespace
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:41:11+00:00Added an answer on June 17, 2026 at 2:41 am

    I have always just used a CustomControlLibrary Name it and set the Assembly Name and Default Namespace to what you want the dll to be, you will then right click on the project and select add class then you will add your Custom Control’s Class Code to the the Project. You can also add a new UserControl at that time. When you compile it, it will create a dll that you can browse to by right clicking on your ToolBox selecting choose items then Browse to your Dll that was created. It will then add the Controls that are contained in your Control Library to your ToolBox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I want to compile my LINQ->SQL classes into a DLL to provide to
I want to compile a c++ program to a dll and use it from
I have some class ( simple class ) and i want to compile in
I want to use MSVC compiler to build a DLL file. The problem is
I want to compile the Rigi source code but I get some error while
I want to create a custom control in C# which I will use multiple
I want to compile a project (with CruiseControl) not only if its source changes,
I want to derive a control from a derived user control but having problems
I want to compile a C# class using the command line in Visual Studio.
I have an application written in .NET 4.0 that i compile into a DLL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.