Solved

Clearing prior image OpenPictureDialog1before execute

Posted on 2001-07-13
6
151 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Printing problem 2 110
Reconfigure Delphi Install? 2 64
tidtcpserver connection lost handle 2 109
enhance the following code 3 41
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

680 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