I’m trying to figure out how to write code to quickly open a PNG file from within my little program. Here’s the scenario:
- I have multiple picture files, say PNG’s, in multiple folders (in the same root as the program).
- I want to be able to recall any of those pictures and display them quickly with as few keystrokes as possible, and hopefully no mouse needed.
Then, while the program is active, I want to be able to
- Press a key to let the program know I want to load a new file, say “O”;
- Type the two-digit folder name, such as “LL”, and
- Type a two-digit filename, such as “05” (where the extension “.png” is assumed)
- the program opens the /LL/05.png file and displays it full-screen
I have been able to make a “predetermined” picture display, and gotten a Open File Dialogue box to display, but not the direct method I’m talking about here.
My solution is not perfect and should need a lot of additional checks.
Anyway it’s a starting point for your needs.
First of all set
KeyPreview = trueon your form.Then use: