摘要: Here is Another User Control A pick to of The Control:As you can see this one contains a Listbox and 7 buttons for the Add,Remove,up,down,,RemoveAll,Top,Bottom etc1. Add a user control to project. Add a list box and 7 button as show in the figure.Coding:Properties This is For Left/Right Side Butto.. 阅读全文
posted @ 2012-04-01 14:58 sandeepparekh9 阅读(154) 评论(0) 推荐(0) 编辑
摘要: hi. I really needed a Richtext box with Word like functionality.. i mean Bold,Italic etc etc Function. So i decided to write a Custom Control for this Purpose. Extended RichTextBox Contains Following Controls 1. Rich Text Box [ rtxtBox ] 2. A tool Strip with Basic button including word Formatting .. 阅读全文
posted @ 2012-04-01 14:56 sandeepparekh9 阅读(6856) 评论(0) 推荐(0) 编辑
摘要: It's Very Easy to make a Numeric only TextBox .. Just right the Following Code on The Textbox's KeyPress Event.. private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar > 31 && (e.KeyChar < '0' || e.KeyChar > '9')) { e.Handled = ... 阅读全文
posted @ 2012-04-01 14:53 sandeepparekh9 阅读(142) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Text;using System.IO;class clsLog{ private StringBuilder strLog; private string strFileName = string.Empty; //Initialize Logging //##################################################################################################... 阅读全文
posted @ 2012-04-01 14:52 sandeepparekh9 阅读(110) 评论(0) 推荐(0) 编辑
摘要: public string GetLocalHostName() { return System.Net.Dns.GetHostName(); } 阅读全文
posted @ 2012-04-01 14:51 sandeepparekh9 阅读(113) 评论(0) 推荐(0) 编辑
摘要: public static string GetLocalIP() { string _IP = null; System.Net.IPHostEntry _IPHostEntry = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()); foreach (System.Net.IPAddress _IPAddress in _IPHostEntry.AddressList) { if (_IPAd... 阅读全文
posted @ 2012-04-01 14:51 sandeepparekh9 阅读(211) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;using System.IO;using Microsoft.Win32;using System.Drawing; public sealed class clsWallpaper { const int SPI_SETDESKWALLPAPER = 20; const int SPIF_UPD... 阅读全文
posted @ 2012-04-01 14:50 sandeepparekh9 阅读(152) 评论(0) 推荐(0) 编辑
摘要: public byte[] ReadByteArrayFromFile(string fileName) { byte[] buff = null; FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); long numBytes = new FileInfo(fileName).Length; buff =... 阅读全文
posted @ 2012-04-01 14:49 sandeepparekh9 阅读(147) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Runtime.InteropServices; /// /// This class will show or hide windows taskbar for full screen mode. /// internal class HandleTaskBar { private const int SWP_HIDEWINDOW = 0x0080; private const int SWP_SHOWWINDOW = 0x0040; /// /// Default Constructor. ... 阅读全文
posted @ 2012-04-01 14:49 sandeepparekh9 阅读(111) 评论(0) 推荐(0) 编辑
摘要: First Add This Namespacesusing System;using System.Collections.Generic;using System.Text;using System.Security;using System.Security.Cryptography;using System.Runtime.InteropServices;using System.Text.RegularExpressions;using System.IO;using System.Windows.Forms; Now The Function: public void Decryp 阅读全文
posted @ 2012-04-01 14:44 sandeepparekh9 阅读(134) 评论(0) 推荐(0) 编辑