Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo
Create a paramter that will accept both Textbox and Richtextbox control and .NET (Saturday, September 04, 2004)
 

Found the following interesting discussion in the Newsgroups:

Create a paramter that will accept both Textbox and Richtextbox control
by:Anonymous

how can I make a parameter accept etiher richtextbox or textbox controls? currently My parameter is (ByVal txtBox as system.windows.form.textbox). This creates an error if the txtBox is of type RichTextBox.


 Reply:
by:Philip Rieck

 Make the parameter type "Control", then in the method, be sure to validate
that the type is correct... (Control will allow any winform control, like a
progressbar)


 Reply:
by:Anonymous

 Thanks :)



Posted by Xander Zelders



 
Previous Posts
    - Registering .dll from Windows Control Library and ...
    - Locating objects and .NET
    - MS Access Interop
    - Richtextbox vb.net 2003
    - User Control Events and .NET
    - Direct sound and .NET
    - Application Development Using C# and .NET
    - Introduction to C# Using .NET
    - Essential .NET, Volume I: The Common Language Runt...
    - Programming with Managed Extensions for Microsoft ...

Archives
    - 08/01/2004 - 08/08/2004
    - 08/08/2004 - 08/15/2004
    - 08/15/2004 - 08/22/2004
    - 08/22/2004 - 08/29/2004
    - 08/29/2004 - 09/05/2004
    - 09/05/2004 - 09/12/2004
    - 09/12/2004 - 09/19/2004
    - 09/19/2004 - 09/26/2004
    - 09/26/2004 - 10/03/2004
    - 10/03/2004 - 10/10/2004
    - 01/02/2005 - 01/09/2005
    - 01/09/2005 - 01/16/2005
    - 01/30/2005 - 02/06/2005
    - 01/01/2006 - 01/08/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland