Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

file not found

amyhibbsamyhibbs Member Posts: 26
i am writing a program which, using text in an editbox, opens a given file. eg. on form create if the edit box says photo1.jpg, photo1.jpg opens, if photo1.jpg is not there, the program gives an error. what do i need to say so that if the file does not exist a label appears (the latter bit is no problem).

eg.
[code]

if you cannot find photo1.jpg' then
begin //no problem from here!
image1.Visible:=false;
label2.visible:=true;
end;

[/code]

thanks

Comments

  • Filip PoverudFilip Poverud Member Posts: 27
    if not FileExists('FileName') then
    begin

    end;

    ---

    Regards

    /Filip
  • Justin BibJustin Bib USAMember Posts: 0

    ___ || http://forcoder.org || free video tutorials and ebooks about [ R, Go, PL/SQL, Python, C#, Java, Objective-C, JavaScript, MATLAB, Perl, PHP, Visual Basic, Ruby, Assembly, Swift, C++, Scratch, Delphi, C, Visual Basic .NET LabVIEW, VBScript, Apex, ML, ABAP, Hack, Crystal, Prolog, SAS, FoxPro, Awk, Kotlin, Fortran, Ada, Bash, Rust, Dart, Logo, Scheme, Julia, COBOL, Erlang, Clojure, D, Scala, Lua, Alice, Transact-SQL, Lisp, F# ] ______________

Sign In or Register to comment.