The simplest method can be implemented with two functions:
Start a new programWinExec ("The path to deposit another new program", Sw_show);Shutdown the current execution software
ExitThread (0);
If in win CE, use winexec this function is wrong, then should use ShellExecuteEx.
Shellexecuteinfo Shexecinfo;
shexecinfo.cbsize = sizeof (SHELLEXECUTEINFO);Shexecinfo.fmask = see_mask_nocloseprocess;Shexecinfo.hwnd = NULL;Shexecinfo.lpverb = NULL;S
source program : written in the source language, the program to be translated, known as the "source program." Source language can be assembly language, or advanced programming language (such as C + + language), the program written by them are source programs.
Target Program
Execute with shellexcute
Use waitforsingleobject to wait for its end
---------------------------------------------------------------
How to start
Program Until it stops running?
Shellexecuteinfo shexecinfo = {0 };
Shexecinfo. cbsize = sizeof (shellexecuteinfo );
Shexecinfo. fmask = see_mask_nocloseprocess;
Shexecinfo. hwnd = NULL;
Shexecinfo. lpverb = NULL;
Shexecinfo. lpfile = "C: \ myprogram.exe ";
Shexecinfo. lpparameters = "";
Shexecinfo. lpdire
Cause: it is suspected that during initialization, it takes time to read the USB flash disk information. Therefore, the code for reading the USB flash disk information is moved to domodal (), so that it can be properly displayed on the USB flash disk.
Cnewregdlg regdlg(this);regdlg.exe directory = pketang-> exedirectory; regdlg. bhasverified = bhasverified; regdlg. bu_hasverified = bu_hasverified; regdlg. makeu_machincode (regdlg. m_umachincode); // if it is placed in the initialization fun
Learn how to get the mobile phone program list and program-related information and start the specified program
:
Program list:
Start the program and obtain the program information:
The Code is as follows:
Create an AppInfo
Call
Calls another batch program from one batch program and does not terminate the parent batch program. The call command accepts the label used as the calling target. If you use call outside of a script or batch file, it will not work on the command line.
Grammar
call [[Drive:][path] FileName [batchparameters]] [: Label [arguments]]
Parameters
[Drive:}[Path] F
Call
From one batch
Program Call another batch processing program without terminating the parent batch processing program. The Call Command accepts the labels used as the call target. If a call is used outside a script or batch file, it does not work in the command line.
SyntaxCall [[drive:] [path] filename [batchparameters] [: Label [arguments]
Parameters
Computer sound problems are a problem many users have encountered, usually our team audio settings to adjust or reload the sound card driver can be resolved, and small knitting today encountered a particularly strange problem, running multiple applications, but found that one of the programs do not sound, and other Windows program sound is normal, What is the cause of this problem and what do we need to solve? The following small series on their own e
1014 C language Grammar definition and C program derivation process program: Bubbling algorithm C program (syntax tree)1 Read and understand the C language grammar files provided to everyone. 2 refer to this file to write a good understanding version of the real version of the full version of the C language grammar. 3 a C
Executive program Times wrong, Baidu search, first search this blog http://blog.csdn.net/huqiao1206/article/details/50768481, think the solution is too troublesome,Continue to search, and search this blog http://www.cnblogs.com/zhongtang/p/7448823.html (has been reproduced by me, on a blog is, afraid of the day his blog is not),Look at it is the solution, is ready to search again, suddenly found in the bottomThere is also a solution, (I assume you hav
For example, an Android program contains two activity, mainactivity and otheractivity,mainactivity for program-initiated activity. If the program is located in Otheractivity, click the Home button, the program returns to the desktop,In the second click of the program icon, t
Learn how to get the mobile phone program list and program-related information and start the specified program (26), android-related information
:
Program list:
Start the program and obtain the program information:
The Code
Program 1: python codes for login program (python code of the logon program), codespython
#improt time module for count down puase timeimport time#set var for loop countingcounter=1#login settingwhile counter
Read me program description:
Design a login program that requires
This article mainly introduces three methods of running time from the start of the python computing program to the end of the program and the CPU time of the program running. for details, refer to the execution time.
Method 1
The code is as follows:
Import datetimeStarttime = datetime. datetime. now ()# Long runningEndtime = datetime. datetime. now ()Print
Tags: http ar, SP file, on, problem code, html
When C-free is used, mingw5 is used to compile C ++ code, and the first line of error is returned:
> 1: Error: stray '\ 239' in program
> 1: Error: stray '\ 187' in program
> 1: Error: stray '\ 191' in program
Baidu found that there may be Chinese characters (such as spaces and Chinese periods). This proble
a design ideafirst , create a class in file and write the task name and class name (note the capitalization of the class name); The second step is the input of the parameter, and the sum variable is defined, and the third step is the requirement of the parameter data type, to convert the character type to an integer type and output (which is also the focus of this topic), This step is, of course, placed in the for loop of the input parameter, and finally the sum of the arguments and the output p
Execution time
Method 1Copy codeThe Code is as follows:Import datetimeStarttime = datetime. datetime. now ()# Long runningEndtime = datetime. datetime. now ()Print (endtime-starttime). seconds
Method 2Copy codeThe Code is as follows:Start = time. time ()Run_fun ()End = time. time ()Print end-start
Method 3Copy codeThe Code is as follows:Start = time. clock ()Run_fun ()End = time. clock ()Print end-start
Methods 1 and 2 both contain the CPU usage time of other programs, which is the running t
When listening to a song or watching a movie, if you open a page with background music will feel very noisy, neither want to turn off the Web page, and do not want to stop the player, you can use the Win7 volume control function to make the browser mute. The small horn in the lower right corner of the system to adjust the volume you will always use, but in the Win7, this small horn can do a lot of things, such as we can use its volume synthesizer, so
Q: How do I run another program after a program runs? 1. The easiest way to run another program inside a program is to include them sequentially in a batch file (with the extension. BAT file), the programs listed in the batch file are run automatically when it is executed.In either C or DOS, there is no specific way to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.