When we added something such as database Connection String in App.config file in .Net 2.0, we need to use the following 2 ways to get Connection String: 1: ConfigurationSettings.AppSettings["WinTerminalDBConnString"]; But if you use this, your compiler will says “This method is obsolete, it has been replaced by ConfigurationManager.AppSettings”; So you have to use the 2nd [Read More ...]

Here is the list of C++ online reference: 1: Visual C++ 6.0 Online Documentation 2: C/C++ Languages and C++ Libraries 3: C++ Reference 4: C++ Reference 5: C++ Reference 6: Microsoft Visual C++ Developer Center

The regular way to display image in a Windows Form is using PictureBox. Here is a sample : First put a PictureBox control and ImageList control in Form1:  private void Form1_Load(object sender, EventArgs e) {     Rectangle cloneRect = new Rectangle(Properties.Resources.tray_icons.Width / 5 * 3 + 1, 0, Properties.Resources.tray_icons.Width / 5, Properties.Resources.tray_icons.Height);      System.Drawing.Imaging.PixelFormat format = Properties.Resources.tray_icons.PixelFormat;     [Read More ...]

Microsoft provides lots of learning videos. Here is their official web page of Visual C# “How Do I ?” videos: “How Do I?” Videos for Visual C#

1: Check if Bit is set         //Check if a bit is set        bool IsBitSet(Int32 aInt, int pos)        {            return (aInt & (1 << pos)) != 0;        } 2: Set Bit to 0:     static int SetZeroBit(int value, int position)    {        return value & ~(1 << position);    } 3: Set Bit to 1:     static [Read More ...]

1: How to install an assembly into the Global Assembly Cache in Visual C#

How do you give the code to Find something from a List ? Here I provided 3 ways which I have tested to confirm all of them worked: Assume I have a list which get some data items from somewhere: List<CPoint> tempPointList = GetCPointsBy(pointType, trunkAddr, sensorAddr, pName); Now I want to search something by some [Read More ...]

1: 内存映射文件,UnmapViewOfFile/MapViewOfFile

In C++ projects, to share data, multiple processes can use memory-mapped files that the system paging file stores. First process create memory file and other process open this memory file. CreateFileMapping Function OpenFileMapping Function The name of the file mapping object to be opened has the following rules (from MSDN):     Terminal Services:  The name [Read More ...]

When you create a MFC library project using Visual Studio 2010, you will see the following screen to ask you choose a DLL type, so you might be confused by the following 2 options: 1: Regular DLL using shared MFC DLL2: Regular DLL with MFC statically linked So which one you should select ? First [Read More ...]

© 2013 CodeEase.com Suffusion theme by Sayontan Sinha