Click here to Skip to main content
15,922,015 members
Home / Discussions / C#
   

C#

 
GeneralPrinter Properties Dialog Pin
Werdna11-Aug-04 11:07
Werdna11-Aug-04 11:07 
Questionhow to jump from 'for' statment Pin
Adel83k11-Aug-04 10:26
Adel83k11-Aug-04 10:26 
AnswerRe: how to jump from 'for' statment Pin
Michael P Butler11-Aug-04 10:51
Michael P Butler11-Aug-04 10:51 
GeneralRe: how to jump from 'for' statment Pin
Nick Parker11-Aug-04 11:14
protectorNick Parker11-Aug-04 11:14 
GeneralOpen-files-problem Pin
Member 80940911-Aug-04 7:57
Member 80940911-Aug-04 7:57 
GeneralRe: Open-files-problem Pin
sreejith ss nair11-Aug-04 8:22
sreejith ss nair11-Aug-04 8:22 
GeneralRe: Open-files-problem Pin
Nick Parker11-Aug-04 9:36
protectorNick Parker11-Aug-04 9:36 
GeneralRe: Open-files-problem Pin
Member 80940911-Aug-04 10:14
Member 80940911-Aug-04 10:14 
GeneralRe: Open-files-problem Pin
Dave Kreskowiak11-Aug-04 10:39
mveDave Kreskowiak11-Aug-04 10:39 
GeneralRe: Open-files-problem Pin
sreejith ss nair11-Aug-04 16:52
sreejith ss nair11-Aug-04 16:52 
GeneralRe: Open-files-problem Pin
Dave Kreskowiak12-Aug-04 0:24
mveDave Kreskowiak12-Aug-04 0:24 
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 

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.