|
-
Apr 19th, 2006, 03:16 PM
#1
Thread Starter
Not NoteMe
[2.0] Opening run menu
Is it possible to open the run menu (start->run) from a C# program?
If it's possible, how do i do it?
Last edited by SLH; Apr 19th, 2006 at 05:37 PM.
Reason: Missed the title!!
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Apr 19th, 2006, 04:10 PM
#2
Re: [2.0]
add a reference to System.Runtime.InteropServices at the top of your code window.
then drop this code in, i quickly knocked it together so it basically does what it says on the tin, opens the run dialog ( like when you click, start --- run )
VB Code:
[DllImport("shell32.dll", EntryPoint = "#61")]
private static extern int SHRundialog(IntPtr hOwner, int Unknown1, int Unknown2, IntPtr szTitle, IntPtr szPrompt, int uFlags);
private void button1_Click(object sender, EventArgs e)
{
IntPtr caption = Marshal.StringToHGlobalAuto("custom run dialog caption");
IntPtr title = Marshal.StringToHGlobalAuto( "what do you want to run" );
SHRundialog(this.Handle, 0 , 0 , caption, title, 2);
}
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Apr 19th, 2006, 05:36 PM
#3
Thread Starter
Not NoteMe
Re: [2.0]
Thanks for the help.
Now to work on getting it to work cross-threads! :P
Last edited by SLH; Apr 19th, 2006 at 05:42 PM.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
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
|