Wednesday, December 28, 2005
Windows Installer Property Reference
Monday, December 26, 2005
Hotmail's new interface
Thursday, December 22, 2005
Wednesday, December 21, 2005
Delta3D - Open source gaming & simulation engine backed by the U.S. Military
Tuesday, December 20, 2005
.Net Design Time Properties for Controls
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.
.Net Design Time Properties for Controls
Visual Studio .NET: Building Windows Forms Controls and Components with Rich Design-Time Features -- MSDN Magazine, April 2003
Monday, December 19, 2005
Remote Control Software
Tuesday, December 13, 2005
Friday, December 09, 2005
ImageBox Control with Zoom/Pan Capability - The Code Project - C# Controls
Balloon ToolTip Control - The Code Project - C# Controls
File Helpers v1.2.0 - An Automatic File Import/Export Engine - The Code Project - C# Programming
Friday, November 18, 2005
God's Debris
Extending ListView in .NET
Thursday, November 17, 2005
Tuesday, November 15, 2005
Monday, November 14, 2005
vbAccelerator - Icon Extractor Utility
Batch Icon Extractor
Wednesday, November 09, 2005
Reading a file which is being accessed by another process
Tuesday, October 25, 2005
Minimal Enclosing Circle
http://www.cs.brown.edu/people/tor/java/mec/ O(nLogN)
Thursday, October 20, 2005
PortForward.com - Free Help Setting up Your Router or Firewall
Wednesday, October 19, 2005
Tech Recipes - Tips for various Comp related Stuff
Thursday, October 06, 2005
GCTP (General Cartographic Transformation Package)
Cartographical Map Projections
Wednesday, September 28, 2005
Embedding and using text resource files in C# (also a little about normally embedded resources)
Windows XP Hacks
Sunday, September 25, 2005
Earth and Moon Viewer
Tuesday, September 20, 2005
An "Always On Top" Window Utility
Monday, September 19, 2005
PDC 05 Slides
The Slides from last weeks Professional Developers Conference in the US are now available for download from: http://commnet.microsoftpdc.com/content/downloads.aspx So if you weren't lucky enough to go - you can download all the presentations :) |
Microsoft Setup Blogs
http://blogs.msdn.com/hgao (Hong - Program Manager) http://blogs.msdn.com/pgiffin (Pete - Test Lead)
|
Thursday, September 15, 2005
Tuesday, September 13, 2005
How can I quickly find all the listening or open ports on my computer?
Net Monitor v0.90
Shows listening and connected ports and logs them to a file if you want.
Download the free 0.90 version from HERE (251kb)
Sysinternals TCPView v2.33
This tool will also show the process name that has the port opened and will let you terminate it. The program will also show newly-connected ports in green, while closed ports will be colored in red.
Download from HERE or from THERE (35kb)
LPS - Local Port Scanner 1.2.2
Freeware, will scan for any given local port, has some built-in Trojan detection functionality. Also lets you scan a remote system and will log the output.
Download from HERE or from THERE (562kb)
Smartline Active Ports v1.4
Freeware, easy to use tool for Windows NT/2000/XP that enables you to monitor all open TCP and UDP ports on the local computer. Active Ports maps ports to the owning application so you can watch which process has opened which port. It also displays a local and remote IP address for each connection and allows you to terminate the owning process. Active Ports can help you to detect Trojans and other malicious programs.
Note: This tool seems not to work under Windows Server 2003.
C at Work: Writing, Loading, and Accessing Plug-Ins -- MSDN Magazine, October 2005
CCleaner - Crap Cleaner free software download
Google Map API
Thursday, September 01, 2005
Listing the values contained in an Enumeration C#
Thursday, August 25, 2005
Wednesday, August 24, 2005
Jenks optimization method
Tuesday, August 23, 2005
The Code Project - A flexible charting library for .NET - C# Programming
Differentiating between a single click and a double click C#
Monday, August 22, 2005
Building a Store Locator with MapPoint's Web Service
Here's a link on how to build a store locator application with MapPoint's Web Service: http://www.livemeeting.com/cc/partners1/view?id=2745&role=attend&pw=c15052. This is a line by line presentation on how to code against the APIs and how it applies to a store locator application. The presentation goes through Authenticating, FindAddress, Find, FindNearby, GetMap, FindByID, and CalculateSimpleRoute. |
Thursday, August 18, 2005
Previewing HTML with InternetExplorer.Application in C# - Rick Strahl's WebLog
Monday, August 15, 2005
Friday, August 12, 2005
Automatically starting the debugger when an application starts (registry entry)
Image File Execution Options
There is a location in the registry that will automatically attach a debugger to an application when it starts to run. This registry location is the following:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Image File Execution Options
Under this registry key, you simply create a new registry key with the name of the process you want to debug, such as "myapplication.exe". If you have not used this before, there is probably a default key already created called "Your Application Here" or something similar. You can rename that key and use it if you like.
One of the values on this key is "Debugger". This should point to the debugger you want to start when this application is run. The default for "Your Application Here" is "ntsd -d". You cannot use this unless you have a kernel debugger attached so I would remove the "-d" part.
Note: Keeping "-d" and not having a kernel debugger attached could result in locking up of your system every time that application is run! Be careful. If you have a kernel debugger setup, you can unlock the system by hitting "g".
There is another value that may be there called "GlobalFlags". This is another tool that can be used for debugging, however it is outside the scope of this article. For more information on that, look up "gflags.exe".
Friday, July 29, 2005
Via Virtual Earth - Homepage
RSA Public/Private key encryption/decryption in .NET
xNs7N/AXNbA48U+jw0M8BLq4uOBT+gJczW/qNG5ZQtg9LahPpz6qUCYauPGLvznZ/IP+ZDSjkw6iT8oKK4qq1w==
xNDyN0rDwvaBB9vsgrjQPmWzQvlBLet24degd9qVl0Ijn15PnDUrjN2SPHq1olkUFcVzj2m8/cCqtpEjAhf+Vw==
The CAIDA Web Site - CAIDA : HOME
Thursday, July 28, 2005
Q: How do I write a method that accepts a variable number of parameters?
Q: How do I write a method that accepts a variable number of parameters?
A: Languages like C and C++ have always offered some means for using and creating functions capable to accept a variable number of parameters. The most widely known example of a function which takes a variable number of parameters is printf():
int printf(char *format, …); // the ellipsis means "variable number of params"
Using this function is pretty easy:
printf("Hello, world\n");
printf("The sum of %d and %d is %d\n", a, b, a+b);
However, the creation of such functions in these languages relays on a set of predefined macros and is not particularly elegant or intuitive.
C# offers an elegant solution to this problem through parameter arrays. A parameter array is a single-dimensional array included as the last parameter in the parameter list of a method:
public string Concat(string separator, params string[] strings)
{
string result = "";
for (int i = 0; i <>
{
if (i > 0)
result += separator;
result += strings[i];
}
return result;
}
Such a function can be called in two different ways:
a) Passing the function an array instance argument:
string[] names = { "Anders", "Eric", "Scott", "Duncan" };
MessageBox.Show(Concat("+", names) + " = great team");
b) Using zero or more type-compatible arguments for the parameter array:
MessageBox.Show(Concat("+", "Anders", "Eric", "Scott", "Duncan") +
" = great team");
In this case, the invocation will create an array from the supplied arguments and use it as the actual argument.
Thanks to the unified .NET type system, object[] can be used as “common denominator” for arguments of different types:
public int SumTheIntegers(params object[] list)
{
// sum all the integers included in list
int sum = 0;
foreach (object o in list)
if (o.GetType() == typeof(int))
sum += (int) o;
return sum;
}
Tuesday, July 26, 2005
Passing Function Pointer to Unmanaged Class from Managed Class
Friday, July 22, 2005
Finding GUIDS using Visual Studio.NET's regular expression
Wednesday, July 20, 2005
E.W.Dijkstra Archive: Home page
Tuesday, July 19, 2005
Viewing the contents of the GAC
Tuesday, July 12, 2005
Mike Woodring's .NET Sample Page
Thursday, July 07, 2005
Is System.String a value type or a reference type?
Tuesday, June 28, 2005
Saturday, June 25, 2005
Design-Time Integration
Tuesday, June 07, 2005
Reading CSV files in C#
Thursday, May 05, 2005
Render Loops in C#
The basic loop
public void MainLoop() { // Hook the application's idle event System.Windows.Forms.Application.Idle += new EventHandler(OnApplicationIdle); System.Windows.Forms.Application.Run(myForm); }
private void OnApplicationIdle(object sender, EventArgs e) { while (AppStillIdle) { // Render a frame during idle time (no messages are waiting) UpdateEnvironment(); Render3DEnvironment(); } } private bool AppStillIdle { get { NativeMethods.Message msg; return !NativeMethods.PeekMessage(out msg, IntPtr.Zero, 0, 0, 0); } }
And the declarations for those two native methods members:
[StructLayout(LayoutKind.Sequential)] public struct Message { public IntPtr hWnd; public WindowMessage msg; public IntPtr wParam; public IntPtr lParam; public uint time; public System.Drawing.Point p; } [System.Security.SuppressUnmanagedCodeSecurity] // We won't use this maliciously [DllImport("User32.dll", CharSet=CharSet.Auto)] public static extern bool PeekMessage(out Message msg, IntPtr hWnd, uint messageFilterMin, uint messageFilterMax, uint flags);
------
Simple, elegant, effective. No extra allocations, no extra collections, it just works.. The Idle event fires when there's no messages in the queue, and then the handler keeps looping continuously until a message does appear, in which case it stops.. Once all the messages are handled, the idle event is fired again, and the process starts over.
Wednesday, May 04, 2005
Console window for a Windows application (.NET C#)
Tuesday, May 03, 2005
Running within a seperate AppDomain
Monday, May 02, 2005
Friday, April 29, 2005
.NET Serialization Tools
Friday, April 22, 2005
Windows Forms .NET: The Official Microsoft Windows Forms Community Site
Thursday, April 21, 2005
Tuesday, April 19, 2005
Monday, April 18, 2005
Coding4Fun: Coding4Fun
Thursday, April 14, 2005
Console with a WinForm
Environment: .NET, C#
Often, you need a console window together with a WinForm application. It can be very handy for debugging purposes while developping, but also for a (temporary) logging of some data. It is very simple to do. The following program demonstrates it, using P/Invoke. Start a new Windows application, drop a CheckBox on the form, name it ViewConsole, and copy the following code into it.using System;
using System.Windows.Forms;
using System.Runtime.InteropServices; // needed to call external
// application (winAPI dll)
namespace WindowsApplication1
{
partial class Form1: Form
{
public Form1()
{
InitializeComponent();
}
private void ViewConsole_CheckedChanged(object sender,
EventArgs e)
{
if (ViewConsole.Checked)
Win32.AllocConsole();
else
Win32.FreeConsole();
}
}
public class Win32
{
[DllImport("kernel32.dll")]
public static extern Boolean AllocConsole();
[DllImport("kernel32.dll")]
public static extern Boolean FreeConsole();
}
}