There was a windows form application based on .NET 4.0 and Visual Studio 2010, it was working well on a PC which we developed it. when we move its debug folder which including generated executable files, it crashed (We use Windows 7): We expanded “Show problem details” button and saw the following information: Description: Stopped [Read More ...]
After you zoom in the Microsoft Chart control. you will see X scroll bar and Y scroll bar which you can scroll the view. Also, you can see two small icons beside the scroll arrow button on scroll bars, the one is on X scroll bar, another one is on Y scroll bar. They are [Read More ...]
If you are using Windows 7 or Windows Vista, or Windows Server 2008, you should know the UAC (User Account Control), this is one of significant differences between Windows XP and the newer Windows System. “User Account Control (UAC) determines the privileges of a user. If you are a member of the Built-in Administrators group, [Read More ...]
When we use Form.DialogResult in our Windows Form project, we should know it just return a DialogResult, it does NOT call a Close method to close the form automatically. Even you click the Close icon in the top-right corner of the form to close the form. When a form is displayed as a modal dialog [Read More ...]
“You can achieve completely custom appearance and behavior by setting either the ToolStrip.Renderer property or the ToolStripManager.Renderer property to a custom renderer.” – From Microsoft. Create a custom renderer public class RedTextRenderer : _ System.Windows.Forms.ToolStripRenderer { protected override void _ OnRenderItemText(ToolStripItemTextRenderEventArgs e) { e.TextColor = Color.Red; e.TextFont = new Font("Helvetica", 7, FontStyle.Bold); base.OnRenderItemText(e); } } [Read More ...]
When you handle keyboard input in Windows Form, you have to control them in at least two level: Form level and Control level. At Form level, you MUST set the KeyPreview property of the form to true so that keyboard messages are received by the form before they reach any controls on the form when [Read More ...]
There is no direct alignment property for TableLayoutPanel. So lots of programmer have similar question: How to align the controls in TableLayoutPanel ? Finally I found several FAQs about Windows Form TableLayoutPanel control (Content from Microsoft site): Q: How to stretch and align elements within a TableLayoutPanel ?A: Use the anchor property of the control [Read More ...]