Problem: Custom control not drawing on Form from Designer.

B

Brian McVay

Hi all,

I have created a custom textbox control using VS2003 C# to use in a VB.NET
CF project. In an application test for the desktop the control works just
fine (although some polishing is still needed) , however, for an application
targeted for the Smart Device Application the control does not draw onto the
form at design time.

I have followed the rules inside of the .NET help for compiling the design
time control using the command line compiler and have successfully added it
to the VB.NET toolbar for Smart Device Application in the Designer... but
the designer simply does nothing when the control is selected to add to a
form.

Can anyone provide any feedback on what I am not doing or what I am doing
wrong?

I have provided the control code below for what I currently have.

Thanks in advance.

Brian

-----
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace ABCTextBoxControl
{
/// <summary>
/// Summary description for ABCTextBoxControl.
/// Derived and overridden textbox control to restrict key entry based on
property settings.
/// </summary>
#if NETCFDESIGNTIME

[ToolboxItemFilter("NETCF",ToolboxItemFilterType.Allow),

ToolboxItemFilter("System.CF.Windows.Forms", ToolboxItemFilterType.Custom)]

#endif
public class ABCTextBox : System.Windows.Forms.TextBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ABCTextBox()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();

// TODO: Add any initialization after the InitComponent call
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
}

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{

}
#endregion

protected override void OnPaint(PaintEventArgs pe)
{
// TODO: Add custom paint code here

// Calling the base class OnPaint
base.OnPaint(pe);
}

private char[] SpecialCharacters;
public char[] AllowSpecialCharacters
{
set { SpecialCharacters = value;
ArrayIsSortedSet = false;
}
get { return SpecialCharacters;}
}

private bool NumericOnlySet = false;
public bool NumericOnly
{
get {return NumericOnlySet;}
set {NumericOnlySet = value;}
}

private bool AllowNumericSet = true;
public bool AllowNumeric
{
get {return AllowNumericSet;}
set {AllowNumericSet = value;}
}

private bool ArrayIsSortedSet = false;

private bool ArrayIsSorted
{
get {return ArrayIsSortedSet;}
set {ArrayIsSortedSet = value;}
}

private bool RestrictToAllowedSet = false;
public bool RestrictToAllowed
{
get {return RestrictToAllowedSet;}
set {RestrictToAllowedSet = value;}
}

private bool IsNumericOnly ()
{
try
{
string testString = this.Text;
int testParse = Int32.Parse(testString);
return true;
}
catch (Exception e)
{
string holdmessage = e.ToString();
return false;
}
}

private bool myIsNumber (char myChar)
{
return char.IsDigit(myChar);
}
private bool myIsLetter (char myChar)
{
return char.IsLetter(myChar);
}
private bool myIsControl (char myChar)
{
return char.IsControl(myChar);
}

private bool ValidateTextString (string myString)
{
int myLength;
char mySearch;
bool myReturnValue = true;

myLength = myString.Length;
for (int myCounter = 1; myCounter <= myLength; myCounter++)
{
mySearch = Convert.ToChar(myString.Substring(myCounter, 1));
myReturnValue = ValidateThisCharacter(mySearch);
if (myReturnValue == false) break;
}
return myReturnValue;
}

private bool ValidateThisCharacter (char myChar)
{
int intFoundValue;
bool myReturnValue = false;

if (!RestrictToAllowed)
{
if (myIsNumber(myChar))
{
if (AllowNumeric) return true;
}
if (myIsLetter(myChar))
{
if (!NumericOnly) return true;
}
}

if (myIsControl(myChar)) return true;

if (ArrayIsSorted == false)
{
SortArray(SpecialCharacters);
}
intFoundValue = Array.BinarySearch( SpecialCharacters, myChar );
if (intFoundValue >= 0)
{
myReturnValue = Comparer.Equals(myChar,
SpecialCharacters[intFoundValue]);
}
return myReturnValue;
}

public void AddText(string strToAdd) // Add the passed text to this
textbox which could come from numerous sources, methods, or events
{
int intHoldSelectionStart = 0;
intHoldSelectionStart = this.SelectionStart;

try
{
if (this.Text.Length < this.MaxLength)
{
if (ValidateTextString(strToAdd))
{
this.SelectedText = strToAdd;
this.SelectionStart = intHoldSelectionStart + strToAdd.Length;
this.SelectionLength = 0;
this.Focus();
}
}
}
catch (Exception e)
{
string holdmessage = e.ToString(); // TBD
}
}

protected override void OnKeyPress (
System.Windows.Forms.KeyPressEventArgs e )
{
if (!ValidateThisCharacter(e.KeyChar))
{
e.Handled = true;
}
}

private void SortArray (Array myArray)
{
Array.Sort(myArray);
ArrayIsSorted =true;
}

}
}
 
T

Tim Wilson

I don't see a RuntimeAssemblyAttribute in your code. See the link below for
information on this attribute.
http://msdn.microsoft.com/library/d..._evtuv/html/etconcustomcontroldevelopment.asp

--
Tim Wilson
..Net Compact Framework MVP

Brian McVay said:
Hi all,

I have created a custom textbox control using VS2003 C# to use in a VB.NET
CF project. In an application test for the desktop the control works just
fine (although some polishing is still needed) , however, for an application
targeted for the Smart Device Application the control does not draw onto the
form at design time.

I have followed the rules inside of the .NET help for compiling the design
time control using the command line compiler and have successfully added it
to the VB.NET toolbar for Smart Device Application in the Designer... but
the designer simply does nothing when the control is selected to add to a
form.

Can anyone provide any feedback on what I am not doing or what I am doing
wrong?

I have provided the control code below for what I currently have.

Thanks in advance.

Brian

