[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Opening of  File folder from OnMouseDown event of Shape1 object

Posted on 2007-11-22
2
Medium Priority
?
189 Views
Last Modified: 2010-04-05
I would like to make a form with picture in backraund. And on this picture i'll have same shapes which will connect me to defined folders when it would be clicked on the shapes.

Thank you




For example would like to open folder :  D:\pc1Lo
 from the event OnMouseDown kliking on shape1.
0
Comment
Question by:pr2501
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:pr2501
ID: 20337679


For example would like to open folder :  D:\pc1Lo

 from the event OnMouseDown kliking on shape1.
0
 
LVL 19

Accepted Solution

by:
MerijnB earned 500 total points
ID: 20337798
see attached example:
uses ShellAPI;
 
{$R *.dfm}
 
procedure OpenFolder(FolderName: string);
begin
 Screen.Cursor := crHourGlass;
 
 try
  ShellExecute(0, 'open', PChar(FolderName), '', '', SW_SHOWNORMAL);
 finally
  Screen.Cursor := crDefault;
 end;
end;
 
procedure TForm2.Shape1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
 OpenFolder('D:\pc1Lo');
end;

Open in new window

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question