Merhaba Hacer, Kodları kontrol eder misin? var anaForm: TclStyleForm; testImg: TClProImage; LocalQ: TClSqlQuery; quoteList: TclArrayString; randomIndex: Integer;
void ShowRandomQuote; { if (quoteList.count > 0) { randomIndex = clMath.GenerateRandom(0,quoteList.count); ShowMessage(quoteList.GetItem(randomIndex)); } else { ShowMessage('No quotes available.'); } }
void SetImage; { testImg = anaForm.AddNewProImage(anaForm, 'testImg'); clComponent.SetupComponent(testImg, '{ "MarginBottom":50, "Width":50, "Height":50, "BorderColor":"#ff94c8", "BorderWidth":3, "ImgUrl":" https://i.pinimg.com/550x/2d/1b/36/2d1b36a0f02dd5f0c663a8f58207ca01.jpg" rel="nofollow - https://i.pinimg.com/550x/2d/1b/36/2d1b36a0f02dd5f0c663a8f58207ca01.jpg" , "ImgFit":"yes"}');
anaForm.AddNewEvent(testImg, tbeOnClick, 'ShowRandomQuote'); }
{ try Clomosy.DBSQLServerConnect('SQL Server', '192.168.5.11', 'sa', 'axoft', 'PRATIK24', 1433); except ShowMessage('Exception Class: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage); }
anaForm = TclStyleForm.Create(Self); LocalQ = TClSqlQuery.Create(nil); quoteList = TclArrayString.Create;
try LocalQ = Clomosy.DBSQLServerQueryWith('select kisi_adi as MAIN_TEXT from vardiyaa'); LocalQ.Open;
LocalQ.First; while (NOT LocalQ.EOF) { quoteList.Add(LocalQ.FieldByName('MAIN_TEXT').AsString); LocalQ.Next; } except ShowMessage('Exception Class: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage); } LocalQ.Free;
anaForm.SetFormColor('#ffe5fa', '#e6ffe5', clGVertical); SetImage; anaForm.Run; }
|