-----
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace ABCTextBoxControl
{
/// <summary>
/// Summary description for ABCTextBoxControl.
/// Derived and overridden textbox control to restrict key entry based on
property settings.
/// </summary>
#if NETCFDESIGNTIME

[ToolboxItemFilter("NETCF",ToolboxItemFilterType.Allow),

ToolboxItemFilter("System.CF.Windows.Forms", ToolboxItemFilterType.Custom)]

#endif
public class ABCTextBox : System.Windows.Forms.TextBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ABCTextBox()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();

// TODO: Add any initialization after the InitComponent call
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
}

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{

}
#endregion

protected override void OnPaint(PaintEventArgs pe)
{
// TODO: Add custom paint code here

// Calling the base class OnPaint
base.OnPaint(pe);
}

private char[] SpecialCharacters;
public char[] AllowSpecialCharacters
{
set { SpecialCharacters = value;
ArrayIsSortedSet = false;
}
get { return SpecialCharacters;}
}

private bool NumericOnlySet = false;
public bool NumericOnly
{
get {return NumericOnlySet;}
set {NumericOnlySet = value;}
}

private bool AllowNumericSet = true;
public bool AllowNumeric
{
get {return AllowNumericSet;}
set {AllowNumericSet = value;}
}

private bool ArrayIsSortedSet = false;

private bool ArrayIsSorted
{
get {return ArrayIsSortedSet;}
set {ArrayIsSortedSet = value;}
}

private bool RestrictToAllowedSet = false;
public bool RestrictToAllowed
{
get {return RestrictToAllowedSet;}
set {RestrictToAllowedSet = value;}
}

private bool IsNumericOnly ()
{
try
{
string testString = this.Text;
int testParse = Int32.Parse(testString);
return true;
}
catch (Exception e)
{
string holdmessage = e.ToString();
return false;
}
}

private bool myIsNumber (char myChar)
{
return char.IsDigit(myChar);
}
private bool myIsLetter (char myChar)
{
return char.IsLetter(myChar);
}
private bool myIsControl (char myChar)
{
return char.IsControl(myChar);
}

private bool ValidateTextString (string myString)
{
int myLength;
char mySearch;
bool myReturnValue = true;

myLength = myString.Length;
for (int myCounter = 1; myCounter <= myLength; myCounter++)
{
mySearch = Convert.ToChar(myString.Substring(myCounter, 1));
myReturnValue = ValidateThisCharacter(mySearch);
if (myReturnValue == false) break;
}
return myReturnValue;
}

private bool ValidateThisCharacter (char myChar)
{
int intFoundValue;
bool myReturnValue = false;

if (!RestrictToAllowed)
{
if (myIsNumber(myChar))
{
if (AllowNumeric) return true;
}
if (myIsLetter(myChar))
{
if (!NumericOnly) return true;
}
}

if (myIsControl(myChar)) return true;

if (ArrayIsSorted == false)
{
SortArray(SpecialCharacters);
}
intFoundValue = Array.BinarySearch( SpecialCharacters, myChar );
if (intFoundValue >= 0)
{
myReturnValue = Comparer.Equals(myChar,
SpecialCharacters[intFoundValue]);
}
return myReturnValue;
}

public void AddText(string strToAdd) // Add the passed text to this
textbox which could come from numerous sources, methods, or events
{
int intHoldSelectionStart = 0;
intHoldSelectionStart = this.SelectionStart;

try
{
if (this.Text.Length < this.MaxLength)
{
if (ValidateTextString(strToAdd))
{
this.SelectedText = strToAdd;
this.SelectionStart = intHoldSelectionStart + strToAdd.Length;
this.SelectionLength = 0;
this.Focus();
}
}
}
catch (Exception e)
{
string holdmessage = e.ToString(); // TBD
}
}

protected override void OnKeyPress (
System.Windows.Forms.KeyPressEventArgs e )
{
if (!ValidateThisCharacter(e.KeyChar))
{
e.Handled = true;
}
}

private void SortArray (Array myArray)
{
Array.Sort(myArray);
ArrayIsSorted =true;
}

}
}
 
B

Brian McVay

Too true!

I read the entire article and placed the missing attribute before the
namespace, recompiled both the runtime and the designtime components as it
said. Went back into my application and removed the references and re-added
the new references. However, the control still will not add to the form at
design time.
Any idea what i might still be missing?

