I've seen in many forums people asking about the possibility to open the getpict() dialog showing thumbnails instead of picture file names.
Just for fun, I did some tests simulating some keystrokes, and it works ! Save the 3 lines below in a PRG and run under WinXP:
oShell =CREATEOBJECT("Wscript.Shell")
oShell.SendKeys("{TAB}{TAB}{TAB}{TAB}{TAB}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}")
GETPICT()
The SendKeys function from WSH was used - at this link you can find all key codes, if you want to use this technique for any other purpose: http://msdn2.microsoft.com/en-us/library/system.windows.forms.sendkeys(vs.71).aspx
This was tested only in my working machine, under winxp professional. it probably does not work this way in other OS's so be careful, and if you want to use this code, check this first.
I'm almost sure that there must be another way, probably safer to do that. Do you know any?
Hi Cesar,
ReplyDeleteHere is not another way, just a smaller path :
oShell.SendKeys("+{TAB}+{F10}{DOWN}{ENTER}{ENTER}")
Thanks Christophe !
Brilliant. In it is the simplicity.
ReplyDeleteThanks.
Koen
Even Microsoft seems to recommend this kind of workaround to change some dialogs behavior, see this KB:
ReplyDeleteThe Insert Picture dialog box in Office XP programs always opens in Thumbnails view
http://support.microsoft.com/kb/301459
Versión en Español de este artículo en / Spanish version at http://www.portalfox.com/article.php?sid=2471
ReplyDeleteGETPICT() con miniaturas