Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

Abrir arquivos no delphi

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Delphi Abrir arquivos no delphi

    Abrir arquivos no delphi sempre foi necessario, principalmente se vc for fazer algum utilitário

    então fica ae uma dica de abrir qualquer arquivos através de um form que vamos criar nesta aula

    Aula:
    Código:
    http://gzc.110mb.com/video-aulas/delphi/abrir%20arquivos%20atraves%20do%20delphi/abrindo%20arquivos%20no%20delphi.html
    código usado no bitbtn:

    Código:
    var
    r: String;
    begin
    if OpenDialog1.Execute then
    begin
    case ShellExecute(0, nil, PChar(OpenDialog1.FileName), nil, nil, SW_SHOWNORMAL) of
    ERROR_FILE_NOT_FOUND: r := 'The specified file was not found.';
    ERROR_PATH_NOT_FOUND: r := 'The specified path was not found.';
    ERROR_BAD_FORMAT: r := 'The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).';
    SE_ERR_ACCESSDENIED: r := 'Windows 95 only: The operating system denied access to the specified file.';
    SE_ERR_ASSOCINCOMPLETE: r := 'The filename association is incomplete or invalid.';
    SE_ERR_DDEBUSY: r := 'The DDE transaction could not be completed because other DDE transactions were being processed.';
    SE_ERR_DDEFAIL: r := 'The DDE transaction failed.';
    SE_ERR_DDETIMEOUT: r := 'The DDE transaction could not be completed because the request timed out.';
    SE_ERR_DLLNOTFOUND: r := 'Windows 95 only: The specified dynamic-link library was not found.';
    SE_ERR_NOASSOC: r := 'There is no application associated with the given filename extension.';
    SE_ERR_OOM: r := 'Windows 95 only: There was not enough memory to complete the operation.';
    SE_ERR_SHARE: r := 'A sharing violation occurred.';
    else
    Exit;
    end;
    Application.MessageBox(PChar(r),'Anexos',MB_OK or MB_APPLMODAL or MB_IConerror);
    end;
    ou:

    Código:
    http://gzc.110mb.com/video-aulas/delphi/abrir%20arquivos%20atraves%20do%20delphi/codigo%20usado.txt
X
Working...
X