#if NETCFDESIGNTIME
[assembly: System.CF.Design.RuntimeAssemblyAttribute("ABCTextBoxControl,
Version=1.0.1922.24823, Culture=neutral, PublicKeyToken=null")]
#endif


Brian

Tim Wilson said:
I don't see a RuntimeAssemblyAttribute in your code. See the link below for
information on this attribute.
http://msdn.microsoft.com/library/d..._evtuv/html/etconcustomcontroldevelopment.asp

--
Tim Wilson
.Net Compact Framework MVP

Brian McVay said:
Hi all,

I have created a custom textbox control using VS2003 C# to use in a
VB.NET
CF project. In an application test for the desktop the control works just
fine (although some polishing is still needed) , however, for an application
targeted for the Smart Device Application the control does not draw onto the
form at design time.

I have followed the rules inside of the .NET help for compiling the
design
time control using the command line compiler and have successfully added it
to the VB.NET toolbar for Smart Device Application in the Designer... but
the designer simply does nothing when the control is selected to add to a
form.

Can anyone provide any feedback on what I am not doing or what I am doing
wrong?

I have provided the control code below for what I currently have.

Thanks in advance.

Brian

-----
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace ABCTextBoxControl
{
/// <summary>
/// Summary description for ABCTextBoxControl.
/// Derived and overridden textbox control to restrict key entry based
on
property settings.
/// </summary>
#if NETCFDESIGNTIME

[ToolboxItemFilter("NETCF",ToolboxItemFilterType.Allow),

ToolboxItemFilter("System.CF.Windows.Forms", ToolboxItemFilterType.Custom)]

#endif
public class ABCTextBox : System.Windows.Forms.TextBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ABCTextBox()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();

// TODO: Add any initialization after the InitComponent call
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
}

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{

}
#endregion

protected override void OnPaint(PaintEventArgs pe)
{
// TODO: Add custom paint code here

// Calling the base class OnPaint
base.OnPaint(pe);
}

private char[] SpecialCharacters;
public char[] AllowSpecialCharacters
{
set { SpecialCharacters = value;
ArrayIsSortedSet = false;
}
get { return SpecialCharacters;}
}

private bool NumericOnlySet = false;
public bool NumericOnly
{
get {return NumericOnlySet;}
set {NumericOnlySet = value;}
}

private bool AllowNumericSet = true;
public bool AllowNumeric
{
get {return AllowNumericSet;}
set {AllowNumericSet = value;}
}

private bool ArrayIsSortedSet = false;

private bool ArrayIsSorted
{
get {return ArrayIsSortedSet;}
set {ArrayIsSortedSet = value;}
}

private bool RestrictToAllowedSet = false;
public bool RestrictToAllowed
{
get {return RestrictToAllowedSet;}
set {RestrictToAllowedSet = value;}
}

private bool IsNumericOnly ()
{
try
{
string testString = this.Text;
int testParse = Int32.Parse(testString);
return true;
}
catch (Exception e)
{
string holdmessage = e.ToString();
return false;
}
}

private bool myIsNumber (char myChar)
{
return char.IsDigit(myChar);
}
private bool myIsLetter (char myChar)
{
return char.IsLetter(myChar);
}
private bool myIsControl (char myChar)
{
return char.IsControl(myChar);
}

private bool ValidateTextString (string myString)
{
int myLength;
char mySearch;
bool myReturnValue = true;

myLength = myString.Length;
for (int myCounter = 1; myCounter <= myLength; myCounter++)
{
mySearch = Convert.ToChar(myString.Substring(myCounter, 1));
myReturnValue = ValidateThisCharacter(mySearch);
if (myReturnValue == false) break;
}
return myReturnValue;
}

private bool ValidateThisCharacter (char myChar)
{
int intFoundValue;
bool myReturnValue = false;

if (!RestrictToAllowed)
{
if (myIsNumber(myChar))
{
if (AllowNumeric) return true;
}
if (myIsLetter(myChar))
{
if (!NumericOnly) return true;
}
}

if (myIsControl(myChar)) return true;

if (ArrayIsSorted == false)
{
SortArray(SpecialCharacters);
}
intFoundValue = Array.BinarySearch( SpecialCharacters, myChar );
if (intFoundValue >= 0)
{
myReturnValue = Comparer.Equals(myChar,
SpecialCharacters[intFoundValue]);
}
return myReturnValue;
}

public void AddText(string strToAdd) // Add the passed text to this
textbox which could come from numerous sources, methods, or events
{
int intHoldSelectionStart = 0;
intHoldSelectionStart = this.SelectionStart;

try
{
if (this.Text.Length < this.MaxLength)
{
if (ValidateTextString(strToAdd))
{
this.SelectedText = strToAdd;
this.SelectionStart = intHoldSelectionStart + strToAdd.Length;
this.SelectionLength = 0;
this.Focus();
}
}
}
catch (Exception e)
{
string holdmessage = e.ToString(); // TBD
}
}

protected override void OnKeyPress (
System.Windows.Forms.KeyPressEventArgs e )
{
if (!ValidateThisCharacter(e.KeyChar))
{
e.Handled = true;
}
}

private void SortArray (Array myArray)
{
Array.Sort(myArray);
ArrayIsSorted =true;
}

}
}
 
T

Tim Wilson

This might sound odd, but are you sure that you're working in a device
project? I assume that the code that you initially posted compiles fine for
you... but it didn't even compile for me. It looks like you're trying to use
the static Equals method on the Comparer class that takes two arguments. The
only Equals method overload that is supported is the one that takes a single
argument. Could that be your problem?

myReturnValue = Comparer.Equals(myChar, SpecialCharacters[intFoundValue]);

--
Tim Wilson
..Net Compact Framework MVP

Brian McVay said:
Too true!

I read the entire article and placed the missing attribute before the
namespace, recompiled both the runtime and the designtime components as it
said. Went back into my application and removed the references and re-added
the new references. However, the control still will not add to the form at
design time.
Any idea what i might still be missing?

