Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Is Folder Open    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Command Buttons Everywhere
Thomas Gonder 
       
16 months ago
I like using double_click to get to things, like a double click to bring up the image on a form in some Windows image app (the default one).
How about Shift + double-click to see the path to the image (or whatever)?

Add these lines to the appropriate places in your code:
In your form helper module:
{Public Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer}

In your code for the image or document control:
  {Dim ShiftPressed As Boolean, CtrlPressed As Boolean}

{  ShiftPressed = (GetKeyState(16) And &H8000) <> 0
  CtrlPressed = (GetKeyState(17) And &H8000) <> 0
}

{  If ShiftPressed And CtrlPressed Then
  ElseIf ShiftPressed Then
    If IsFolderOpen(FilePath) Then
      AppActivate FilePath
    Else
      Shell "Explorer.exe " & FilePath, vbNormalFocus
    End If
  ElseIf CtrlPressed Then
  Else
    If Not IsNull([ID]) Then
      FileName = FilePath & LTrim(Str([ID])) & ".jpg"
      If Dir(FileName) <> cZls Then
        Call sDoOpenLink(FileName)
      End If
    End If
  End If
}
Thomas Gonder OP  @Reply  
       
16 months ago
A Note: If you are used to putting a "\" at the end of your folder path names, then you may have to append an "\" to the IsFolderOpen function line for the comparison, as Windows leaves it off.
Thomas Gonder OP  @Reply  
       
16 months ago
Final note: I've been troubled with having and not having a "\" at the end of path names. After a lot of testing this morning, I'm going without and then adding them when needed for an image/document to be shelled to.

Fix the above code to whatever standard you're going to use.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Is Folder Open.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/17/2026 11:35:35 AM. PLT: 0s