|
-
August 30th, 2012, 10:24 PM
#1
Minimizing a Loaded Application and More
Hi, this is my first post on this forum. I am teaching myself VB, so bare with me.
For my first application, I am writing something called Ignition.exe.
I intend for this program to autoload at startup. The program will load a bunch of programs I use often, but not every day. This way, I do not have to go through and manually load them all.
Some programs I want to load on certain parts of the screen.
Other programs I want to be minimized after loading.
I've scoured the web and I'm at a dead end, I could use some help.
You will see I used the Process.Start function to load a program. The gadget is what I want to appear on my desktop, it is fed data by the Core Temp.exe. Hence, after I load Core Temp, I want to minimize it, as it is not necessary on the desktop. So, pretty simple right? How do I minimize it?
My next question may prove more difficult. If I want the gadget to load on the top left corner of my screen, how would I code that?
Thanks
Here is my code so far:
----------------------------------
Module Module1
Sub Main()
MsgBox("Would you like to Ignite?", vbYesNo, "Ignition")
If MsgBoxResult.Yes Then
Process.Start("K:\Program Files\Core Temp\Core Temp.exe")
Process.Start("K:\Program Files\Core Temp\CoreTempGadget2.7.gadget")
Else
MsgBox("Okay, So Long!", vbOKOnly, "Ignition")
End If
End Sub
End Module
-
August 31st, 2012, 05:36 AM
#2
Re: Minimizing a Loaded Application and More
You will see I used the Process.Start function to load a program. The gadget is what I want to appear on my desktop, it is fed data by the Core Temp.exe. Hence, after I load Core Temp, I want to minimize it, as it is not necessary on the desktop. So, pretty simple right? How do I minimize it?
try the following ! .
Code:
Module Module1
Sub Main()
dim x as string
x=MsgBox("Would you like to Ignite?", vbYesNo, "Ignition")
if x=vbyes then
Process.Start("K:\Program Files\Core Temp\Core Temp.exe")
Process.Start("K:\Program Files\Core Temp\CoreTempGadget2.7.gadget")
Else
me.windowstate=vbminimized
MsgBox("Okay, So Long!", vbOKOnly, "Ignition")
End If
End Sub
End Module
Last edited by firoz.raj; August 31st, 2012 at 05:38 AM.
-
August 31st, 2012, 10:49 AM
#3
Re: Minimizing a Loaded Application and More
Even Easier. go to an elevated command prompt and type: START /?
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Users\David>start /?
Starts a separate window to run a specified program or command.
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
[command/program] [parameters]
"title" Title to display in window title bar.
path Starting directory.
B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application.
I The new environment will be the original environment passed
to the cmd.exe and not the current environment.
MIN Start window minimized.
MAX Start window maximized.
SEPARATE Start 16-bit Windows program in separate memory space.
SHARED Start 16-bit Windows program in shared memory space.
LOW Start application in the IDLE priority class.
NORMAL Start application in the NORMAL priority class.
HIGH Start application in the HIGH priority class.
REALTIME Start application in the REALTIME priority class.
Press any key to continue . . .
Or, right one CMD file. Start that. Note: You might have to elevate THAT to run as Admin, but that can start other apps.
-
September 1st, 2012, 01:55 AM
#4
Re: Minimizing a Loaded Application and More
 Originally Posted by firoz.raj
[/FONT][/COLOR]
try the following ! .
Code:
Module Module1
Sub Main()
dim x as string
x=MsgBox("Would you like to Ignite?", vbYesNo, "Ignition")
if x=vbyes then
Process.Start("K:\Program Files\Core Temp\Core Temp.exe")
Process.Start("K:\Program Files\Core Temp\CoreTempGadget2.7.gadget")
Else
me.windowstate=vbminimized
MsgBox("Okay, So Long!", vbOKOnly, "Ignition")
End If
End Sub
End Module
No
 Originally Posted by dglienna
Even Easier. go to an elevated command prompt and type: START /?
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
Or, right one CMD file. Start that. Note: You might have to elevate THAT to run as Admin, but that can start other apps.
and no
Have a look into the ShowWindow API.
By the way, this looks more like VB.NET code - am I correct? If it is indeed VB.NET, there are more options with your Process object that you could use
Last edited by HanneSThEGreaT; September 1st, 2012 at 01:58 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|