Hi, I am currently trying to create a gui program that when you click one button, it executes Net Pause (service), and then the second button executes Net Continue (service), could anyone tell me what code I need to use in order to do this?

If it helps, I am using Dev C++ for this program, and editing an older program of mine that starts applications from buttons using

CreateWindow(TEXT("button"), TEXT("CPU-Z"),WS_VISIBLE | WS_CHILD ,20, 55, 173, 25, hwnd, (HMENU) 1, NULL, NULL);
if (LOWORD(wParam) == 1) {system("start Files\\CPUZ\\Cpuz.exe}

The above is just a line of code to open one of the programs in my older program, can I continue to use the above by editing it somehow, or do I need to use a new code?

Recommended Answers

Wouldn't it be better to write the code that will pause/start the service instead of creating a CMD window and executing the console command to pause/start the service?.

Here is a link for writing the code to pause/start a service:

Jump to Post

All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.