mohammadSamSam
جمعه 20 شهریور 1394, 09:16 صبح
چه طوری می تونم با هر کلیک روی Button ی مقدار به label bedam
مثلا با هر کلیک اگه label 1بود بشه 2 وبا کلیک بعدی بشه 3  ...
arman.m.80
جمعه 20 شهریور 1394, 11:00 صبح
دوست عزیز شما با چه زبانی برنامه نویسی میکنید؟
mohammadSamSam
جمعه 20 شهریور 1394, 11:35 صبح
دلفی:ناراحت:
arman.m.80
جمعه 20 شهریور 1394, 16:13 عصر
چه خوب:لبخندساده:
کد زیر کدی هستش که این کارو میکنه:
unit Unit1;
interface
uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
 i,y123:integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
  if y123=0 then
   begin
    y123:=1;
    i:=0;
   end;
  Label1.Caption:=inttostr(i);
  inc(i,1);
end;
end.
باز هم اگه سوالی داشتی بپرس.:خجالت:
برای اجرای این کد فقط باید توی صفحهی طراحی یکlabel و یک button باشد.:چشمک:
یوسف زالی
شنبه 21 شهریور 1394, 11:11 صبح
نیازی به این همه متغیر نیست.
label1.caption := inttostr(label1.tag);
label1.tag := label1.tag +1;
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.