#if NETCFDESIGNTIME
[assembly: System.CF.Design.RuntimeAssemblyAttribute("ABCTextBoxControl,
Version=1.0.1922.24823, Culture=neutral, PublicKeyToken=null")]
#endif


Brian

Tim Wilson said:
I don't see a RuntimeAssemblyAttribute in your code. See the link below for
information on this attribute.
http://msdn.microsoft.com/library/d..._evtuv/html/etconcustomcontroldevelopment.asp

--
Tim Wilson
.Net Compact Framework MVP

Brian McVay said:
Hi all,

I have created a custom textbox control using VS2003 C# to use in a
VB.NET
CF project. In an application test for the desktop the control works just
fine (although some polishing is still needed) , however, for an application
targeted for the Smart Device Application the control does not draw
onto
the
form at design time.

I have followed the rules inside of the .NET help for compiling the
design
time control using the command line compiler and have successfully
added
it
to the VB.NET toolbar for Smart Device Application in the Designer... but
the designer simply does nothing when the control is selected to add to a
form.

Can anyone provide any feedback on what I am not doing or what I am doing
wrong?

I have provided the control code below for what I currently have.

Thanks in advance.

Brian

-----
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace ABCTextBoxControl
{
/// <summary>
/// Summary description for ABCTextBoxControl.
/// Derived and overridden textbox control to restrict key entry based
on
property settings.
/// </summary>
#if NETCFDESIGNTIME

[ToolboxItemFilter("NETCF",ToolboxItemFilterType.Allow),

ToolboxItemFilter("System.CF.Windows.Forms", ToolboxItemFilterType.Custom)]

#endif
public class ABCTextBox : System.Windows.Forms.TextBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ABCTextBox()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();

// TODO: Add any initialization after the InitComponent call
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
}

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{

}
#endregion

protected override void OnPaint(PaintEventArgs pe)
{
// TODO: Add custom paint code here

// Calling the base class OnPaint
base.OnPaint(pe);
}

private char[] SpecialCharacters;
public char[] AllowSpecialCharacters
{
set { SpecialCharacters = value;
ArrayIsSortedSet = false;
}
get { return SpecialCharacters;}
}

private bool NumericOnlySet = false;
public bool NumericOnly
{
get {return NumericOnlySet;}
set {NumericOnlySet = value;}
}

private bool AllowNumericSet = true;
public bool AllowNumeric
{
get {return AllowNumericSet;}
set {AllowNumericSet = value;}
}

private bool ArrayIsSortedSet = false;

private bool ArrayIsSorted
{
get {return ArrayIsSortedSet;}
set {ArrayIsSortedSet = value;}
}

private bool RestrictToAllowedSet = false;
public bool RestrictToAllowed
{
get {return RestrictToAllowedSet;}
set {RestrictToAllowedSet = value;}
}

private bool IsNumericOnly ()
{
try
{
string testString = this.Text;
int testParse = Int32.Parse(testString);
return true;
}
catch (Exception e)
{
string holdmessage = e.ToString();
return false;
}
}

private bool myIsNumber (char myChar)
{
return char.IsDigit(myChar);
}
private bool myIsLetter (char myChar)
{
return char.IsLetter(myChar);
}
private bool myIsControl (char myChar)
{
return char.IsControl(myChar);
}

private bool ValidateTextString (string myString)
{
int myLength;
char mySearch;
bool myReturnValue = true;

myLength = myString.Length;
for (int myCounter = 1; myCounter <= myLength; myCounter++)
{
mySearch = Convert.ToChar(myString.Substring(myCounter, 1));
myReturnValue = ValidateThisCharacter(mySearch);
if (myReturnValue == false) break;
}
return myReturnValue;
}

private bool ValidateThisCharacter (char myChar)
{
int intFoundValue;
bool myReturnValue = false;

if (!RestrictToAllowed)
{
if (myIsNumber(myChar))
{
if (AllowNumeric) return true;
}
if (myIsLetter(myChar))
{
if (!NumericOnly) return true;
}
}

if (myIsControl(myChar)) return true;

if (ArrayIsSorted == false)
{
SortArray(SpecialCharacters);
}
intFoundValue = Array.BinarySearch( SpecialCharacters, myChar );
if (intFoundValue >= 0)
{
myReturnValue = Comparer.Equals(myChar,
SpecialCharacters[intFoundValue]);
}
return myReturnValue;
}

public void AddText(string strToAdd) // Add the passed text to this
textbox which could come from numerous sources, methods, or events
{
int intHoldSelectionStart = 0;
intHoldSelectionStart = this.SelectionStart;

try
{
if (this.Text.Length < this.MaxLength)
{
if (ValidateTextString(strToAdd))
{
this.SelectedText = strToAdd;
this.SelectionStart = intHoldSelectionStart + strToAdd.Length;
this.SelectionLength = 0;
this.Focus();
}
}
}
catch (Exception e)
{
string holdmessage = e.ToString(); // TBD
}
}

protected override void OnKeyPress (
System.Windows.Forms.KeyPressEventArgs e )
{
if (!ValidateThisCharacter(e.KeyChar))
{
e.Handled = true;
}
}

private void SortArray (Array myArray)
{
Array.Sort(myArray);
ArrayIsSorted =true;
}

}
}
 
B

Brian McVay

Does not sound odd at all.

In fact, in research, it appears to have the elements of a
WindowsApplicationControl rather than a SmartDeviceProject. SO....

I started over with a new project, selecting Smart Device Application using
a Class Project for Pocket PC devices. I copied my code from the other
project into the new class for the device project and got the same error you
described. I replaced it with the following for a quick test:

//myReturnValue = Comparer.Equals(myChar, SpecialCharacters[intFoundValue]);
int myTest = myChar.CompareTo(SpecialCharacters[intFoundValue]);
if (myTest == 0) myReturnValue = true;

This compiled fine for a Smart Device Class project.

I recompiled the runtime version and then reset the assembly information for
the design time and ran the command line compiler against the new assembly
and moved the new runtime and design time files to the appropriate
directories.

I created a new test application for Smart Devices with only one form and no
code. Made sure that all references paths were added to the new project for
the new control. Added the new control to the toolbox, and it still failed
to draw on the form.

Ideas?

Thanks for all the help you have already provided!

Brian

Tim Wilson said:
This might sound odd, but are you sure that you're working in a device
project? I assume that the code that you initially posted compiles fine
for
you... but it didn't even compile for me. It looks like you're trying to
use
the static Equals method on the Comparer class that takes two arguments.
The
only Equals method overload that is supported is the one that takes a
single
argument. Could that be your problem?

myReturnValue = Comparer.Equals(myChar, SpecialCharacters[intFoundValue]);

--
Tim Wilson
.Net Compact Framework MVP

Brian McVay said:
Too true!

I read the entire article and placed the missing attribute before the
namespace, recompiled both the runtime and the designtime components as
it
said. Went back into my application and removed the references and re-added
the new references. However, the control still will not add to the form at
design time.
Any idea what i might still be missing?

