Click here to Skip to main content
15,905,590 members
Home / Discussions / C#
   

C#

 
GeneralRe: Open-files-problem Pin
sreejith ss nair12-Aug-04 1:13
sreejith ss nair12-Aug-04 1:13 
GeneralRe: Open-files-problem Pin
Nick Parker11-Aug-04 9:33
protectorNick Parker11-Aug-04 9:33 
GeneralRe: Open-files-problem Pin
Member 80940911-Aug-04 10:25
Member 80940911-Aug-04 10:25 
GeneralRe: Open-files-problem Pin
Dave Kreskowiak11-Aug-04 10:44
mveDave Kreskowiak11-Aug-04 10:44 
GeneralRe: Open-files-problem Pin
Member 80940911-Aug-04 10:52
Member 80940911-Aug-04 10:52 
GeneralPlease try to help me.. Pin
sreejith ss nair12-Aug-04 2:27
sreejith ss nair12-Aug-04 2:27 
GeneralRe: Please try to help me.. Pin
Dave Kreskowiak12-Aug-04 12:57
mveDave Kreskowiak12-Aug-04 12:57 
GeneralWeird Build Problem Pin
Guinness4Strength11-Aug-04 5:47
Guinness4Strength11-Aug-04 5:47 
I've written my own control in which I use three enumerations to set friendly values to Desgin-time properties.
public enum CornerStyles
{
	Rounded,
	Square
}
public enum Orientations
{
	Vertical,
	Horizontal
}
public enum Poles
{
	Left,
	Right,
	Top,
	Bottom
}
[Description( "Set the shape of the control's corners")]
[Category( "ColorTrackBar" )]
public CornerStyles ControlCornerStyle
{
	set
	{
		this.cornerStyle=value;
		this.Invalidate();
	}
	get{return this.cornerStyle;}
}
/// <summary>
/// Set tracker bar orientation
/// </summary>
[Description( "Set whether the bar will be Veirtically or Horizontally oriented")]
[Category( "ColorTrackBar" )]
[RefreshProperties(RefreshProperties.All)]
public Orientations BarOrientation
{
	set
	{
		this.barOrientation = value;
		if(value==Orientations.Vertical)
			this.MaximumValueSide=Poles.Bottom;
		if(value==Orientations.Horizontal)
			this.MaximumValueSide=Poles.Right;
		base.Size=new Size(25,25);
		trackRect=Rectangle.Empty;
		this.Invalidate();
	}
	get{return this.barOrientation;}
}
/// <summary>
/// Set the poles of the trackbar
/// </summary>
[Description( "Select the side of the control to represent the maximum range value")]
[Category( "ColorTrackBar" )]
[RefreshProperties(RefreshProperties.All)]
public Poles MaximumValueSide
{
	get
	{
		return maxSide;
	}
	set
	{
		switch(barOrientation)
		{
			case Orientations.Horizontal:
				if(value==Poles.Top || value==Poles.Bottom)
				{
					throw new ArgumentException ("Since your Orientation is set to Horizontal, you can only select"+
								" Left or Right for this property");
				}
				break;
			case Orientations.Vertical:
				if(value==Poles.Left || value==Poles.Right)
				{
					throw new ArgumentException ("Since your Orientation is set to Vertical, you can only select"+
								" Top or Bottom for this property");
				}
				break;
		}
		maxSide=value;
		trackRect=Rectangle.Empty;
		this.Invalidate();
	}
}

When I add this control to a windows form and build it I get no build errors if VS.NET currently has a .CS file open.
But when I'm looking at the form designer window and build it I get three errors in the TaskList window of VS.NET
:
The variable 'CornerStyles' is either undeclared or was never assigned.
The variable 'Orientations' is either undeclared or was never assigned.
The variable 'Poles' is either undeclared or was never assigned.

The odd thing is that these errors only occur when I have the Designer window open, so I think it might have something to do with how I'm exposing/using the enums ? Anyone have any Ideas ?
GeneralString formatting problems Pin
moredip11-Aug-04 5:27
moredip11-Aug-04 5:27 
GeneralRe: String formatting problems Pin
sreejith ss nair11-Aug-04 7:33
sreejith ss nair11-Aug-04 7:33 
GeneralRe: String formatting problems Pin
moredip11-Aug-04 7:46
moredip11-Aug-04 7:46 
GeneralRe: String formatting problems Pin
sreejith ss nair11-Aug-04 8:01
sreejith ss nair11-Aug-04 8:01 
GeneralRe: String formatting problems Pin
moredip11-Aug-04 8:05
moredip11-Aug-04 8:05 
GeneralRe: String formatting problems Pin
moredip11-Aug-04 9:29
moredip11-Aug-04 9:29 
GeneralSafe version of unsafe code Pin
cheesepirate11-Aug-04 5:11
cheesepirate11-Aug-04 5:11 
GeneralRe: Safe version of unsafe code Pin
Mardawi11-Aug-04 10:04
Mardawi11-Aug-04 10:04 
GeneralRe: Safe version of unsafe code Pin
Anonymous11-Aug-04 10:56
Anonymous11-Aug-04 10:56 
QuestionRestricting Form-Moving to horizontal? Pin
jkersch11-Aug-04 4:17
jkersch11-Aug-04 4:17 
AnswerRe: Restricting Form-Moving to horizontal? Pin
Not Active11-Aug-04 4:58
mentorNot Active11-Aug-04 4:58 
GeneralRe: Restricting Form-Moving to horizontal? Pin
jkersch11-Aug-04 5:14
jkersch11-Aug-04 5:14 
GeneralXmlValidatingReader Pin
Not Active11-Aug-04 3:59
mentorNot Active11-Aug-04 3:59 
GeneralRe: XmlValidatingReader Pin
VenkatFor.NET11-Aug-04 7:28
VenkatFor.NET11-Aug-04 7:28 
GeneralRe: XmlValidatingReader Pin
Not Active12-Aug-04 3:57
mentorNot Active12-Aug-04 3:57 
QuestionDo you see the same results??? Pin
LongRange.Shooter11-Aug-04 3:13
LongRange.Shooter11-Aug-04 3:13 
AnswerRe: Do you see the same results??? Pin
Nick Parker11-Aug-04 4:16
protectorNick Parker11-Aug-04 4:16 

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.