Re: FileDialog window handle

Discussion in 'ASP .Net' started by Jay B. Harlow [MVP - Outlook], Sep 2, 2003.

  1. Franco,
    I do not see a method of getting the handle in any of: OpenFileDialog,
    FileDialog, nor CommonDialog.

    CommonDialog have overridable HookProc & OwnerWndProc methods, that have
    IntPtr hWnd parameters, you might be able to override one of them to get the
    window handle.

    Not sure if either method is 'too late' for what you want.

    Hope this helps
    Jay

    "Franco Gustavo" <> wrote in message
    news:...
    > Hi,
    >
    > How can I get the handle for FileOpenDialog class?
    >
    > I know I have to get it from the base class FileDialog but it doesn't have

    a
    > method to get the handle.
    >
    > Please I need it urgently.
    > Thanks so much.
    >
    >
     
    Jay B. Harlow [MVP - Outlook], Sep 2, 2003
    #1
    1. Advertising

  2. I can't override the methods, because I'm using FileOpenDialog and this
    class is sealed, If a it inherit from ComonDialog I don't have the
    funcionality from FileOpenDialog.

    Really the only that I wanna do is send a WM_COMMAND message to change the
    default view to Thumbnail view.

    Thanks

    "Jay B. Harlow [MVP - Outlook]" <> wrote in message
    news:%...
    > Franco,
    > I do not see a method of getting the handle in any of: OpenFileDialog,
    > FileDialog, nor CommonDialog.
    >
    > CommonDialog have overridable HookProc & OwnerWndProc methods, that have
    > IntPtr hWnd parameters, you might be able to override one of them to get

    the
    > window handle.
    >
    > Not sure if either method is 'too late' for what you want.
    >
    > Hope this helps
    > Jay
    >
    > "Franco Gustavo" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > How can I get the handle for FileOpenDialog class?
    > >
    > > I know I have to get it from the base class FileDialog but it doesn't

    have
    > a
    > > method to get the handle.
    > >
    > > Please I need it urgently.
    > > Thanks so much.
    > >
    > >

    >
    >
     
    Franco Gustavo, Sep 2, 2003
    #2
    1. Advertising

  3. Jay B. Harlow [MVP - Outlook]

    Sunny Guest

    Hi Franco,
    you may take a look at the threat "reflection, base class private
    properties, etc." in this group to see if using reflection to "nude" :) the
    sealed class will help you somehow.

    Sunny
    "Franco Gustavo" <> wrote in message
    news:...
    > I can't override the methods, because I'm using FileOpenDialog and this
    > class is sealed, If a it inherit from ComonDialog I don't have the
    > funcionality from FileOpenDialog.
    >
    > Really the only that I wanna do is send a WM_COMMAND message to change the
    > default view to Thumbnail view.
    >
    > Thanks
    >
    > "Jay B. Harlow [MVP - Outlook]" <> wrote in

    message
    > news:%...
    > > Franco,
    > > I do not see a method of getting the handle in any of: OpenFileDialog,
    > > FileDialog, nor CommonDialog.
    > >
    > > CommonDialog have overridable HookProc & OwnerWndProc methods, that have
    > > IntPtr hWnd parameters, you might be able to override one of them to get

    > the
    > > window handle.
    > >
    > > Not sure if either method is 'too late' for what you want.
    > >
    > > Hope this helps
    > > Jay
    > >
    > > "Franco Gustavo" <> wrote in message
    > > news:...
    > > > Hi,
    > > >
    > > > How can I get the handle for FileOpenDialog class?
    > > >
    > > > I know I have to get it from the base class FileDialog but it doesn't

    > have
    > > a
    > > > method to get the handle.
    > > >
    > > > Please I need it urgently.
    > > > Thanks so much.
    > > >
    > > >

    > >
    > >

    >
    >
     
    Sunny, Sep 2, 2003
    #3
  4. I'll try, but I could send WM_COMMAND and sent the wParam 40964 and change
    to detail View, but I can't find the ID to change to thumbnail view, I tried
    to trace it with MS SPY++ but I can't find it the ID.

    I know that if I find the right ID it is going to work, some idea for there?

    Thanks.

    "Sunny" <> wrote in message
    news:ul$...
    > Hi Franco,
    > you may take a look at the threat "reflection, base class private
    > properties, etc." in this group to see if using reflection to "nude" :)

    the
    > sealed class will help you somehow.
    >
    > Sunny
    > "Franco Gustavo" <> wrote in message
    > news:...
    > > I can't override the methods, because I'm using FileOpenDialog and this
    > > class is sealed, If a it inherit from ComonDialog I don't have the
    > > funcionality from FileOpenDialog.
    > >
    > > Really the only that I wanna do is send a WM_COMMAND message to change

    the
    > > default view to Thumbnail view.
    > >
    > > Thanks
    > >
    > > "Jay B. Harlow [MVP - Outlook]" <> wrote in

    > message
    > > news:%...
    > > > Franco,
    > > > I do not see a method of getting the handle in any of: OpenFileDialog,
    > > > FileDialog, nor CommonDialog.
    > > >
    > > > CommonDialog have overridable HookProc & OwnerWndProc methods, that

    have
    > > > IntPtr hWnd parameters, you might be able to override one of them to

    get
    > > the
    > > > window handle.
    > > >
    > > > Not sure if either method is 'too late' for what you want.
    > > >
    > > > Hope this helps
    > > > Jay
    > > >
    > > > "Franco Gustavo" <> wrote in message
    > > > news:...
    > > > > Hi,
    > > > >
    > > > > How can I get the handle for FileOpenDialog class?
    > > > >
    > > > > I know I have to get it from the base class FileDialog but it

    doesn't
    > > have
    > > > a
    > > > > method to get the handle.
    > > > >
    > > > > Please I need it urgently.
    > > > > Thanks so much.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Franco Gustavo, Sep 3, 2003
    #4
  5. Franco,
    Doh! :-|

    I figured they were there to "support the framework", however the
    documentation for the methods were not labeled as such, I checked that much.

    I forgot that the OpenFileDialog & SafeFileDialog themselves are sealed.

    Hope you find what you need.

    Jay

    "Franco Gustavo" <> wrote in message
    news:...
    > I can't override the methods, because I'm using FileOpenDialog and this
    > class is sealed, If a it inherit from ComonDialog I don't have the
    > funcionality from FileOpenDialog.
    >
    > Really the only that I wanna do is send a WM_COMMAND message to change the
    > default view to Thumbnail view.
    >
    > Thanks
    >
    > "Jay B. Harlow [MVP - Outlook]" <> wrote in

    message
    > news:%...
    > > Franco,
    > > I do not see a method of getting the handle in any of: OpenFileDialog,
    > > FileDialog, nor CommonDialog.
    > >
    > > CommonDialog have overridable HookProc & OwnerWndProc methods, that have
    > > IntPtr hWnd parameters, you might be able to override one of them to get

    > the
    > > window handle.
    > >
    > > Not sure if either method is 'too late' for what you want.
    > >
    > > Hope this helps
    > > Jay
    > >
    > > "Franco Gustavo" <> wrote in message
    > > news:...
    > > > Hi,
    > > >
    > > > How can I get the handle for FileOpenDialog class?
    > > >
    > > > I know I have to get it from the base class FileDialog but it doesn't

    > have
    > > a
    > > > method to get the handle.
    > > >
    > > > Please I need it urgently.
    > > > Thanks so much.
    > > >
    > > >

    > >
    > >

    >
    >
     
    Jay B. Harlow [MVP - Outlook], Sep 3, 2003
    #5
  6. Jay B. Harlow [MVP - Outlook]

    Mick Doherty Guest

    It's VB6 code but you should get the info you need:

    Save & Open File Dialog Demo
    http://www.mvps.org/vbvision/Sample_Projects.htm

    "Franco Gustavo" <> wrote in message
    news:%...
    > I'll try, but I could send WM_COMMAND and sent the wParam 40964 and change
    > to detail View, but I can't find the ID to change to thumbnail view, I

    tried
    > to trace it with MS SPY++ but I can't find it the ID.
    >
    > I know that if I find the right ID it is going to work, some idea for

    there?
    >
    > Thanks.
    >
    > "Sunny" <> wrote in message
    > news:ul$...
    > > Hi Franco,
    > > you may take a look at the threat "reflection, base class private
    > > properties, etc." in this group to see if using reflection to "nude" :)

    > the
    > > sealed class will help you somehow.
    > >
    > > Sunny
    > > "Franco Gustavo" <> wrote in message
    > > news:...
    > > > I can't override the methods, because I'm using FileOpenDialog and

    this
    > > > class is sealed, If a it inherit from ComonDialog I don't have the
    > > > funcionality from FileOpenDialog.
    > > >
    > > > Really the only that I wanna do is send a WM_COMMAND message to change

    > the
    > > > default view to Thumbnail view.
    > > >
    > > > Thanks
    > > >
    > > > "Jay B. Harlow [MVP - Outlook]" <> wrote in

    > > message
    > > > news:%...
    > > > > Franco,
    > > > > I do not see a method of getting the handle in any of:

    OpenFileDialog,
    > > > > FileDialog, nor CommonDialog.
    > > > >
    > > > > CommonDialog have overridable HookProc & OwnerWndProc methods, that

    > have
    > > > > IntPtr hWnd parameters, you might be able to override one of them to

    > get
    > > > the
    > > > > window handle.
    > > > >
    > > > > Not sure if either method is 'too late' for what you want.
    > > > >
    > > > > Hope this helps
    > > > > Jay
    > > > >
    > > > > "Franco Gustavo" <> wrote in message
    > > > > news:...
    > > > > > Hi,
    > > > > >
    > > > > > How can I get the handle for FileOpenDialog class?
    > > > > >
    > > > > > I know I have to get it from the base class FileDialog but it

    > doesn't
    > > > have
    > > > > a
    > > > > > method to get the handle.
    > > > > >
    > > > > > Please I need it urgently.
    > > > > > Thanks so much.
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Mick Doherty, Sep 3, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan Ignatov

    Re: FileDialog window handle

    Dan Ignatov, Sep 4, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,079
    Dan Ignatov
    Sep 4, 2003
  2. Hans Stoessel
    Replies:
    2
    Views:
    671
    Mickey Segal
    Jul 30, 2004
  3. Andrew Thompson

    Re: FileDialog Save as Type Problem

    Andrew Thompson, Aug 14, 2004, in forum: Java
    Replies:
    4
    Views:
    1,063
    Andrew Thompson
    Aug 15, 2004
  4. Ike
    Replies:
    2
    Views:
    541
  5. Anand Pillai

    wxPython Filedialog question

    Anand Pillai, Jun 27, 2003, in forum: Python
    Replies:
    0
    Views:
    1,063
    Anand Pillai
    Jun 27, 2003
Loading...

Share This Page