Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

Clearing prior image OpenPictureDialog1before execute

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
delphi3
Asked:
delphi3
  • 3
  • 2
1 Solution
 
JaymolCommented:
Just a guess, but try this...

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

John.
0
 
Mohammed NasmanSoftware DeveloperCommented:
Hello

  Clear the file name before you call the execute method

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

Best regards
Mohammed Nasman
0
 
Mohammed NasmanSoftware DeveloperCommented:
Hello

  Clear the file name before you call the execute method

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

Best regards
Mohammed Nasman
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
delphi3Author Commented:
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
 
Mohammed NasmanSoftware DeveloperCommented:
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
 
delphi3Author Commented:
Mohammed,
My apologies for not testing your answer as written. It does indeed work fine.
I thank you very much.

Delphi3
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now