Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 To: dencio cabacis
  Where is dencio cabacis?
 mandaluyong
 Philippines
 dencio cabacis
 Tags
Subject: RE: Autocomplete file/directory chooser?
Thread ID: 112271 Message ID: 112323 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Tuesday, November 07, 2006 11:28:14 AM         
   


What does it do? There does not seem to be anything happening in my system.

> > Hello,
> >
> > I would like to provide a combobox control that makes typing in a directory path or file name easier. Prior-visited paths would be nice, but I care more about helping the user along as they type a path name by hand, displaying matching directory or file names in the drop-down for easy selection. The IE File/Open dialog is what I'm after, or, even better, the Windows Explorer address bar, which, when dropped-down via mouse click, shows "Desktop", "My Document", "My Computer", etc.
> >
> > Any advice much appreciated.
> >
> > Thanks,
> > Howard

>
>
>
> Hello! Try this sample code. It uses SHAutoComplete API, I have tried this API before in VB, but looking for a VFP equivalent and found this. Sorry, I don't remember the site and the author of this code. I hope this gives you another alternative.
>
> #DEFINE SHACF_AUTOAPPEND_FORCE_OFF 0x80000000
> #DEFINE SHACF_AUTOAPPEND_FORCE_ON 0x40000000
> #DEFINE SHACF_AUTOSUGGEST_FORCE_OFF 0x20000000
> #DEFINE SHACF_AUTOSUGGEST_FORCE_ON 0x10000000
> #DEFINE SHACF_DEFAULT 0x0
> #DEFINE SHACF_FILESYSTEM 0x1
> #DEFINE SHACF_URLHISTORY 0x2
> #DEFINE SHACF_URLMRU 0x4
> #DEFINE SHACF_URLALL SHACF_URLHISTORY +SHACF_URLMRU
> DECLARE SHAutoComplete IN "shlwapi.dll" LONG hwndEdit, LONG dwFlags
>
> PUBLIC oFrm
> oFrm=NEWOBJECT("autocompletar_api")
> oFrm.SHOW
> RETURN
>
> DEFINE CLASS autocompletar_api AS FORM
> HEIGHT = 105
> WIDTH = 470
> SHOWWINDOW = 2
> SHOWINTASKBAR = .F.
> DOCREATE = .T.
> AUTOCENTER = .T.
> CAPTION = "AutoCompletar desde VFP"
> NAME = "AutoCompletar_Api"
> ADD OBJECT text1 AS OLECONTROL WITH ;
> BASECLASS="Olecontrol",;
> CLASS = "Olecontrol",;
> OLECLASS = "RICHTEXT.Richtextctrl.1",;
> TOP = 12, ;
> LEFT = 24, ;
> HEIGHT = 24, ;
> WIDTH = 435, ;
> TABINDEX = 1, ;
> NAME = "text1",;
> TEXT = ' '
> ADD OBJECT Paginas AS COMMANDBUTTON WITH ;
> TOP = 48, ;
> LEFT = 313, ;
> HEIGHT = 27, ;
> WIDTH = 144, ;
> CAPTION = "Paginas Web", ;
> TABINDEX = 3, ;
> NAME = "Paginas"
> ADD OBJECT Archivos AS COMMANDBUTTON WITH ;
> TOP = 48, ;
> LEFT = 24, ;
> HEIGHT = 27, ;
> WIDTH = 144, ;
> CAPTION = "Sistema de Archivos", ;
> TABINDEX = 2, ;
> NAME = "Archivos"
>
> PROCEDURE Paginas.CLICK
> SHAutoComplete(THISFORM.text1.HWND , SHACF_AUTOSUGGEST_FORCE_ON +SHACF_URLALL)
> ENDPROC
>
> PROCEDURE Archivos.CLICK
> SHAutoComplete(THISFORM.text1.HWND , SHACF_AUTOSUGGEST_FORCE_ON +SHACF_FILESYSTEM)
> ENDPROC
> ENDDEFINE




Mike Gagnon


ENTIRE THREAD

Autocomplete file/directory chooser? Posted by Howard Hendler @ 11/7/2006 12:26:57 AM
RE: Autocomplete file/directory chooser? Posted by Mike Gagnon @ 11/7/2006 1:00:00 AM
RE: Autocomplete file/directory chooser? Posted by Howard Hendler @ 11/7/2006 1:10:47 AM
RE: Autocomplete file/directory chooser? Posted by Ken Murphy @ 11/7/2006 1:16:49 AM
RE: Autocomplete file/directory chooser? Posted by Howard Hendler @ 11/7/2006 1:39:27 AM
RE: Autocomplete file/directory chooser? Posted by Ken Murphy @ 11/7/2006 1:58:51 AM
RE: Autocomplete file/directory chooser? Posted by Howard Hendler @ 11/7/2006 3:20:14 AM
RE: Autocomplete file/directory chooser? Posted by Mike Gagnon @ 11/7/2006 4:08:36 AM
RE: Autocomplete file/directory chooser? Posted by Howard Hendler @ 11/7/2006 8:45:48 PM
RE: Autocomplete file/directory chooser? Posted by dencio @ 11/7/2006 8:58:59 AM
RE: Autocomplete file/directory chooser? Posted by Mike Gagnon @ 11/7/2006 11:28:14 AM
RE: Autocomplete file/directory chooser? Posted by tushar @ 11/7/2006 3:57:05 PM
RE: Autocomplete file/directory chooser? Posted by Howard Hendler @ 11/7/2006 10:35:54 PM
RE: Autocomplete file/directory chooser? Posted by Ken Murphy @ 11/8/2006 2:16:48 AM
RE: Autocomplete file/directory chooser? Posted by Howard Hendler @ 11/8/2006 5:27:58 AM
RE: Autocomplete file/directory chooser? Posted by tushar @ 11/8/2006 4:36:26 PM
RE: Autocomplete file/directory chooser? Posted by dencio @ 11/9/2006 9:40:55 AM
RE: Autocomplete file/directory chooser? Posted by Howard Hendler @ 11/14/2006 1:53:36 PM