Urban Design Road [Road of Programming] When you know the computer, you think it is a mysterious thing. Only high IQ people know how to "talk" with the monitor; you know the programmer, a very sacred work, Need high degree and IQ; the first time I touched the computer's keyboard in high school, I can't say it; university began to truly touch the computer, using Borland Turbo Pascal under DOS and wrote the first program of life; Today, the computer is already very ordinary, and the primary school students are also skilled in operation of the computer (the teens and children who write the genius procedures are more likely to get angry). The programmer is also very common. Visual Basic brings the program design into the work learning of ordinary public and even entertainment (Microsof is not possible). Despite this, there are still many friends who want to be a programmer (no matter what your purpose is, showing off or achieving self), under the driving of the RAD development tool, your wish you write the fastest implementation, your "" Grade "Let you cheer more than once.
In the RAD development tool, such as Visual Basic, you don't need to write a line of code to generate a standard form in a Windows environment (of course, it doesn't do anything), and when there is no RAD tool and the RAD tool just started to germinate, Programmer is a total of 1000 in order to create such a form in Windows, earlier, the programmer writes a similar Turbo C or Turbo Pascal's IDE (iDE that does not do anything else) in DOS. -2000 line code). Programming is a hard process (seeking the process of going to design the WPS of Bojun is an example). In today, many friends are keen on chasing the latest technology, skills, this is not wrong, but you need to have a solid basic skill. For example, minimizing program icons to the system tray is a common skill. Generally speaking, you will not do this so, you will also implement the mouse, click this icon, click this icon ( Left button or right key) Turn out the specified form, pop-up menu, etc. The easiest way to achieve this should be to use the components that others have written, but not flexible enough. More, we call the Windows API to achieve this feature, flexible but trouble. This problem is better in C #. In C #, there is a Notifyicon control and the NOTISTEM.WINDOWS.FOMRS.NOTIFYICON, and you can easily meet your requirements. So how is the programmer completed this function before this? Under Windows SDK, the programmer uses shell_notifyicon () API function (whose prototype is: Winshellapi Bool WinApi shell_notifyicon
DWORD dwMessage, // message identifier PNOTIFYICONDATA pnid // pointer to structure);), and to assign (which is a prototype for this function pnid parameters: typedef struct _NOTIFYICONDATA {// nid DWORD cbSize; HWND hWnd; UINT uID; UINT Uflags; Uint UcallbackMessage; Hicon Hicon; char sztip [64];} notifyicondata, * pNotifyicondata; then you can successfully call this API in your program to complete your function. In order to respond to your mouse event (implement the mouse double-click, click the icon (left button or right) to call the specified form, pop-up menu, etc., you want to map the corresponding message, then add you to you want it Perform operation. This completes a simple system tray program. In contrast, use C # to be simple. We are not to write procedures for chasing the latest popular technology. Learning the latest technology can improve our programming concept, making our program to apply in a broader field, allowing us to get the greatest gain. Of course not to show off to others.
The process of learning is not one, it takes long-term experience, accumulation and precipitation, especially software development. The heart is cold, and it is not advisable for us to have a good time. When we learn new technology, we should understand the principles of this technology. When we apply a trick, it should not only know how it will be known. The reason why the system pallet skill is implemented in C # is simply because the Notifyicon class encapsulates that it is necessary to complete it. The more you do it, the more we do it, the more convenient we use it. I don't know if it is, you can also complete a certain function, but will not be a qualified programmer, qualified programmers must know what it is.
The new development tool (language) greatly improves our work efficiency, but it is not easy to apply them in practice. Learning to use the aim of software development. The road to program design must not be flat, you need you have enough patience and perseverance.