#if NETCFDESIGNTIME
[assembly: System.CF.Design.RuntimeAssemblyAttribute("ABCTextBoxControl,
Version=1.0.1922.24823, Culture=neutral, PublicKeyToken=null")]
#endif


Brian

"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in
message
I don't see a RuntimeAssemblyAttribute in your code. See the link below for
information on this attribute.
http://msdn.microsoft.com/library/d..._evtuv/html/etconcustomcontroldevelopment.asp

--
Tim Wilson
.Net Compact Framework MVP

Hi all,

I have created a custom textbox control using VS2003 C# to use in a
VB.NET
CF project. In an application test for the desktop the control works
just
fine (although some polishing is still needed) , however, for an
application
targeted for the Smart Device Application the control does not draw onto
the
form at design time.

I have followed the rules inside of the .NET help for compiling the
design
time control using the command line compiler and have successfully added
it
to the VB.NET toolbar for Smart Device Application in the Designer... but
the designer simply does nothing when the control is selected to add
to a
form.

Can anyone provide any feedback on what I am not doing or what I am doing
wrong?

I have provided the control code below for what I currently have.

Thanks in advance.

Brian

-----
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace ABCTextBoxControl
{
/// <summary>
/// Summary description for ABCTextBoxControl.
/// Derived and overridden textbox control to restrict key entry
based
on
property settings.
/// </summary>
#if NETCFDESIGNTIME

[ToolboxItemFilter("NETCF",ToolboxItemFilterType.Allow),

ToolboxItemFilter("System.CF.Windows.Forms",
ToolboxItemFilterType.Custom)]

#endif
public class ABCTextBox : System.Windows.Forms.TextBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ABCTextBox()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();

// TODO: Add any initialization after the InitComponent call
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
}

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{

}
#endregion

protected override void OnPaint(PaintEventArgs pe)
{
// TODO: Add custom paint code here

// Calling the base class OnPaint
base.OnPaint(pe);
}

private char[] SpecialCharacters;
public char[] AllowSpecialCharacters
{
set { SpecialCharacters = value;
ArrayIsSortedSet = false;
}
get { return SpecialCharacters;}
}

private bool NumericOnlySet = false;
public bool NumericOnly
{
get {return NumericOnlySet;}
set {NumericOnlySet = value;}
}

private bool AllowNumericSet = true;
public bool AllowNumeric
{
get {return AllowNumericSet;}
set {AllowNumericSet = value;}
}

private bool ArrayIsSortedSet = false;

private bool ArrayIsSorted
{
get {return ArrayIsSortedSet;}
set {ArrayIsSortedSet = value;}
}

private bool RestrictToAllowedSet = false;
public bool RestrictToAllowed
{
get {return RestrictToAllowedSet;}
set {RestrictToAllowedSet = value;}
}

private bool IsNumericOnly ()
{
try
{
string testString = this.Text;
int testParse = Int32.Parse(testString);
return true;
}
catch (Exception e)
{
string holdmessage = e.ToString();
return false;
}
}

private bool myIsNumber (char myChar)
{
return char.IsDigit(myChar);
}
private bool myIsLetter (char myChar)
{
return char.IsLetter(myChar);
}
private bool myIsControl (char myChar)
{
return char.IsControl(myChar);
}

private bool ValidateTextString (string myString)
{
int myLength;
char mySearch;
bool myReturnValue = true;

myLength = myString.Length;
for (int myCounter = 1; myCounter <= myLength; myCounter++)
{
mySearch = Convert.ToChar(myString.Substring(myCounter, 1));
myReturnValue = ValidateThisCharacter(mySearch);
if (myReturnValue == false) break;
}
return myReturnValue;
}

private bool ValidateThisCharacter (char myChar)
{
int intFoundValue;
bool myReturnValue = false;

if (!RestrictToAllowed)
{
if (myIsNumber(myChar))
{
if (AllowNumeric) return true;
}
if (myIsLetter(myChar))
{
if (!NumericOnly) return true;
}
}

if (myIsControl(myChar)) return true;

if (ArrayIsSorted == false)
{
SortArray(SpecialCharacters);
}
intFoundValue = Array.BinarySearch( SpecialCharacters, myChar );
if (intFoundValue >= 0)
{
myReturnValue = Comparer.Equals(myChar,
SpecialCharacters[intFoundValue]);
}
return myReturnValue;
}

public void AddText(string strToAdd) // Add the passed text to
this
textbox which could come from numerous sources, methods, or events
{
int intHoldSelectionStart = 0;
intHoldSelectionStart = this.SelectionStart;

try
{
if (this.Text.Length < this.MaxLength)
{
if (ValidateTextString(strToAdd))
{
this.SelectedText = strToAdd;
this.SelectionStart = intHoldSelectionStart + strToAdd.Length;
this.SelectionLength = 0;
this.Focus();
}
}
}
catch (Exception e)
{
string holdmessage = e.ToString(); // TBD
}
}

protected override void OnKeyPress (
System.Windows.Forms.KeyPressEventArgs e )
{
if (!ValidateThisCharacter(e.KeyChar))
{
e.Handled = true;
}
}

private void SortArray (Array myArray)
{
Array.Sort(myArray);
ArrayIsSorted =true;
}

}
}
 
T

Tim Wilson

I just compiled everything and dropped the control onto the Form as
expected. Here's what I did.

With the original source that you posted, and those changes that you made in
the last post, I made a few more code changes.
(1) I moved the reference to the RuntimeAssemblyAttribute outside the
namespace.
(2) I set the AssemblyVersion to "1.0.0.0" ([assembly:
AssemblyVersion("1.0.0.0")]).
(3) I set the Version in the RuntimeAssemblyAttribute to "1.0.0.0" to line
up with the AssemblyVersion attribute.

