Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to create a user control which doesnot show on windows form (like timer and background worker) but it will appear in a separate box under form's design.

What I have tried:

I dont have any idea about it so i tried nothing
Posted
Updated 11-Dec-17 17:35pm
v2
Comments
[no name] 11-Dec-17 12:55pm    
Looks like deriving you class from System.ComponentModel.Component should do the Job, but I'm not 100% sure about it

You create a class that inherits from Component
VB.NET
Imports System
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Windows.Forms.Design

    Public Class MyControl
        Inherits Component
.
.
.
    End Class

Then you implement your class properties and methods as required by the specific functionality you want.
 
Share this answer
 
v2
You could have tried Googling it - first result is
How to: Add Controls Without a User Interface to Windows Forms | Microsoft Docs[^]

[edit] - sorry, this isn't the answer you're looking for. My bad.
 
Share this answer
 
v2
Comments
Dave Kreskowiak 11-Dec-17 12:54pm    
He's asking how to create such a component, not use one.
A_Griffin 11-Dec-17 13:00pm    
Yes, sorry - my bad!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900