Solved

Clearing prior image OpenPictureDialog1before execute

Posted on 2001-07-13
6
152 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
Independent Software Vendors: 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

710 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