Jump to content
c0smyn

Comenzi delphi

Recommended Posts

Inchidere aplicatie

application.mainform.close; 
sau
application.terminate;

Minimize/Maximize/Restore

application.minimize; [color=green]//minimize[/color]
ShowWindow(application.MainForm.Handle, SW_MAXIMIZE) ; [color=green]//maximize[/color]
ShowWindow(application.MainForm.Handle, SW_RESTORE); [color=green]//restore[/color]

Mesaje

ShowMessage('Test' ); [color=green]//mesaj normal[/color]
raise exception.create('Test' ); [color=green]//mesaj eroare[/color]
MessageDlg('Test', mtinformation, [mbOk], 0); [color=green]//mesaj informatie[/color]
[color=green][u]//mai sunt si altele dar acestea sunt cele mai folositoare[/color][/u]

Cum incarcam/salvam un text intr-un memo

memo1.lines.loadfromfile('C:\windows\test.txt' ); [color=green]//pt a incarca[/color]
memo1.lines.savetofile('C:\windows\test.txt' ); [color=green]//pt a salva[/color]

Cum incarcam/salvam o imagine intr-un TImage

image1.picture.loadfromfile('C:\windows\test.bmp' ); [color=green]//pt a incarca[/color]
image1.picture.savetofile('C:\windows\test.bmp' ); [color=green]//pt a salva[/color]

Cum ne conectam cu un tcpclient pe un tcpserver

tcpclient1.remotehost := 'Adresa IP';
tcpclient1.remoteport := 'Port';
tcpclient1.connect; [color=green]//Conectare ...[/color]

Cum declaram o variabila

var NUME_VARIABILA: tip(string , integer , boolean , single , double etc..);
[b]EXEMPLU[/b]
var a: boolean;
begin
a := false;
if a = true then
showmessage('True')
else
showmessage('False');
end;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...