473,396 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Creating an "invisible" user control

Hi,

I'm creating a user control that has absolutely no visual pieces to it...
it's essentially a piece that sniffs a serial port awaiting incoming data.
I know that there are several controls that come natively with .NET that
don't actually reside on the form, but go to the bottom area, such as for
example database-related controls. How would I go about setting my own
control to do just that? Otherwise I'm left with the quandary of either
having the control be lost on the form (since there's no visual clues) or
having to put a graphic on it and then mark it as not visible.

Cheers,
Scott
Jan 9 '08 #1
4 2275
On Jan 9, 4:06 pm, Scott McNair
<smcn...@beachexpress.takethispartout.comwrote:
Hi,

I'm creating a user control that has absolutely no visual pieces to it...
it's essentially a piece that sniffs a serial port awaiting incoming data.
I know that there are several controls that come natively with .NET that
don't actually reside on the form, but go to the bottom area, such as for
example database-related controls. How would I go about setting my own
control to do just that? Otherwise I'm left with the quandary of either
having the control be lost on the form (since there's no visual clues) or
having to put a graphic on it and then mark it as not visible.

Cheers,
Scott
I believe you need to just create a Component, they reside in the bar
at the bottom of the form designer.

Thanks,

Seth Rowe [MVP]
Jan 9 '08 #2

"Scott McNair" <sm*****@beachexpress.takethispartout.comwrote in message
news:Xn**********************************@207.46.2 48.16...
Hi,

I'm creating a user control that has absolutely no visual pieces to it...
it's essentially a piece that sniffs a serial port awaiting incoming data.
I know that there are several controls that come natively with .NET that
don't actually reside on the form, but go to the bottom area, such as for
example database-related controls. How would I go about setting my own
control to do just that? Otherwise I'm left with the quandary of either
having the control be lost on the form (since there's no visual clues) or
having to put a graphic on it and then mark it as not visible.

Cheers,
Scott
Scott,
Since the "control" has no visible piece why is it a control? I think
you can think of a control as a class which in most cases is visible. You
can create the class for you work and then simply have it as a variable
within the form it is used in. If you are doing this to capture events you
can still capture events using AddHandler or the WithEvents keyword in the
declaration of the variable.

Hope this helps
Lloyd Sheen

Jan 9 '08 #3
On Wed, 09 Jan 2008 13:06:00 -0800, Scott McNair
<sm*****@beachexpress.takethispartout.comwrote:
>Hi,

I'm creating a user control that has absolutely no visual pieces to it...
it's essentially a piece that sniffs a serial port awaiting incoming data.
I know that there are several controls that come natively with .NET that
don't actually reside on the form, but go to the bottom area, such as for
example database-related controls. How would I go about setting my own
control to do just that? Otherwise I'm left with the quandary of either
having the control be lost on the form (since there's no visual clues) or
having to put a graphic on it and then mark it as not visible.

Cheers,
Scott
A class derived from Component resides below the visual area in the
designer.

If you don't need to set properties at design time, why not just make
it be a plain class that is instantiated at runtime?
Jan 9 '08 #4
"Scott McNair" <sm*****@beachexpress.takethispartout.comschrieb :
I'm creating a user control that has absolutely no visual pieces to it...
it's essentially a piece that sniffs a serial port awaiting incoming data.
I know that there are several controls that come natively with .NET that
don't actually reside on the form, but go to the bottom area
"Project" -"Add new item..." -"Component" (translated from the German
version of VS 2005).

Components, which reside in the components tray of the Windows Forms editor,
are classes which are derived from 'System.ComponentModel.Component'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 9 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: VM | last post by:
If I have three exact strings composed of "Hello world", what 'invisible' char could I add to the string so I can distinguish between them? With visible characters, it'd look something like this: ...
2
by: Sagaert Johan | last post by:
Hi Can someone point me to a resource or explain in brief how te create a component that i can add to the toolbox tab, but that is not positioned on the form . (like the Timer component ) ...
2
by: john | last post by:
I have some controls that I want to be invisible, but if the user does something, they will become visible using javascript. So I can't set its "visible" property to false, because then they won't...
2
by: Robin Tucker | last post by:
Hiya, I'm giving my vertical scrollbar the focus so it can handle mousewheel events. When I give it the focus with ScrollBar.Focus(), it starts flashing (at least the drag bar does). Is...
4
by: Amil | last post by:
I've upgraded to VS 2005. I have a page that contains no submit buttons...it merely shows some data. But, several times a day (out of thousands of hits), I get this error: ...
8
by: redeagle | last post by:
I'm wondering what the best practice is for creating a WinApp "wizard" that contains 4 or 5 "steps". Options so far are 1) Single WinForm making various controls visible/non visible at the...
2
by: Ofer | last post by:
Hi, We use the ASP.net loginControls and the DB schema. How to programmatically activate the "PasswordRecovery" of a specific end-user when a user clicks my web application's button? I need to...
1
by: Benny Ng | last post by:
Dear All, Now I met one problem in the development of my one application. I have one ASP.NET page. It's for disply the information of customer. But now I have one new requirement. It's to...
0
by: harkon | last post by:
Hi everybody! I'm just wondering what it would take to make the following: I have an invisible C# frame (opacity 0%) topmost placed, with no control boxes and even no border. Therefore this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.