Next I built the run-time version. Simple build through the IDE.

Then I built the design-time version using the following script.

csc /noconfig /define:NETCFDESIGNTIME /target:library
/out:ABCTextBoxControl.Design.dll AssemblyInfo.cs ABCTextBox.cs
/r:"E:\Microsoft Visual Studio .NET 2003 Enterprise
Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Design.dll" /r:"E:\Microsoft Visual Studio .NET 2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Drawing.dll" /r:"E:\Microsoft Visual Studio .NET 2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.dll" /r:System.dll /r:System.Drawing.dll
/r:System.Windows.Forms.dll /r:System.Data.dll /nowarn:1595

Of course, you'll need to replace the paths to the appropriate paths on your
dev machine.

I then copied the run-time assembly to the
"...\CompactFrameworkSDK\v1.0.5000\Windows CE" directory and the design-time
assembly to the "...\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer"
directory.

Then I created a PPC application, and then added the control to the ToolBox
by right-clicking on the ToolBox, choosing "Add/Remove Items..." and then
locating the design-time version of the control (the one in the
"...\Designer" directory).

Next, I dragged the control out of the ToolBox and onto the Form and it
appeared as expected.

--
Tim Wilson
..Net Compact Framework MVP

Brian McVay said:
Does not sound odd at all.

In fact, in research, it appears to have the elements of a
WindowsApplicationControl rather than a SmartDeviceProject. SO....

I started over with a new project, selecting Smart Device Application using
a Class Project for Pocket PC devices. I copied my code from the other
project into the new class for the device project and got the same error you
described. I replaced it with the following for a quick test:

//myReturnValue = Comparer.Equals(myChar, SpecialCharacters[intFoundValue]);
int myTest = myChar.CompareTo(SpecialCharacters[intFoundValue]);
if (myTest == 0) myReturnValue = true;

This compiled fine for a Smart Device Class project.

I recompiled the runtime version and then reset the assembly information for
the design time and ran the command line compiler against the new assembly
and moved the new runtime and design time files to the appropriate
directories.

I created a new test application for Smart Devices with only one form and no
code. Made sure that all references paths were added to the new project for
the new control. Added the new control to the toolbox, and it still failed
to draw on the form.

Ideas?

Thanks for all the help you have already provided!

Brian
 
B

Brian McVay

I just followed your instructions to the letter, and I still cannot get it
to show on the form.

Tim, I want to thank you for taking all this time and effort to assist me
with this.

Just to make sure that I *could* do this, I followed the instructions from
the Graph example that you linked earlier, and it works like a champ in the
very project that I am trying to get this textbox to work in.

I tried another small control and it works perfectly as well. There is
just something with this control and/or my environment that is preventing it
from working ... but what... i have no idea.

Again, thanks for all your help.

Brian


Tim Wilson said:
I just compiled everything and dropped the control onto the Form as
expected. Here's what I did.

With the original source that you posted, and those changes that you made
in
the last post, I made a few more code changes.
(1) I moved the reference to the RuntimeAssemblyAttribute outside the
namespace.
(2) I set the AssemblyVersion to "1.0.0.0" ([assembly:
AssemblyVersion("1.0.0.0")]).
(3) I set the Version in the RuntimeAssemblyAttribute to "1.0.0.0" to line
up with the AssemblyVersion attribute.

Next I built the run-time version. Simple build through the IDE.

Then I built the design-time version using the following script.

csc /noconfig /define:NETCFDESIGNTIME /target:library
/out:ABCTextBoxControl.Design.dll AssemblyInfo.cs ABCTextBox.cs
/r:"E:\Microsoft Visual Studio .NET 2003 Enterprise
Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Design.dll" /r:"E:\Microsoft Visual Studio .NET 2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Drawing.dll" /r:"E:\Microsoft Visual Studio .NET
2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.dll" /r:System.dll
/r:System.Drawing.dll
/r:System.Windows.Forms.dll /r:System.Data.dll /nowarn:1595

Of course, you'll need to replace the paths to the appropriate paths on
your
dev machine.

I then copied the run-time assembly to the
"...\CompactFrameworkSDK\v1.0.5000\Windows CE" directory and the
design-time
assembly to the "...\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer"
directory.

Then I created a PPC application, and then added the control to the
ToolBox
by right-clicking on the ToolBox, choosing "Add/Remove Items..." and then
locating the design-time version of the control (the one in the
"...\Designer" directory).

Next, I dragged the control out of the ToolBox and onto the Form and it
appeared as expected.

--
Tim Wilson
.Net Compact Framework MVP

Brian McVay said:
Does not sound odd at all.

In fact, in research, it appears to have the elements of a
WindowsApplicationControl rather than a SmartDeviceProject. SO....

I started over with a new project, selecting Smart Device Application using
a Class Project for Pocket PC devices. I copied my code from the other
project into the new class for the device project and got the same error you
described. I replaced it with the following for a quick test:

//myReturnValue = Comparer.Equals(myChar, SpecialCharacters[intFoundValue]);
int myTest = myChar.CompareTo(SpecialCharacters[intFoundValue]);
if (myTest == 0) myReturnValue = true;

This compiled fine for a Smart Device Class project.

I recompiled the runtime version and then reset the assembly information for
the design time and ran the command line compiler against the new
assembly
and moved the new runtime and design time files to the appropriate
directories.

I created a new test application for Smart Devices with only one form and no
code. Made sure that all references paths were added to the new project for
the new control. Added the new control to the toolbox, and it still failed
to draw on the form.

Ideas?

Thanks for all the help you have already provided!

Brian
 
T

Tim Wilson

Are you able to zip and post your whole control project as is? If you do
that I'll take a look through the project to see what's going on.

