Wednesday, December 28, 2005
Windows Installer Property Reference
Windows Installer Property Reference
There are many properties that can be set during an installation. The following page list most of them with their functions and, in many cases, the syntax needed to put these properties into action. Many of the properties can be set through the IDE, while others are initialized by the Windows Installer service at run time.
Monday, December 26, 2005
Hotmail's new interface
Its called Live Mail, and I just love it. Its got a very intutive interface and its very similar to the interface of any old email client such as Outlook. The whole Live series of sites I think are very cool. The only site that I dont think is the best out there is their Local.Live (I think Google maps has a much better interface for viewing maps).
Live mail is currently in its Beta. If you would like to be included in the beta, you can do so from this website http://imagine-msn.com/minisites/hotmail/default.aspx?locale=en-us. I am sure when it releases, its going to be a super hit!
And can you imagine all the behavior you are seeing is basically through scripts in internet stuff such as DHTML, very cool indeed.
Thursday, December 22, 2005
Wednesday, December 21, 2005
Delta3D - Open source gaming & simulation engine backed by the U.S. Military
Delta3D - Open source gaming & simulation engine backed by the U.S. Military
A well-supported and fully-funded open source project, Delta3D is a full-function game engine appropriate for a wide variety of modeling & simulation applications.
Delta3D's modular design integrates other well-known Open Source projects such as Open Scene Graph(OSG), Open Dynamics Engine(ODE), Character Animation Library (CAL3D), and OpenAL, integrating them in an easy-to-use API.
Tuesday, December 20, 2005
.Net Design Time Properties for Controls
Ever wanted to add custom properties for your control in .NET.
I needed to and found these two classes that can be used to do many different things.
UITypeEditor and TypeConverter.
The TypeConverter:
I had a property that took a string value. By default this property showed up in the designer. But what I wanted to do was constrain the user into selecting from a list of values. To do this I created a typeConvertor similar to the one shown below:
public class PatternConvertor : TypeConverter {
static System.ComponentModel.TypeConverter.StandardValuesCollection _svc;
public PatternConvertor() {
if (_svc == null) {
ArrayList values;
values = new ArrayList();
values.Add("Value 1");
values.Add("Value 2");
_svc = new StandardValuesCollection(values);
}
}
public override bool GetStandardValuesSupported(
ITypeDescriptorContext context) {
return true;
}
public override System.ComponentModel.TypeConverter.StandardValuesCollection
GetStandardValues(ITypeDescriptorContext context) {
return _svc;
}
}
Next, I had to tell the property to use this Convertor. To do this I added the following attribute:
[TypeConverter(typeof(PatternConvertor)) ], to the property
When you click on the control in the designer and view its properties, MyValue will show in the list. MyValue will have a list of values that you can then set. The TypeConvertor class has many more goodies that can be used, such as GetPropertiesSupported, etc. Be sure to check out their functionality. The UITypeEditor: Want to show a custom way of setting a property.... You can do that using a UITypeEditor customized class. In this example I use a trackbar to set a property that takes an integer value.
[TypeConverter(typeof(PatternConvertor))]
public string MyValue {
get { return _value; }
set { _value = value; }
}
When you click on the control in the designer and view its properties, MyValue will show in the list. MyValue will have a list of values that you can then set. The TypeConvertor class has many more goodies that can be used, such as GetPropertiesSupported, etc. Be sure to check out their functionality. The UITypeEditor: Want to show a custom way of setting a property.... You can do that using a UITypeEditor customized class. In this example I use a trackbar to set a property that takes an integer value.
public class TrackBarEditor : UITypeEditor {
public TrackBarEditor() {}
public override UITypeEditorEditStyle
GetEditStyle(System.ComponentModel.ITypeDescriptorContext context) {
return UITypeEditorEditStyle.DropDown;
}
public override object EditValue(
System.ComponentModel.ITypeDescriptorContext context,
IServiceProvider provider,
object value) { // use IWindowsFormsEditorService object to display a
// control in the dropdown area
// IWindowsFormsEditorService frmsvr =
// (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
// if(frmsvr == null) return null; TrackBar tbr = new
// TrackBar(); tbr.Orientation = Orientation.Vertical;
// tbr.Size = new Size(60,120); tbr.TickFrequency = 50;
// tbr.SetRange(10,300); frmsvr.DropDownControl(tbr);
// return tbr.Value; } }
Now to use it add the following attribute above the property:
[Editor(typeof(TrackBarEditor),typeof(UITypeEditor))]
Now when you go to the designer, it will drop down a trackbar, which you can slide around to set the value for the property. Cool, huh?!
Other useful attributes:
RefreshProperties: How should a refresh be performed
Description: description shown for the property in the designer
Browsable: Should the property show up in the designer
DefaultValue: the default value for the property
Other useful sites for this kind of stuff:
Building Windows Forms Controls and Components with Rich Design-Time Features
http://msdn.microsoft.com/msdnmag/issues/03/04/Design-TimeControls/default.aspx
Building Windows Forms Controls and Components with Rich Design-Time Features, Part 2
http://msdn.microsoft.com/msdnmag/issues/03/05/Design-TimeControls/default.aspx
http://www.awprofessional.com/isapi/product_id~%7BB757E215-0FB4-4EA1-A051-65EE537AE9C7%7D/selectDescTypeId~%7B5DBF6018-1234-4204-B35E-903EC67C9A3B%7D/st~%7B5130B593-BAEC-49C6-B6A8-0035DFD1EA3B%7D/content/images/0321116208/samplechapter/sellsch09.pdf
.Net Design Time Properties for Controls
Ever wanted to add custom properties for your control in .NET.
I needed to and found these two classes that can be used to do many different things.
UITypeEditor and TypeConverter.
The TypeConverter:
I had a property that took a string value. By default this property showed up in the designer. But what I wanted to do was constrain the user into selecting from a list of values. To do this I created a typeConvertor similar to the one shown below:
public class PatternConvertor : TypeConverter
{
static System.ComponentModel.TypeConverter.StandardValuesCollection _svc;
public PatternConvertor()
{
if (_svc == null)
{
ArrayList values;
values = new ArrayList();
values.Add("Value 1");
values.Add("Value 2");
_svc = new StandardValuesCollection(values);
}
}
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
return _svc;
}
}
Next, I had to tell the property to use this Convertor. To do this I added the following attribute:
[TypeConverter(typeof(PatternConvertor)) ], to the property
[TypeConverter(typeof(PatternConvertor)) ]
public string MyValue
{
get
{ return _value;}
set
{_value = value;}
}
When you click on the control in the designer and view its properties, MyValue will show in the list. MyValue will have a list of values that you can then set.
The TypeConvertor class has many more goodies that can be used, such as GetPropertiesSupported, etc. Be sure to check out their functionality.
The UITypeEditor:
Want to show a custom way of setting a property.... You can do that using a UITypeEditor customized class.
In this example I use a trackbar to set a property that takes an integer value.
public class TrackBarEditor : UITypeEditor
{
public TrackBarEditor()
{}
public override UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
{
return UITypeEditorEditStyle.DropDown;
}
public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
{
//use IWindowsFormsEditorService object to display a control in the dropdown area
IWindowsFormsEditorService frmsvr = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
if(frmsvr == null)
return null;
TrackBar tbr = new TrackBar();
tbr.Orientation = Orientation.Vertical;
tbr.Size = new Size(60,120);
tbr.TickFrequency = 50;
tbr.SetRange(10,300);
frmsvr.DropDownControl(tbr);
return tbr.Value;
}
}
Now to use it add the following attribute above the property:
[Editor(typeof(TrackBarEditor),typeof(UITypeEditor))]
Now when you go to the designer, it will drop down a trackbar, which you can slide around to set the value for the property. Cool, huh?!
Other useful attributes:
RefreshProperties: How should a refresh be performed
Description: description shown for the property in the designer
Browsable: Should the property show up in the designer
DefaultValue: the default value for the property
Other useful sites for this kind of stuff:
Building Windows Forms Controls and Components with Rich Design-Time Features
http://msdn.microsoft.com/msdnmag/issues/03/04/Design-TimeControls/default.aspx
Building Windows Forms Controls and Components with Rich Design-Time Features, Part 2
http://msdn.microsoft.com/msdnmag/issues/03/05/Design-TimeControls/default.aspx
http://www.awprofessional.com/isapi/product_id~%7BB757E215-0FB4-4EA1-A051-65EE537AE9C7%7D/selectDescTypeId~%7B5DBF6018-1234-4204-B35E-903EC67C9A3B%7D/st~%7B5130B593-BAEC-49C6-B6A8-0035DFD1EA3B%7D/content/images/0321116208/samplechapter/sellsch09.pdf
Visual Studio .NET: Building Windows Forms Controls and Components with Rich Design-Time Features -- MSDN Magazine, April 2003
Visual Studio .NET: Building Windows Forms Controls and Components with Rich Design-Time Features -- MSDN Magazine, April 2003: "Building Windows Forms Controls and Components with Rich Design-Time Features"
Monday, December 19, 2005
Remote Control Software
The other day, I was required to provide some support services for one of our clients. While debugging some problem on their machine, I found that I needed a software that would allow me to connect to their machine, run some commands and see the output of those commands. Enter remote control packages.
While researching some such packages, found the following 2 to be very useful.
The first one is TightVNC. This one is free, and they even provide VC++ source code, so you can see what is being done. This was born out of some AT&T research done in England. This is a very good software and had loads of customizable parameters using which you could choose between fast response or a good clean and crisp display of the computer you were logged on to. Best of all this software is Free. The only problem I had with this software was I could not figure of an easy way to connect to our client's machine as they were beheind a NAT.
Enter FogCreek's CoPilot. I first heard of this software when I was checking out a documentary made by this firm on the development of a software product. This documentary was about some interns who were followed as they created CoPilot. CoPilot is a remote control software that is so easy to use, that basically anybody can start using it. Best of all, it can work with computers that are behind firewalls/NATs/what have you. All I had to do was create an account, then send my ID to my customer. The customer then had to come to the site, enter my ID, and were then prompted to download a small software piece. Once that was done and they had the software running, I was able to log-in to their computer, see what their installation was and run commands, all the while seeing what was happening on their computer. It was pretty fast too. The only downside, you have to pay for using their service. Its not very expensive and they use a subscription model, so you pay for what you use.
For any firm engaged in software development I think FogCreek's Copilot is a great tool for providing support. And best of all its easy to use and not too expensive.
FogCreek's Copilot: https://www.copilot.com/
TightVNC: http://www.tightvnc.com/
Tuesday, December 13, 2005
Friday, December 09, 2005
ImageBox Control with Zoom/Pan Capability - The Code Project - C# Controls
ImageBox Control with Zoom/Pan Capability - The Code Project - C# Controls
This control extends the capability of an ImageBox by including scrollbars to pan the image and a method for zooming the size of the image. My goal here is to show you two things:
1. How to create your own controls that extend the System.Windows.Forms controls.
2. How to add zoom/pan capability to an image display in a simple fashion.
Balloon ToolTip Control - The Code Project - C# Controls
Balloon ToolTip Control - The Code Project - C# Controls
Everyone knows the ToolTip control (the programmer ones!!) which are included in the Common Controls version 4.0 since Win95 (that’s what saw first, I haven't ever caught the Win3.11). Since then the control itself have been modified and enhanced in many ways, and after a while, WinXP came to life and the Common Controls version 6.0 saw light with the Balloon ToolTip control included, which is the subject of this article.
Neither creating a Balloon ToolTip nor implementing an IExtender is a new subject, not even a hard one, but getting the functionality of both techniques could have some attention, and that's what this article discusses: how to combine the good of both, in a way that's as simple as using the native .NET ToolTip control.
While searching around, I found a great article about the Balloon ToolTip control (actually about the ToolTip control, in all its shapes and uses). This article (which could be found at CodeProject too) was a great reference to me and a good, live example of using the Balloon ToolTip control, but the control described suffered from its complexity (not a real complexity, but it had to be operated programmatically), something that pushed me to investigate the IExtender and to accomplish this work.
File Helpers v1.2.0 - An Automatic File Import/Export Engine - The Code Project - C# Programming
http://www.codeproject.com/useritems/FileHelpers.asp
The FileHelpers are an easy to use library to import/export data from fixed length or delimited files.
The library has a set of converters for the basic types and can be easy extended to provide custom converters.
Subscribe to:
Posts (Atom)