Click here to Skip to main content
15,886,840 members
Home / Discussions / C#
   

C#

 
AnswerRe: Poor company - do we need an obfuscator? Pin
leppie29-Nov-05 22:25
leppie29-Nov-05 22:25 
AnswerRe: Poor company - do we need an obfuscator? Pin
Rob Philpott30-Nov-05 1:12
Rob Philpott30-Nov-05 1:12 
GeneralRe: Poor company - do we need an obfuscator? Pin
leppie30-Nov-05 3:33
leppie30-Nov-05 3:33 
QuestionTransaction Rollback timeout Pin
Mark DeVol29-Nov-05 12:51
Mark DeVol29-Nov-05 12:51 
AnswerRe: Transaction Rollback timeout Pin
rakesh_nits29-Nov-05 23:55
rakesh_nits29-Nov-05 23:55 
QuestionOverriding the Label.CanSelect property Pin
AnneThorne29-Nov-05 12:39
AnneThorne29-Nov-05 12:39 
AnswerRe: Overriding the Label.CanSelect property Pin
Dave Kreskowiak30-Nov-05 5:56
mveDave Kreskowiak30-Nov-05 5:56 
GeneralRe: Overriding the Label.CanSelect property Pin
AnneThorne30-Nov-05 6:02
AnneThorne30-Nov-05 6:02 
Thank you so much for your response, Dave.

Sorry for being so dumb...

Here is the inherited label we want selectable, could you show me how I would do it:

Thanks for any help you can give.
Anne
<br />
using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Drawing;<br />
using System.Data;<br />
using System.Windows.Forms;<br />
using System.Configuration;<br />
<br />
namespace Arb.Controls.Win<br />
{<br />
		/// <summary><br />
		/// Summary description for arbTextLabel.<br />
		/// </summary><br />
		public class arbTextLabel : System.Windows.Forms.Label<br />
		{<br />
			/// <summary> <br />
			/// Required designer variable.<br />
			/// </summary><br />
			private System.ComponentModel.Container components = null;<br />
<br />
			public arbTextLabel()<br />
			{<br />
				// This call is required by the Windows.Forms Form Designer.<br />
				InitializeComponent();<br />
<br />
				// TODO: Add any initialization after the InitializeComponent call<br />
<br />
			}<br />
<br />
			/// <summary> <br />
			/// Clean up any resources being used.<br />
			/// </summary><br />
			protected override void Dispose( bool disposing )<br />
			{<br />
				if( disposing )<br />
				{<br />
					if(components != null)<br />
					{<br />
						components.Dispose();<br />
					}<br />
				}<br />
				base.Dispose( disposing );<br />
			}<br />
<br />
			#region Component Designer generated code<br />
			/// <summary> <br />
			/// Required method for Designer support - do not modify <br />
			/// the contents of this method with the code editor.<br />
			/// </summary><br />
			private void InitializeComponent()<br />
			{<br />
				components = new System.ComponentModel.Container();<br />
			}<br />
			#endregion<br />
			public override Font Font<br />
			{<br />
				get<br />
				{<br />
					return getFont();<br />
				}<br />
			}<br />
<br />
			public override Color ForeColor<br />
			{<br />
				get<br />
				{<br />
					return getForeColor();<br />
				}<br />
			}<br />
<br />
	<br />
<br />
			public  Font getFont()<br />
			{<br />
				string N = ConfigurationSettings.AppSettings["TextLabelFontName"];<br />
				string S = ConfigurationSettings.AppSettings["TextLabelFontSize"];<br />
				string FS = ConfigurationSettings.AppSettings["TextLabelFontStyle"];<br />
				string GU = ConfigurationSettings.AppSettings["TextLabelFontGraphicUnit"];<br />
				string GRI = ConfigurationSettings.AppSettings["TextLabelFontGRI"];<br />
<br />
				N	= (N==null)?"Verdana":N;<br />
				S	= (S==null)?"9":S;<br />
				FS	= (FS==null)?"Regular":FS;<br />
				GU	= (GU==null)?"Point":GU;<br />
				GRI	= (GRI==null)?"0":GRI;<br />
			<br />
				return new System.Drawing.Font(N,(float)(Convert.ToDouble(S)),Helper.getFontStyle(FS),Helper.getGraphicUnit(GU),Convert.ToByte(GRI));<br />
			}<br />
<br />
			public  Color getForeColor()<br />
			{<br />
				string r = ConfigurationSettings.AppSettings["TextLabelForeColorR"];<br />
				string g = ConfigurationSettings.AppSettings["TextLabelForeColorG"];<br />
				string b = ConfigurationSettings.AppSettings["TextLabelForeColorB"];<br />
<br />
				r = (r==null)?"0":r;<br />
				g = (g==null)?"0":g;<br />
				b = (b==null)?"0":b;<br />
<br />
				return System.Drawing.Color.FromArgb(Convert.ToByte(r),Convert.ToByte(g),Convert.ToByte(b));<br />
			}<br />
		}<br />
	}<br />
<br />
<br />

GeneralRe: Overriding the Label.CanSelect property Pin
Dave Kreskowiak30-Nov-05 11:00
mveDave Kreskowiak30-Nov-05 11:00 
GeneralRe: Overriding the Label.CanSelect property Pin
AnneThorne30-Nov-05 11:07
AnneThorne30-Nov-05 11:07 
Questioncalling win32 dll in C# Pin
Manu_8129-Nov-05 11:51
Manu_8129-Nov-05 11:51 
AnswerRe: calling win32 dll in C# Pin
Mark DeVol29-Nov-05 12:46
Mark DeVol29-Nov-05 12:46 
GeneralRe: calling win32 dll in C# Pin
mikanu29-Nov-05 20:06
mikanu29-Nov-05 20:06 
QuestionQLMySQL Concurrency Violation Pin
Elvis_Pretzelator29-Nov-05 11:50
Elvis_Pretzelator29-Nov-05 11:50 
QuestionHow can i do a mouseover event for an asp object? Pin
Anthony Mushrow29-Nov-05 11:41
professionalAnthony Mushrow29-Nov-05 11:41 
AnswerRe: How can i do a mouseover event for an asp object? Pin
Dave Kreskowiak30-Nov-05 5:43
mveDave Kreskowiak30-Nov-05 5:43 
Questiondisposal of a homemade object Pin
melanieab29-Nov-05 10:35
melanieab29-Nov-05 10:35 
AnswerRe: disposal of a homemade object Pin
Dan Neely29-Nov-05 10:38
Dan Neely29-Nov-05 10:38 
GeneralRe: disposal of a homemade object Pin
melanieab29-Nov-05 11:14
melanieab29-Nov-05 11:14 
GeneralRe: disposal of a homemade object Pin
Dan Neely30-Nov-05 2:05
Dan Neely30-Nov-05 2:05 
Questionnetwork problem please help!!! Pin
snouto29-Nov-05 10:14
snouto29-Nov-05 10:14 
AnswerRe: network problem please help!!! Pin
mcljava29-Nov-05 12:33
mcljava29-Nov-05 12:33 
GeneralRe: network problem please help!!! Pin
snouto29-Nov-05 23:06
snouto29-Nov-05 23:06 
QuestionBack Button ASP.NET Pin
TheMajorRager29-Nov-05 10:02
TheMajorRager29-Nov-05 10:02 
QuestionCrystal Report setup problem Pin
sasan5629-Nov-05 9:56
sasan5629-Nov-05 9:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.