One more Parameter in Getfile()

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

User avatar
quartz565
Posts: 667
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

One more Parameter in Getfile()

Post by quartz565 »

Hi,
I think it would be very useful to set an extra parameter in the function getfile() for the file(s) view in the predefined folder? i.e. 1,2,3,4,5,6 where 1=Details, 2=List, 3=Icons, 4= Tiles, 5=Thumbnails, 6=Filmstrip. This way it wouldn’t be necessary to change this setting from the view menu.

It would make it a lot easier if someone (like my): would like to choose one or more images at once (if you do not know the name of the file...)

Nikos
Best Regards,
Nikos.

os: Windows Server 2019 - 64
User avatar
quartz565
Posts: 667
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

Re: One more Parameter in Getfile()

Post by quartz565 »

It would make it a lot easier if someone (like my): would like to choose one or more images at once (OR if you do not know the name of the IMAGE file...)
Best Regards,
Nikos.

os: Windows Server 2019 - 64
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: One more Parameter in Getfile()

Post by esgici »

quartz565 wrote: I think it would be very useful to set an extra parameter in the function getfile() for the file(s) view in the predefined folder? i.e. 1,2,3,4,5,6 where 1=Details, 2=List, 3=Icons, 4= Tiles, 5=Thumbnails, 6=Filmstrip. This way it wouldn’t be necessary to change this setting from the view menu.

It would make it a lot easier if someone (like my): would like to choose one or more images at once (OR if you do not know the name of the IMAGE file...)
I guess acFilter parameter of GetFile() function may meets your need ( at least a portion ) ;)
Screenshoot of GetFileTest.prg
Screenshoot of GetFileTest.prg
GetFileTest.jpg (46.17 KiB) Viewed 4594 times
GetFileTest.zip
Source files of GetFileTest
(843 Bytes) Downloaded 258 times
Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
quartz565
Posts: 667
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

Re: One more Parameter in Getfile()

Post by quartz565 »

Hi,
That’s a very useful utility indeed Esgici. Thanks!

What I mean though is:

When we open a folder by using the getfile() command, in that window the listing of the files is always in “List” view so only the names of the files appear. So if you’d want to have a quick look at some images for example you have to go at the view menu and change it to “Thumbnails”. What I’m trying to find out is if there is an option that can be set to the getfile() command as a parameter which could do that and open the window in “Thumbnails” view.
Attachments
DIR_VIEW.png
DIR_VIEW.png (117.06 KiB) Viewed 4533 times
Best Regards,
Nikos.

os: Windows Server 2019 - 64
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: One more Parameter in Getfile()

Post by esgici »

quartz565 wrote: What I mean though is:
...
As far as know, GetFile() function of HMG calls GetOpenFileName() of Windows API.

So, "List View" is normal behavior of Windows.

"View menu" and other views are features of Windows Explorer, not sub-functions.

Maybe an expert would develop a solution for your request.

Anyway you would think develop your own GetFile() function.

When done please share with us.

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: One more Parameter in Getfile()

Post by Pablo César »

Hi Nikos !

It would be good to have something like this:
Image
or something like this:
Image

But you can do it by yourself, creating a windows, selecting path, showing pictures and multiselecting of files. All depends of your imagination and criativity. ;)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
quartz565
Posts: 667
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

Re: One more Parameter in Getfile()

Post by quartz565 »

Thanks Esgici,Pablo.

I will try...

Nikos
Best Regards,
Nikos.

os: Windows Server 2019 - 64
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: One more Parameter in Getfile()

Post by srvet_claudio »

quartz565 wrote:Hi,
I think it would be very useful to set an extra parameter in the function getfile() for the file(s) view in the predefined folder? i.e. 1,2,3,4,5,6 where 1=Details, 2=List, 3=Icons, 4= Tiles, 5=Thumbnails, 6=Filmstrip. This way it wouldn’t be necessary to change this setting from the view menu.

It would make it a lot easier if someone (like my): would like to choose one or more images at once (if you do not know the name of the file...)

Nikos
Hi Nikos.

In function C_GETFILE (file C:\hmg.3.1.5\SOURCE\c_dialogs.c, line 196) change:

Code: Select all

int flags = OFN_FILEMUSTEXIST;
for:

Code: Select all

int flags = OFN_FILEMUSTEXIST | OFN_EXPLORER;
and rebuild-lib.

Best regards,
Claudio.

PS: see picture
Attachments
Captura_GetFile.png
Captura_GetFile.png (203.87 KiB) Viewed 4432 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: One more Parameter in Getfile()

Post by esgici »

srvet_claudio wrote: In function C_GETFILE (file C:\hmg.3.1.5\SOURCE\c_dialogs.c, line 196) change:

Code: Select all

int flags = OFN_FILEMUSTEXIST;
for:

Code: Select all

int flags = OFN_FILEMUSTEXIST | OFN_EXPLORER;
and rebuild-lib.
I can't believe :o

Can't be simple as that :shock: :shock: :shock:

Viva HMG, viva Dr. Soto :D
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: One more Parameter in Getfile()

Post by esgici »

srvet_claudio wrote:...
and rebuild-lib.
I couldn't rebuild :(

Will we hope a new release ? :oops:

Best regards :D
Viva INTERNATIONAL HMG :D
Post Reply