Solved

Clearing prior image OpenPictureDialog1before execute

Posted on 2001-07-13
6
153 Views
Last Modified: 2010-04-06
Hi All,
I want to clear the OpenPictureDialog preview panel before each execute so that it opens
with a blank as if it was the first time. In the nomal operation the last selection is on the preview.
Any help and an example would be appreciated.

Delphi3
0
Comment
Question by:delphi3
[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
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:Jaymol
ID: 6280584
Just a guess, but try this...

  With TOpenPictureDialog.Create(nil) do begin
    FileName:='';
    Execute;
    Free;
  end;

John.
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6281448
Hello

  Clear the file name before you call the execute method

  OpenPictureDialog1.FileName :='';
  if OpenPictureDialog1.Execute then
 ......

Best regards
Mohammed Nasman
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 50 total points
ID: 6281466
Hello

  Clear the file name before you call the execute method

  OpenPictureDialog1.FileName :='';
  if OpenPictureDialog1.Execute then
 ......

Best regards
Mohammed Nasman
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Author Comment

by:delphi3
ID: 6287874
Mohammed,
What you have suggested does not work. The prior picture is still there when going to load the next picture.
Can you think of another possibility?

Delphi3
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6288591
delphi3, I tested my code and it's work fine

can you plz, post ur code that show the OpenPictureBox, and which event you use?


Mohammed
0
 
LVL 4

Author Comment

by:delphi3
ID: 6288744
Mohammed,
My apologies for not testing your answer as written. It does indeed work fine.
I thank you very much.

Delphi3
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

617 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