473,721 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2293
On Jan 9, 4:06 pm, Scott McNair
<smcn...@beache xpress.takethis partout.comwrot e:
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*****@beache xpress.takethis partout.comwrot e in message
news:Xn******** *************** ***********@207 .46.248.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*****@beache xpress.takethis partout.comwrot e:
>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*****@beache xpress.takethis partout.comschr ieb:
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.Compone ntModel.Compone nt'.

--
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
9309
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: "#Hello world" "@Hello word" "$Hello world" I'd like to replace the #, @, $ with invisible characters. These strings will be displayed in a windows datagrid cell.
2
2829
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 ) Johan
2
1964
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 even be rendered in the page at all. I can set them to invisible using javascript, but I don't want to do that because then their visibility isn't saved in the viewstate. Is there any way to make them invisible from the code-behind file in a way...
2
2736
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 there any way to stop this from happening? Its quite distracting. Thanks.
4
19762
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: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page...
8
7475
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 different steps(although that may get cluttered in the design environment) 2) Create multiple WinForms (don't really know any pros or cons of this method) 3) Use a tabbed page (although I don't want to see any tabs)
2
4767
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 send a specific user an email with a new "reset" password. I thought of including an invisible PasswordRecovery Control and initialize the "User Name" field. PasswordRecovery1.UserName = "zako";
1
2286
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 combine the "Edit" and "Display" funtions into this page. (It means if user want to edit the customer information, this page would provided editing page to the user; If the user want to display the customer information, this page would providev the...
0
1226
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 "layer" is completely invisible. But I can press the mouse on it and that is the problem. I want to "grab through" this invisible frame and use controls of applications behind. For example I want to use the scroll bars of the internet explorer behind...
0
8730
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9215
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9131
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.