473,766 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please help - design support for Simple Texbox control in .Net Compact framework

I'm trying to make a very simple Textbox with a FocusColor property...When
the focus
changes to the
control, the backcolor must change automaticly to the color set by the
focusColor property.
Very simple, the control works fine when creating it dynamicly from code.

My aim is to add design functionality, so I can use it from the Visual
Studio .Net toolbox.
When I compile my code, no errors are reproted and Visual studio leaves a
dll in the release directory. (cdaTextBox.dll )
Even making a design time dll succeeded (design.cdaText Box.dll). To make
such a dll, I use the command line compiler csc.exe from within a batch file
'Build.bat'. Csc.exe does not report any errors.
But, and this is my problem, when I try to add the control to the toolbox,
Visual Studio fires an error:

There are no components in 'C:\Program Files\Microsoft Visual Studio
..NET 2003\CompactFra meworkSDK\v1.0. 5000
\Windows CE\Designer\des ign.cdaTextBox. dll' That can be placed on the
toolbox.

Can someone tell me what I have to change to my code to make it working?
This is the batchfile code (it runs well):

C:\WINNT\Micros oft.NET\Framewo rk\v1.1.4322\cs c.exe /noconfig
/define:NETCFDES IGNTIME /target:library /out:design.cdaT extBox.dll
cdaTextBox.cs AssemblyInfo.cs /res:DatAction.C ontrols.cdaText Box.bmp
/r:"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFra meworkSDK\v1.0. 5000\Windows CE\Designer\Sys tem.CF.Design.d ll"
/r:"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFra meworkSDK\v1.0. 5000\Windows
CE\Designer\Sys tem.CF.Windows. Forms.dll" /r:"C:\Program Files\Microsoft
Visual Studio .NET 2003\CompactFra meworkSDK\v1.0. 5000\Windows
CE\Designer\Sys tem.CF.Drawing. dll" /r:System.Window s.Forms.dll
/r:System.Drawin g.dll /r:System.dll /r:System.XML.dl l /r:System.Data.d ll
/nowarn:1595 >z.txt

This is My C# code:

using System;
using System.Data;
using System.Drawing;
using System.Windows. Forms;
using System.IO;
using System.Componen tModel;

#if NETCFDESIGNTIME
[assembly: System.CF.Desig n.RuntimeAssemb lyAttribute("Pi ctureButton,
Version=1.0.0.0 , Culture=neutral , PublicKeyToken= null")]
#endif

namespace Company.Control s
{
class cdaTextBox: System.Windows. Forms.TextBox
{

#region "Private data members"

private System.Drawing. Color mFocusColor = System.Drawing. Color.Blue;
private System.Drawing. Color mFocusTextColor =
System.Drawing. Color.Yellow;

private System.Drawing. Color mOriginalColor;
private System.Drawing. Color mOrinalTextColo r;

#endregion

#region "Properties !"
#if NETCFDESIGNTIME
[
System.Componen tModel.Category ("Colours"),
System.Componen tModel.Descript ion("This our colours")
]
#endif

public System.Drawing. Color FocusColor
{
get
{
return mFocusColor;
}

set
{
mFocusColor=val ue;
}
}

#if NETCFDESIGNTIME
[
System.Componen tModel.Category ("Colours"),
System.Componen tModel.Descript ion("This our colours")
]
#endif

public System.Drawing. Color FocusTextColor
{
get
{
return mFocusTextColor ;
}

set
{
mFocusTextColor =value;
}
}

#endregion
protected override void OnGotFocus(Syst em.EventArgs e)
{
mOriginalColor = this.BackColor;
mOrinalTextColo r = this.ForeColor;
this.BackColor = mFocusColor;
this.ForeColor = mFocusTextColor ;
}

protected override void OnLostFocus(Sys tem.EventArgs e)
{
this.BackColor = mOriginalColor;
this.ForeColor = mOrinalTextColo r;
}
}
}

Nov 16 '05 #1
0 1426

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1061
by: Umut Tezduyar | last post by:
I really hate working with .net framework design time attributes. I have read asp.net server controls and components (Nikhil Kothari, Vandana Datye) book, chapter 15 but still i can't handle the complex tasks on designer. The thing i want to do is so simple (I hope so). I want my control to understand the Menu and SubMenus under Menu. Ex: <cc1:MyConrol runat="server" id="MyControl1"> <Menu name="level1"> <SubMenus> <Menu name="level2">
1
9651
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
21
1802
by: Galen Somerville | last post by:
My application receives and displays Heart sounds and ECG's in real time. This data comes from a proprietary USB 2.0 device. Unlike most USB devices, this data comes in short bursts of about 24 bytes. These bursts could come as fast as every millisecond. The display of the sound and ECG traces is similar to an oscilloscope display except a blank space of about 5 pixels is shown as it sweeps across the screen. This means that not only is...
22
1598
by: Galen Somerville | last post by:
My application receives and displays Heart sounds and ECG's in real time. This data comes from a proprietary USB 2.0 device. Unlike most USB devices, this data comes in short bursts of about 24 bytes. These bursts could come as fast as every millisecond. The display of the sound and ECG traces is similar to an oscilloscope display except a blank space of about 5 pixels is shown as it sweeps across the screen. This means that not only is...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.