--
Tim Wilson
..Net Compact Framework MVP

Brian McVay said:
I just followed your instructions to the letter, and I still cannot get it
to show on the form.

Tim, I want to thank you for taking all this time and effort to assist me
with this.

Just to make sure that I *could* do this, I followed the instructions from
the Graph example that you linked earlier, and it works like a champ in the
very project that I am trying to get this textbox to work in.

I tried another small control and it works perfectly as well. There is
just something with this control and/or my environment that is preventing it
from working ... but what... i have no idea.

Again, thanks for all your help.

Brian


Tim Wilson said:
I just compiled everything and dropped the control onto the Form as
expected. Here's what I did.

With the original source that you posted, and those changes that you made
in
the last post, I made a few more code changes.
(1) I moved the reference to the RuntimeAssemblyAttribute outside the
namespace.
(2) I set the AssemblyVersion to "1.0.0.0" ([assembly:
AssemblyVersion("1.0.0.0")]).
(3) I set the Version in the RuntimeAssemblyAttribute to "1.0.0.0" to line
up with the AssemblyVersion attribute.

Next I built the run-time version. Simple build through the IDE.

Then I built the design-time version using the following script.

csc /noconfig /define:NETCFDESIGNTIME /target:library
/out:ABCTextBoxControl.Design.dll AssemblyInfo.cs ABCTextBox.cs
/r:"E:\Microsoft Visual Studio .NET 2003 Enterprise
Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Design.dll" /r:"E:\Microsoft Visual Studio .NET 2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Drawing.dll" /r:"E:\Microsoft Visual Studio .NET
2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.dll" /r:System.dll
/r:System.Drawing.dll
/r:System.Windows.Forms.dll /r:System.Data.dll /nowarn:1595

Of course, you'll need to replace the paths to the appropriate paths on
your
dev machine.

I then copied the run-time assembly to the
"...\CompactFrameworkSDK\v1.0.5000\Windows CE" directory and the
design-time
assembly to the "...\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer"
directory.

Then I created a PPC application, and then added the control to the
ToolBox
by right-clicking on the ToolBox, choosing "Add/Remove Items..." and then
locating the design-time version of the control (the one in the
"...\Designer" directory).

Next, I dragged the control out of the ToolBox and onto the Form and it
appeared as expected.

--
Tim Wilson
.Net Compact Framework MVP

Brian McVay said:
Does not sound odd at all.

In fact, in research, it appears to have the elements of a
WindowsApplicationControl rather than a SmartDeviceProject. SO....

I started over with a new project, selecting Smart Device Application using
a Class Project for Pocket PC devices. I copied my code from the other
project into the new class for the device project and got the same
error
you
described. I replaced it with the following for a quick test:

//myReturnValue = Comparer.Equals(myChar, SpecialCharacters[intFoundValue]);
int myTest = myChar.CompareTo(SpecialCharacters[intFoundValue]);
if (myTest == 0) myReturnValue = true;

This compiled fine for a Smart Device Class project.

I recompiled the runtime version and then reset the assembly
information
for
the design time and ran the command line compiler against the new
assembly
and moved the new runtime and design time files to the appropriate
directories.

I created a new test application for Smart Devices with only one form
and
no
code. Made sure that all references paths were added to the new project for
the new control. Added the new control to the toolbox, and it still failed
to draw on the form.

Ideas?

Thanks for all the help you have already provided!

Brian
 
B

Brian McVay

Thanks Tim.

I decided to try it once more time this morning. Using the same projects as
before, I wiped all references, physically deleted all of the compiled
files, rechecked all the code and batch files (no changes), recompiled and
moved the files out. Set up the toolbar again and set the new references.

Lo and behold it worked perfectly. I guess something was hung up on the
references or they were not being replaced correctly with the new reference
to the new compiles yesterday even though I was removing them then too.
Weird.

Thanks for your willingness and great assistance.

Brian.


Tim Wilson said:
Are you able to zip and post your whole control project as is? If you do
that I'll take a look through the project to see what's going on.

--
Tim Wilson
.Net Compact Framework MVP

Brian McVay said:
I just followed your instructions to the letter, and I still cannot get
it
to show on the form.

Tim, I want to thank you for taking all this time and effort to assist me
with this.

Just to make sure that I *could* do this, I followed the instructions
from
the Graph example that you linked earlier, and it works like a champ in the
very project that I am trying to get this textbox to work in.

I tried another small control and it works perfectly as well. There is
just something with this control and/or my environment that is preventing it
from working ... but what... i have no idea.

Again, thanks for all your help.

Brian


"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in
message
I just compiled everything and dropped the control onto the Form as
expected. Here's what I did.

With the original source that you posted, and those changes that you made
in
the last post, I made a few more code changes.
(1) I moved the reference to the RuntimeAssemblyAttribute outside the
namespace.
(2) I set the AssemblyVersion to "1.0.0.0" ([assembly:
AssemblyVersion("1.0.0.0")]).
(3) I set the Version in the RuntimeAssemblyAttribute to "1.0.0.0" to line
up with the AssemblyVersion attribute.

Next I built the run-time version. Simple build through the IDE.

Then I built the design-time version using the following script.

csc /noconfig /define:NETCFDESIGNTIME /target:library
/out:ABCTextBoxControl.Design.dll AssemblyInfo.cs ABCTextBox.cs
/r:"E:\Microsoft Visual Studio .NET 2003 Enterprise
Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Design.dll" /r:"E:\Microsoft Visual Studio .NET 2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Drawing.dll" /r:"E:\Microsoft Visual Studio .NET
2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.dll" /r:System.dll
/r:System.Drawing.dll
/r:System.Windows.Forms.dll /r:System.Data.dll /nowarn:1595

Of course, you'll need to replace the paths to the appropriate paths on
your
dev machine.

