Results 1 to 3 of 3

Thread: [2.0] Opening run menu

  1. #1

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    [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.


  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142

    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:
    1. [DllImport("shell32.dll", EntryPoint = "#61")]
    2.         private static extern int SHRundialog(IntPtr hOwner, int Unknown1, int Unknown2, IntPtr szTitle,  IntPtr szPrompt, int uFlags);
    3.  
    4.         private void button1_Click(object sender, EventArgs e)
    5.         {
    6.             IntPtr caption = Marshal.StringToHGlobalAuto("custom run dialog caption");
    7.             IntPtr title = Marshal.StringToHGlobalAuto( "what do you want to run" );
    8.             SHRundialog(this.Handle, 0 , 0 , caption, title, 2);
    9.         }
    ~
    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]

  3. #3

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    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
  •  



Click Here to Expand Forum to Full Width