1. Elvis Cardenas
  2. PowerBuilder
  3. Tuesday, 29 September 2020 18:25 PM UTC

hola, ¿que parámetros le envío al GetFileOpenName para que me salga la ventana con las opciones de amarillo?

hi, What parameters do I send to GetFileOpenName so that I get the window with the yellow options?

Solo he logrado conseguir lo siguiente

I have only managed to achieve the following

string is_filename, is_fullname
int   li_fileid

GetFileOpenName ("Open", is_fullname, is_filename, &
   "txt", "Text Files (*.txt),*.txt,INI Files " &
   + "(*.ini), *.ini,Batch Files (*.bat),*.bat", &
   "d:\temp", 32770) 

 

Thanks.

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 29 September 2020 21:30 PM UTC
  2. PowerBuilder
  3. # Permalink

Not using the GetFileOpenName PowerScript function.

However, I suggest you examine the "GetFileName" free code sample on Roland Smith's TopWizProgramming.com web site:

https://www.topwizprogramming.com/freecode_getfilename.html

It uses Windows API functions / structures. It does not provide a preview, however.

Here's what the dialog window looks like:

Regards, John

Comment
  1. Elvis Cardenas
  2. Tuesday, 29 September 2020 22:04 PM UTC
Gracias

Thanks so much.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 30 September 2020 10:32 AM UTC
  2. PowerBuilder
  3. # 1

Myself I also use the function provided by Roland, since one that was already there before I knew that (now) it's also possible with GetFileOpenName():

You have to pass in somehow OFN_EXPLORER (=2) as part of the aFlag parameter. The value you would have to sum to any other values of the aFlag for that behaviour is:

2 to the power of (OFN_EXPLORER-1) = 2 to the power of (2 - 1) = 2 to the power of 1 = 2.

From the pb help on GetFileOpenName().

For example, passing the flag 32768 (2^15) to the GetFileSaveName function opens the old-style dialog box with the Read Only check box selected by default. Passing the flag 32770 opens the Explorer-style dialog box with the Read Only check box selected by default.

 

Index

Constant name

Description

1

OFN_CREATEPROMPT

If the specified file does not exist, prompt for permission to create the file. If the user chooses to create the file, the dialog box closes; otherwise the dialog box remains open.

2

OFN_EXPLORER

Use an Explorer-style dialog box.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.