|
Blogs -
CodeCreations Blog
|
|
WikkaWiki is a fast, lightweight, and standards-compliant wiki engine that uses PHP and MySQL. I just discovered it, installed it, and decided to use it as a family organizer -- specifically for things such as projects, to-do lists, links to online resources, etc. For this purpose, the wiki should be mostly private, with only a handful of registered users. Registered users, though, should be add new registered users if they want (without requiring them to know a "secret password"), making it a sort-of invitation-only wiki. I accomplished this with a few configuration settings, and a bit of code. Here's what I did: |
|
Last Updated ( Monday, 13 July 2009 21:56 )
|
|
Read more...
|
|
Blogs -
CodeCreations Blog
|
|
I have an application where users wanted to "tag" business objects with either their own tag, or choose from set of previously used tags. Tags could include spaces or just about any other characters. If a "tag" was already typed in, then it would no longer be one of the auto-complete options. Auto-complete options would not include typed-in tags. Users should be able to switch to the next value using arrow key or tab/shift-tab. Capitalization should be corrected when the suggestion is accepted. Later, users wanted to swtich to the next option by using the comma, so I added that as well. To accomplish this, I used a FlowLayoutPanel as the base control and added auto-suggest textboxes as needed to provide auto-suggest functionality. It's not perfect yet, but it's a start. Here's the code: |
|
Last Updated ( Tuesday, 14 July 2009 16:52 )
|
|
Read more...
|
|
|
Programming -
.Net and C# Articles
|
|
If you have ever wanted a Label or TextBox in Windows Forms that performs a little more like on the web, then you've probably figured out that there's no intuitive way to make a Label or TextBox automatically adjust its height to fit the text it contains. While it may not be intuitive, it's definitely not impossible. In this example, I'll use a TextBox (you could just as easily use a Label) that is docked to the top of a form.To use this, add aTextBox called MyTextBox to the form, and set Dock to DockStyle.Top. Wire up the Resize event of the TextBox to this event handler. |
|
Last Updated ( Tuesday, 14 July 2009 16:49 )
|
|
Read more...
|
|
Blogs -
CodeCreations Blog
|
|
You can create a ToolStrip CheckBox control by simply extending ToolStripControlHost, but in order to get it to show ToolTip help like all the standard ToolStrip controls, you need to jump through the hoop of adding a MouseHover event handler to bubble up the event. In this example, I create a FlowLayoutPanel to hold the new CheckBox so I can add more widgets to the same ToolStrip control later if necessary -- like an image to display a validation error or some other indicator. I create the ToolStripCheckBox by first calling the base contructor (ToolStripControlHost) with a new FlowLayoutPanel. Then I can set some panel properties and add the CheckBox control. Finally, I need to add an event handler for the CheckBox's MouseHover event, since this is the event that will cause the ToolTip to display. The event handler simply calls the ToolStripCheckBox's OnMouseHover() method, effectively making it appear that the ToolStripControlHost is raising the event. Show tool tips for this control, and you should see them when you mouse over the CheckBox. public partial class ToolStripCheckBox
: ToolStripControlHost
{
private FlowLayoutPanel panel;
private CheckBox chk = new CheckBox();
public ToolStripCheckBox()
: base ( new FlowLayoutPanel() )
{
panel = (FlowLayoutPanel)base.Control;
panel.BackColor = Color.Transparent;
panel.Controls.Add( chk );
chk.MouseHover += new EventHandler( chk_MouseHover );
}
void chk_MouseHover( object sender, EventArgs e )
{
this.OnMouseHover( e );
}
}Update 12/30/08: Vladimir Ilic suggests the following to make the ToolStripCheckBox available through the designer and to show the text: (Thanks, Vladimir!) ToolStripItemDesignerAvailability is in System.Windows.Forms.Design. [ToolStripItemDesignerAvailability(
ToolStripItemDesignerAvailability.ToolStrip )]
[ToolboxBitmap( "..\..\Images\CheckBox.bmp" )]
public class ToolStripCheckBox
: ToolStripControlHost
{
...
protected override void OnTextChanged( EventArgs e )
{
base.OnTextChanged( e );
chk.Text = this.Text;
}
} |
|
Last Updated ( Tuesday, 30 December 2008 02:53 )
|
|
|
Blogs -
CodeCreations Blog
|
|
Media: 7000.0.081212-1400_client_en-us_Ultimate-GB1CULFRE_EN_DVD.iso Microsoft today hopefully enters the first public BETA phase for its upcoming Windows 7 operating system, a successor to the two+ year old Windows Vista. I myself have been using graphical operating systems since at least 1986's Amiga computers and almost all of Microsoft's Window's for PC's since Windows 3.1. I've used the OS for two days so far and here are my impressions. Booting my computer with the Windows 7 BETA DVD, I chose the custom install option and I selected an empty 40GB partition on my hard drive. It did not ask me to review and confirm my choice, which would have been nice. The Windows 7 BETA installer recognized the Vista multiboot menu (which had XP/Vista/Fedora 9) and added a new default boot entry for Windows 7 (32bit). Installation was much quicker than Vista's and went without a problem. |
|
Last Updated ( Saturday, 10 January 2009 21:13 )
|
|
Read more...
|
|
Programming -
.Net and C# Articles
|
|
In this series, I’ll take a stab at explaining the different types of objects used in every day applications, how they are held in memory, and how they are eventually cleaned up. Along the way, I’ll hopefully clear up some of the haze that generally surrounds the stack, the heap, object finalization, memory leaks, “unmanaged resources,” the GC (garbage collector), and some other things. This is Part 1 of 4, covering managed and unmanaged code, and the stack. Part 2 will discuss the heap. Part 3 will cover boxing and unboxing, stucts and classes, nondeterministic finalization, IDisposable, and garbage collection. Part 4 will discuss buffer overruns, stack overflows, how to hack and Xbox, and a few best practices for memory-management-aware programming in .Net. |
|
Last Updated ( Sunday, 03 August 2008 22:27 )
|
|
Read more...
|
|
|
|
|
<< Start < Prev 1 2 3 4 Next > End >>
|
|
Page 1 of 4 |