C# Tutorials
-
Trap Enter Key
private void txtTextbox_KeyPress(object sender, EventArgs e)
{
//Trap the enter key
string info = e.KeyChar.ToString();
if (info == "\r")
{
//Your code here
//This signals the event that you have ...
Posted Mar 28, 2012 9:00 AM by Tim Key
-
Common Mask for DevExpress TextEdit Control
Simple Mask Type: Phone - (999) 000-0000RegEx Mask Type: Email - [a-zA-Z0-9.-]+@[a-zA-Z0-9-]+\.[A-Za-z]{2,}
Posted Nov 30, 2011 9:38 AM by Tim Key
-
How to use CSLA NameList
using System;
using Csla;
using System.Data.SqlClient;
using System.Data;
using Csla.Data;
namespace CSLASample.NameList
{
[Serializable]
public class FindItemCollection : NameValueListBase<string, string>
{
#region Factory Methods
private static FindItemCollection ...
Posted Sep 27, 2011 6:40 AM by Tim Key
-
Restrict textbox to numeric only
Instructions: Place the code below into a KeyPress event for the textbox you wish to restrictCode Snippet://The first "if" statement is for numeric only. The second section "else ...
Posted Nov 26, 2010 6:21 AM by Tim Key
Visual Basic Tutorials
-
Launch and Manage MDI Child Forms
Change the words YourChildFormName to the actual string name of your child form. Change the words YourChildForm to your acutal ChildForm object and the words YourParentForm to your actual MDI ...
Posted Jan 14, 2010 8:39 PM by Tim Key
-
Set Control Focus at Startup
Often times when developing application and using panels, getting a control to receive startup focus can be somewhat of a pain. After much trial and error and a lot of ...
Posted Jan 14, 2010 8:38 PM by Tim Key
-
Get User Screen Resolution
There are a couple of ways to do this but the basic principle is the same. Here are a couple of ways to do this: 1) As a string function ...
Posted Jan 14, 2010 8:37 PM by Tim Key
-
Trap The Enter Key In VB.Net
All you need to do is copy and past the segment of code below into the keypress event of the control. If Asc(e.KeyChar) = Keys.Enter Then 'Do something ...
Posted Jan 14, 2010 8:36 PM by Tim Key
-
Pause or Delay Your Applicaiton
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)Public Sub Pause(ByVal seconds As Single) Call Sleep(Int(seconds * 1000#))End Sub'Add the code snippet above and ...
Posted Jan 14, 2010 8:33 PM by Tim Key
|
|