Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Task Manager with qbasic

Status
Not open for further replies.

KenshinHimura

Programmer
May 8, 2003
91
US
How would I control the task manger with qbasic? So i could end task programs with it, minimize programs, run programs, etc...
 
That would require A LOT of work. First you would need to program all of the .DLLs into some kind of QB library. I remember a few off hand:

RUNDLL32.EXE USER,EXITWINDOWS - Shuts Windows down.
RUNDLL32.EXE USER,DISABLEOEMLAYER - Locks Windows out.

Windows controls EVERYTHING it does using .DLL files and .EXE files through the program RUNDLL.EXE and RUNDLL32.EXE. Play around with RUNDLL and RUNDLL32 and discover .DLL and .EXE functions. Then you can do anything to Windows from QB/DOS. I'll send you more RUNDLL commands once I find my list. I think you can find them online using like Yahoo or something. Try it!

Examples:

[Your task manager screen]

*** Options: ***
1. Close "SOL.EXE" - Solitare
2. Close "WINWORD.EXE" - Microsoft Word 2000
3. Shut Down
4. Log Off
Enter Selection:

[User selects #3, Shut Down]

COLOR 4,0
PRINT "Computer is shutting down..."
SHELL "C:"
SHELL "CHDIR C:\WINDOWS"
SHELL "RUNDLL32.EXE USER,EXITWINDOWS"
SYSTEM/EXIT (your "Exit QB program" command)

[computer shuts down]

Now, pulling options from the task manager is a little more complicated, but I KNOW there is a .DLL for it. Look around, man!

Doug :)





Doug :)
 
Thx for the answer I've been lookin all over the internet for dll commands lately because I was trying to use windows multimedia system to play music. The only thing I found that worked was
SHELL "rundll mmsystem,sndplaysound file.wav"
I can't seem to use SHELL "rundll mmsystem,mcisendstring" because i don't know how to add the functions of mcisendstring. I can't find that many dll functions i dont know why. But I'll try to look harder thx. :)
 
Cool man! I will try to find my list also. My friend Bob is a real freak with .DLLs. I will ask him too!

Doug :)
 
Thx I've been looking for DLL functions for a long time and havn't found that many so far so if you could get me a list that would be really helpful thx. :)
 
I ATTEMPTED TO USE THIS CODE IN MY QBASIC 4.5 COMPILER, AND IT GIVES ME A RUN-TIME ERROR, WHAT COULD I BE DOING WRONG? (I AM NOT OVERLY FAMILIAR W/QBASIC, THUS, IM GUESSING, MY PROBLEM)
 
the above commands that qbasicguru is giving to shutdown a machine, is that a correct path
 
yeah i've used it and it works fine.
SHELL "rundll user,exitwinows"
of course if you don't have windows it won't work.
I guess it might depend on the version of windows you have tho.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top