I then copied the run-time assembly to the
"...\CompactFrameworkSDK\v1.0.5000\Windows CE" directory and the
design-time
assembly to the "...\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer"
directory.

Then I created a PPC application, and then added the control to the
ToolBox
by right-clicking on the ToolBox, choosing "Add/Remove Items..." and then
locating the design-time version of the control (the one in the
"...\Designer" directory).

Next, I dragged the control out of the ToolBox and onto the Form and it
appeared as expected.

--
Tim Wilson
.Net Compact Framework MVP

Does not sound odd at all.

In fact, in research, it appears to have the elements of a
WindowsApplicationControl rather than a SmartDeviceProject. SO....

I started over with a new project, selecting Smart Device Application
using
a Class Project for Pocket PC devices. I copied my code from the other
project into the new class for the device project and got the same error
you
described. I replaced it with the following for a quick test:

//myReturnValue = Comparer.Equals(myChar,
SpecialCharacters[intFoundValue]);
int myTest = myChar.CompareTo(SpecialCharacters[intFoundValue]);
if (myTest == 0) myReturnValue = true;

This compiled fine for a Smart Device Class project.

I recompiled the runtime version and then reset the assembly information
for
the design time and ran the command line compiler against the new
assembly
and moved the new runtime and design time files to the appropriate
directories.

I created a new test application for Smart Devices with only one form and
no
code. Made sure that all references paths were added to the new
project
for
the new control. Added the new control to the toolbox, and it still
failed
to draw on the form.

Ideas?

Thanks for all the help you have already provided!

Brian
 
T

Tim Wilson

Cool. Sometimes you just got to tear it down to the metal and build it back
up, I guess. Glad to hear you're back up and running.

--
Tim Wilson
..Net Compact Framework MVP

Brian McVay said:
Thanks Tim.

I decided to try it once more time this morning. Using the same projects as
before, I wiped all references, physically deleted all of the compiled
files, rechecked all the code and batch files (no changes), recompiled and
moved the files out. Set up the toolbar again and set the new references.

Lo and behold it worked perfectly. I guess something was hung up on the
references or they were not being replaced correctly with the new reference
to the new compiles yesterday even though I was removing them then too.
Weird.

Thanks for your willingness and great assistance.

Brian.


Tim Wilson said:
Are you able to zip and post your whole control project as is? If you do
that I'll take a look through the project to see what's going on.

--
Tim Wilson
.Net Compact Framework MVP

Brian McVay said:
I just followed your instructions to the letter, and I still cannot get
it
to show on the form.

Tim, I want to thank you for taking all this time and effort to assist me
with this.

Just to make sure that I *could* do this, I followed the instructions
from
the Graph example that you linked earlier, and it works like a champ in the
very project that I am trying to get this textbox to work in.

I tried another small control and it works perfectly as well. There is
just something with this control and/or my environment that is
preventing
it
from working ... but what... i have no idea.

Again, thanks for all your help.

Brian


"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in
message
I just compiled everything and dropped the control onto the Form as
expected. Here's what I did.

With the original source that you posted, and those changes that you made
in
the last post, I made a few more code changes.
(1) I moved the reference to the RuntimeAssemblyAttribute outside the
namespace.
(2) I set the AssemblyVersion to "1.0.0.0" ([assembly:
AssemblyVersion("1.0.0.0")]).
(3) I set the Version in the RuntimeAssemblyAttribute to "1.0.0.0" to line
up with the AssemblyVersion attribute.

Next I built the run-time version. Simple build through the IDE.

Then I built the design-time version using the following script.

csc /noconfig /define:NETCFDESIGNTIME /target:library
/out:ABCTextBoxControl.Design.dll AssemblyInfo.cs ABCTextBox.cs
/r:"E:\Microsoft Visual Studio .NET 2003 Enterprise
Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Design.dll" /r:"E:\Microsoft Visual Studio .NET 2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Drawing.dll" /r:"E:\Microsoft Visual Studio ..NET
2003
Enterprise Architect\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.dll" /r:System.dll
/r:System.Drawing.dll
/r:System.Windows.Forms.dll /r:System.Data.dll /nowarn:1595

Of course, you'll need to replace the paths to the appropriate paths on
your
dev machine.

I then copied the run-time assembly to the
"...\CompactFrameworkSDK\v1.0.5000\Windows CE" directory and the
design-time
assembly to the "...\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer"
directory.

Then I created a PPC application, and then added the control to the
ToolBox
by right-clicking on the ToolBox, choosing "Add/Remove Items..." and then
locating the design-time version of the control (the one in the
"...\Designer" directory).

Next, I dragged the control out of the ToolBox and onto the Form and it
appeared as expected.

--
Tim Wilson
.Net Compact Framework MVP

Does not sound odd at all.

In fact, in research, it appears to have the elements of a
WindowsApplicationControl rather than a SmartDeviceProject. SO....

I started over with a new project, selecting Smart Device Application
using
a Class Project for Pocket PC devices. I copied my code from the other
project into the new class for the device project and got the same error
you
described. I replaced it with the following for a quick test:

//myReturnValue = Comparer.Equals(myChar,
SpecialCharacters[intFoundValue]);
int myTest = myChar.CompareTo(SpecialCharacters[intFoundValue]);
if (myTest == 0) myReturnValue = true;

This compiled fine for a Smart Device Class project.

I recompiled the runtime version and then reset the assembly information
for
the design time and ran the command line compiler against the new
assembly
and moved the new runtime and design time files to the appropriate
directories.

I created a new test application for Smart Devices with only one
form
and
no
code. Made sure that all references paths were added to the new
project
for
the new control. Added the new control to the toolbox, and it still
failed
to draw on the form.

Ideas?

Thanks for all the help you have already provided!

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top