Tag: Delphi

1

Delphi: Exportar StringGrid para CSV

Delphi: Exportar StringGrid para CSV Dica: Exemplo de função para Exportar StringGrid para CSV var csv: tstringlist; row, col: integer; s,fn: string; begin fn := ExtractFilePath(Application.ExeName) + ‘bkp\’ + FormatDateTime(‘ddmmyy-hhnnsszzz’,Now) + ‘.csv’; csv:= tstringlist.create;...

0

Delphi: Forçar criação de Diretório

Delphi: Forçar criação de Diretório       if not DirectoryExists(ExtractFilePath(Application.ExeName) + ‘/teste’) then       ForceDirectories(ExtractFilePath(Application.ExeName) + ‘/teste’);  

Delphi: Ler Arquivo texto de um endereço HTTP 0

Delphi: Ler Arquivo texto de um endereço HTTP

Delphi: Ler Arquivo texto de um endereço HTTP Ler Arquivo texto de um endereço HTTP Ler Arquivo texto de um endereço Online var   S: string;   IdHTTP: TIdHTTP; begin   IdHTTP := TIdHTTP.Create(nil);...

pexels-photo-4974914.jpeg 0

Delphi: Receber parâmetros

Delphi: Receber parâmetros  Colocar no evento onCreate do Form o trecho de codigo abaixo for j := 0 to ParamCount do   begin     if ParamStr(j) <> ” then     begin       emb := ParamStr(j);...

clear light bulb placed on chalkboard 0

Delphi: Evitar que programa abra duas vezes

Delphi: Evitar que programa abra duas vezes Pessoal para evitar que um programa Delphi seja executado duas vezes simultaneamente, a melhor forma é utilizar Mutex, conforme abaixo. Var hMutex : integer; begin hMutex :=...