Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
| Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 22nd, 2005, 01:32 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default Convert Label to TextBox

How to convert a textbox to label or vice versa ?

  #2 (permalink)  
Old February 24th, 2005, 01:38 AM
Friend of Wrox
 
Join Date: Dec 2004
Location: Chennai, Tamil nadu, India.
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Can you explain what exactly you want to achieve by doing this?

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
  #3 (permalink)  
Old February 24th, 2005, 12:02 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

nothing special i want to achieve by doing this.
i was asked this question in an interview.
so if anybody knows this, plz tell me

thnx

Ashu

  #4 (permalink)  
Old February 25th, 2005, 06:57 AM
Friend of Wrox
 
Join Date: Sep 2004
Location: , , India.
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if u set a textbox as readonly then its more like a label

  #5 (permalink)  
Old February 25th, 2005, 10:20 PM
Registered User
 
Join Date: Feb 2005
Location: , , Vietnam.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Mial
Default

i think that isn't a answer.
Anyone knows about that. Tell me, please :)

Mial Pham
  #6 (permalink)  
Old March 1st, 2005, 08:21 AM
Friend of Wrox
 
Join Date: Sep 2004
Location: , , India.
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes but how can u change i compleetly to a label as Label is derived from System.Windows.Form.Label And U Cannot Change it.... so in this senario i felt that this is the only answer

  #7 (permalink)  
Old March 6th, 2005, 11:09 PM
Registered User
 
Join Date: Feb 2005
Location: , , Vietnam.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Mial
Default

:( I don't know have answer for that question????
But if u answer this then can u to convert label to textbox???

Mial Pham
  #8 (permalink)  
Old March 8th, 2005, 01:13 PM
Friend of Wrox
 
Join Date: Feb 2004
Location: Bangalore, Karnataka, India.
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think basically you need to change the following properties

BorderStyle = None
ForeColor = Menu
ReadOnly = true

The first 2 gives the look of label and 3rd gives the exact working of label box.



It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
  #9 (permalink)  
Old March 17th, 2005, 09:39 AM
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
   You can not convert.
   Because both of these are objects have some data, methods and properties which are different with respect to each other.

Bye

hope it help...

  #10 (permalink)  
Old March 17th, 2005, 11:15 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

Actually i was asked this question in an interview.
So thr must an answer to it

Thnx





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to see a label hombre Java Basics 3 March 4th, 2008 06:15 AM
pointing cursor from one textbox to other textbox lakshmi_annayappa ASP.NET 1.0 and 1.1 Basics 2 August 2nd, 2007 03:41 PM
Convert textbox to picture vemaju Word VBA 0 February 3rd, 2007 08:04 AM
how to access label or textbox in crystalreport howru_sweety Crystal Reports 0 February 27th, 2006 02:44 AM
Masked TextBox & formatting TextBox melvik C# 1 September 22nd, 2003 11:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.