Preface
The company CS system need to join start QQ from WinForm call QQ Chat window function, the premise is to need to chat QQ number as parameters passed to function, has not done, just very interested, toss, WinForm call QQ, I want to definitely need some coding ideas, Below is a list of pre-coding ideas
- Check the specific path in the registry after QQ installation
- Find the EXE full path (Timwp.exe) that calls the QQ program according to the registry
- Start, reach WinForm call QQ request
First look at the simple test interface
Step 1
Find the QQ registry path, after Baidu analysis to get ideas, the correct path
32-bit QQ after installation registry path software\tencent\qq2009
64-bit QQ after installation registry path software\wow6432node\tencent\qq2009
64-bit system registry path demo
Step 2
When we find the path of the registry is already very happy, you can use this path through the method to get the actual installation of QQ installation path in the system, the figure is that we need to start the actual program of QQ installation path, get this path is close to 80%.
Step 3
This step to complete the 10% code, request this EXE file, we definitely need to provide it, chat QQ number is what, need to build the process to launch the command line arguments, that is, this line of code, I believe everyone can understand, you only need a line of string, as the parameters of the startup process can be.
Step 4
The found file path and request parameter string are called as arguments to start the process resource ok,100%
Success
Up to the top, we completed the WinForm call QQ Quick chat function, the following is the method of Web page transfer
Analysis: launch browser process, open the URL of a specific request QQ link
Effect:
The following is a difficult point is the boot start, for a lot of CS program, boot start is a good, let customers know the small way to remember the software, but now 360 is too powerful, often say this program affects the speed, not many programs by him to block, But here because of hobbies, or research.
Analysis Ideas
- Related to the registry, boot boot is also a path in the registry
- Writes the specified startup program string to the registration
- Boot will start automatically
The following system code
To run the debug:
Run as Administrator:
In the process of running debugging, because the test computer system is WIN8, security level is high, has no permission to write to the registry, if it is started as an administrator can be written to the registry
Open source code:http://download.csdn.net/detail/mryanghenglian/7353877
hope to be useful to everyone, can join my group: , please respect the fruits of my labor, reproduced please explain the source, thank you
If you think the article is helpful to you, you can collect the next project encountered can be turned out to study, but also hope that we can recommend