Announcement

Collapse
No announcement yet.

DLLImport SHRunDialog

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • DLLImport SHRunDialog

    Hallo,
    kann mir jemand sagen wie der DLLImport-Aufruf in C# für
    SHRunDialog lautet. Anbei ist der Aufruf für VB.NET:
    Declare Unicode Function SHRunDialog Lib "shell32" Alias "#61" (ByVal hwnd As Integer, ByVal dummy1 As Integer, ByVal dummy2 As Integer, ByVal Title As String, ByVal Prompt As String, ByVal Flags As Integer) As Integer

    Danke für die Hilfe,
    Gruß Börge

  • #2
    Diese wohlgemerkt undokumentierte Funktion öffnet augenscheinlich den Ausführen Dialog.

    Da hast du dir mit C# und System.Diagnostics.Process schneller einen eigenen Dialog zusammengebaut.

    So gehts dann:

    [DllImport("shell32", EntryPoint = "#61")]
    public static extern int SHRunDialog(
    IntPtr hWnd, int dummy1, int dummy2,
    [MarshalAs(UnmanagedType.LPWStr)] string title,
    [MarshalAs(UnmanagedType.LPWStr)] string prompt,
    int flags);

    So hat das bei mir funktioniert

    Comment

    Working...
    X