There were not only one time, and there were lots of programmer who used Windows Form FlowLayoutPanel control got the memory leak issues. In our case, we used FlowLayoutPanel control wrapped multiple user controls which include PictureBox controls and other controls. we need constantly clear the FlowLayoutPanel and add new user controls. We found the [Read More ...]
We often need to implement events in our own class. About how to implement events, Microsoft provides tutorials such as this one. About the concepts of Event and Delegate, please read Microsoft site here. I. Traditional Method : Microsoft provides tutorials seems still in .NET 1.1 way even the web page is showing for .NET [Read More ...]
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 ...]
Actually, there is no big different if you want to programmatically click a button in either WPF or Windows Form. They might have slightly different approach. Click: Button1.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); Press: typeof(Button).GetMethod("set_IsPressed", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(Button1, new object[] { true }); Unpress: typeof(Button).GetMethod("set_IsPressed", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(Button1, new object[] { false }); Other solution is just ButtonAutomationPeer: Please [Read More ...]
About Big endian and Little endian explanation, please read the following content from Microsoft: When designing computers, there are two different architectures for handling memory storage. They are called Big Endian and Little Endian and refer to the order in which the bytes are stored in memory. Windows NT was designed around Little Endian architecture [Read More ...]
There is no direct function to convert a string to upper case or lower case in Linux C. Here we collect 2 functions from internet: #include <ctype.h> static char* Str2Upper(char *str) { if(str == NULL) return NULL; char *p = str; while(*str) { *str = toupper(*str); [Read More ...]
There is a C++ project which is migrated from old VC++ 6.0, We use Visual Studio 2010 now. We have the following small piece of C++ header code in a .h file: #include "Accessor.h" #include "SvMemDB.H" #include "cnserver.h" #include <fstream.h> When we compile the project, we first got the following compile error: error C1083: Cannot [Read More ...]
We have a C++ project based on Linux system, so we need a good Editor but not Visual Studio since the C++ is for Linux. And, we do not want to use Ubuntu but just use Windows 7. So we decide to download Eclipse for C/C++ Windows Edition from Eclipse official site. (Note: our Windows [Read More ...]