[AccessD] Code to get a directory name via navigation

Michael R Mattys michael.mattys at adelphia.net
Sat Mar 29 12:44:27 CST 2003


Hi Jim

Since common dialogs seem to position themselves
in the upper left of the hwndOwner, the solution is
to open a form dedicated to common dialogs and
then position the form before calling the dialog.

Michael R. Mattys
www.mattysconsulting.com

----- Original Message -----
From: "Jim Lawrence (AccessD)" <accessd at shaw.ca>
To: <accessd at databaseadvisors.com>
Sent: Saturday, March 29, 2003 1:14 PM
Subject: RE: [AccessD] Code to get a directory name via navigation


> Hi Jaun and others:
>
> I have been using a similar function for years but, while we are on the
> subject, the dialog window always pops up in the top left corner of the
> screen. My question is, is there a way to control the dialog windows
> position of the current screen??? Like say, center of the screen.(?)
>
> I would greatly appreciate anyone's insight into this annoying little
> problem.
>
> TIA
> Jim
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of MastercafeCTV
> Sent: Saturday, March 29, 2003 8:19 AM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] Code to get a directory name via navigation
>
>
> We don't know any control for this, but we use Common Dialog control to
take
> a file, then InstrRev from the file that they select using the \(slash
> position) right in the Filename indicate.
>
> See the code
> Function RetrieveDirName(InitialDir as string) as string
> Screen.PreviousControl.SetFocus
> CtrlCmmDialog.DialogTitle = "Select a file"
> CtrlCmmDialog.Filter = "Al file types (*.*)|*.*"
> CtrlCmmDialog.DefaultExt = ".*"
> CtrlCmmDialog.Filename = ""
> CtrlCmmDialog.InitDir = InitialDir
> CtrlCmmDialog.ShowOpen
> If CtrlCmmDialog.Filename <> "" Then
>     RetrieveDirName = Left(CtrlCmmDialog.Filename,
> InStrRev(CtrlCmmDialog.Filename, "\") - 1)
> else
> retrieveDiaName="NULL"
> End If
> Exit Function
> End Function
>
>
> Sometimes we use the FileSearch control if know the name of the file that
> need its DirName
>
> Regards
>
> Juan Menendez
> Mastercafe SL
>
> -----Mensaje original-----
> De: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]En nombre de Arthur Fuller
> Enviado el: sábado, 29 de marzo de 2003 16:16
> Para: accessd at databaseadvisors.com
> Asunto: [AccessD] Code to get a directory name via navigation
>
>
> I have the ADH code that lets you pick a filename by nivagating to it, but
> it seems none of the args lets you request a directory name instead of a
> filename. Anyone have code to do this? (Or if it's elsewhere in ADH I just
> have to find it.)
>
> TIA,
> Arthur
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com



More information about the AccessD mailing list