XPost: microsoft.public.vb.general.discussion, microsoft.public.vb   
   From: Ken_Halter@Use_Sparingly_Hotmail.com   
      
   "Don" wrote in message   
   news:48c1543d.7650812@news.west.cox.net...   
   > How can I capture the name of the file a user right clicks in the open   
   > file dialog using the common dialog box control?   
   >   
   > I can capture the name if a file is double clicked, or OPEN is clicked   
   > after selecting a file, or CANCEL clicked, but if they choose to right   
   > click on a file and choose OPEN WITH option, then I can't seem to get   
   > the name of the file they selected.   
   >   
   > Don   
      
   fwiw, the functionality you're describing is built in to the dialog and   
   every app using that dialog has the same limitations, regardless of which   
   language was used to write the app. You can probably setup a hooked dialog   
   to intercept this kind of thing, but constantly fighting the built in   
   behavior of any component, is an uphill battle.... the code below allows you   
   to completely replace the ocx you're using. It /probably/ traps right-click,   
   if you want it to, but I'm not sure.   
      
   CommonDialog/Direct   
   http://www.vbaccelerator.com/home/vb/code/Libraries/Common_Dialo   
   s/Common_Dialog_Direct/article.asp   
      
      
   There are a number of areas where Common Dialog/Direct improves upon the   
   implementation of COMDLG32.OCX supplied with VB:   
      
   Common Dialog hooks are supported. It is possible to:   
    Confirm files being chosen before a file dialog is closed   
    Centre dialogs accurately to any object   
    Incorporate a common dialog into your own form, like the Add Form and New   
   Project dialogs in VB5.   
    Templates are supported.   
      
   The file dialogs return the selected filter index when the user chooses a   
   file. You can get and set the custom colours set up in the colour dialog. It   
   is possible to show the Page Setup dialog for the printer   
       
      
   --   
   Ken Halter   
   Part time groupie   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|