Sayfayı Yazdır | Pencereyi Kapat

unit hatası

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Genel İşlemler
Forum Tanımlaması: TRObject dili ile programlama yaparken karşılaşılan genel işlemler
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1648
Tarih: 12 Ağustos 2026 Saat 13:31
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: unit hatası
Mesajı Yazan: nuray
Konu: unit hatası
Mesaj Tarihi: 12 Ağustos 2026 Saat 10:50
var
  MyForm: TCLForm;
  CompanyComboBox: TCComboBox;
  UsernameEdit: TCEdit;
  PasswordEdit: TCEdit;
  LoginButton: TCButton;
  TitleLabel: TCLabel;
  MainPnl : TclProPanel; 
  AltPnl : TclProPanel; // İŞTE BURADA TANIMLIYORUZ
  LeftAltResim SolAltResim: TclImage; // RESMİ DE BURADA TANIMLIYORUZ

void OnLoginClick;
{
  // İleride buraya API'ye istek atma kodlarını ekleyeceğiz
  ShowMessage('Seçilen Şirket: ' + CompanyComboBox.Text + ' | Kullanıcı: ' + UsernameEdit.Text);
}
void openhareketdurumu;
{
  Clomosy.RunUnit('uhareketdurumu');
}

 {
 MyForm = TCLForm.Create(Self);
 MyForm.SetFormColor('#CDA2BE', '#CDA2BE',clGCross );
https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1}" crossorigin="anonymous">



Cevaplar:
Mesajı Yazan: nuray
Mesaj Tarihi: 12 Ağustos 2026 Saat 10:53
var
  MyForm: TCLForm;
  CompanyComboBox: TCComboBox;
  UsernameEdit: TCEdit;
  PasswordEdit: TCEdit;
  LoginButton: TCButton;
  TitleLabel: TCLabel;
  MainPnl : TclProPanel; 
  AltPnl : TclProPanel; // İŞTE BURADA TANIMLIYORUZ
  LeftAltResim SolAltResim: TclImage; // RESMİ DE BURADA TANIMLIYORUZ

void OnLoginClick;
{
  // İleride buraya API'ye istek atma kodlarını ekleyeceğiz
  ShowMessage('Seçilen Şirket: ' + CompanyComboBox.Text + ' | Kullanıcı: ' + UsernameEdit.Text);
}
void openhareketdurumu;
{
  Clomosy.RunUnit('uhareketdurumu');
}

 {
 MyForm = TCLForm.Create(Self);
 MyForm.SetFormColor('#CDA2BE', '#CDA2BE',clGCross );

  // Başlık Etiketi
  TitleLabel = MyForm.AddNewLabel(MyForm, 'TitleLabel', 'ERP Giriş Portalı');
  TitleLabel.Align = alMostTop;
  TitleLabel.Margins.Top = 5;
  TitleLabel.Margins.Right = 20;
  TitleLabel.Margins.Right = 20;
  TitleLabel.TextSettings.Font.Size = 40;
  TitleLabel.TextSettings.Font.Style = [fsBold];
  TitleLabel.TextSettings.FontColor = '#1a1a1a';

  // Şirket Seçim Alanı (Combobox)
  CompanyComboBox = MyForm.AddNewComboBox(MyForm, 'CompanyComboBox');
  CompanyComboBox.Align = alTop;
  CompanyComboBox.Margins.Top = 30;
  CompanyComboBox.Margins.Right= 20;
  CompanyComboBox.Margins.Right = 20;
  CompanyComboBox.Height = 45;
  
  // Örnek şirketleri listeye ekliyoruz
  CompanyComboBox.AddItem('Merkez Şirket (A.Ş.)', '1');
  CompanyComboBox.AddItem('Fabrika Şubesi (LTD.)', '2');
  CompanyComboBox.ItemIndex = 0; // Varsayılan ilk şirket seçili gelsin

  MainPnl=MyForm.AddNewProPanel(MyForm,'MainPnl');
  MainPnl.Align = alTop;
  MainPnl.Width = 300;
  MainPnl.Height = 300;  MainPnl.Margins.Top = 20;
  MainPnl.clProSettings.BorderColor = clAlphaColor.clHexToColor('#ecc0c0');
  MainPnl.clProSettings.backgroundColor = clAlphaColor.clHexToColor('#ecc0c0');
  MainPnl.clProSettings.RoundHeight = 5;
  MainPnl.clProSettings.RoundWidth = 5;
  MainPnl.clProSettings.BorderWidth = 1;
  MainPnl.clProSettings.IsFill = True; 
  MainPnl.clProSettings.IsRound = True;
  MainPnl.SetclProSettings(MainPnl.clProSettings);

  // Kullanıcı Adı Kutusu
  UsernameEdit = MyForm.AddNewEdit(MainPnl, 'UsernameEdit', 'Kullanıcı Adı');
  UsernameEdit.Align = alTop;
  UsernameEdit.Margins.Top = 15;
  UsernameEdit.Margins.Right = 20;
  UsernameEdit.Margins.Right = 20;
  UsernameEdit.Height = 40;

  // Şifre Kutusu
  PasswordEdit = MyForm.AddNewEdit(MainPnl, 'PasswordEdit', 'Şifre');
  PasswordEdit.Align = alTop;
  PasswordEdit.Margins.Top = 20;
  PasswordEdit.Margins.Right = 15;
  PasswordEdit.Margins.Right = 15;
  PasswordEdit.Height = 40
  PasswordEdit.Password = True; // Şifrenin yıldızlı görünmesini sağlar

  // Giriş Yap Butonu
  LoginButton = MyForm.AddNewButton(MainPnl, 'LoginButton', 'Giriş Yap');
  loginButton.Align =      alTop;
  LoginButton.Margins.Top = 20;
  LoginButton.Margins.Right = 15;
  LoginButton.Margins.Right = 15;
  LoginButton.Height = 40;
  
  MyForm.AddNewEvent(LoginButton, tbeOnClick, 'OnLoginClick');
  
  AltPnl = MyForm.AddNewProPanel(MyForm, 'AltPnl');
  AltPnl.Align = alBottom; 
  AltPnl.Height = 280;
  AltPnl.clProSettings.IsFill = False; 
  AltPnl.SetclProSettings(AltPnl.clProSettings);
  
  // --- RESMİ PANELE EKLEME ---
  LeftAltResim = MyForm.AddNewImage(AltPnl, 'SolAltResim');
  LeftAltResim.Align = alLeft; // Resmi alt panelin soluna dayandırır
  LeftAltResim.Width = 280;
  LeftAltResim.Margins.Left = 0;
  LeftAltResim.Margins.Bottom = 0;
  
  // Örnek bir logo url'si (Buraya kendi resminin linkini yazabilirsin)
  MyForm.SetImage(LeftAltResim, ' https://resmim.net/cdn/2026/08/12/EyIUUI.jpg" rel="nofollow - https://resmim.net/cdn/2026/08/12/EyIUUI.jpg '); 

  MyForm.Run;
}

https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1}" crossorigin="anonymous">


Mesajı Yazan: kayra22
Mesaj Tarihi: 12 Ağustos 2026 Saat 11:00
Merhaba Nuray kodun tam Hali aşağıda buluyor iyi çalışmalar dilerim                                                                                                                                                                   var
  MyForm: TCLForm;
  CompanyComboBox: TCComboBox;
  UsernameEdit: TCEdit;
  PasswordEdit: TCEdit;
  LoginButton: TCButton;
  TitleLabel: TCLabel;
  MainPnl : TclProPanel; 
  AltPnl : TclProPanel;
  LeftAltResim: TclImage; // Hata düzeltildi (Fazla isim silindi)

void openhareketdurumu;
{
  Clomosy.RunUnit('uhareketdurumu');
}

void OnLoginClick;
{
  // İleride buraya API'ye istek atma kodlarını ekleyeceğiz
  ShowMessage('Seçilen Şirket: ' + CompanyComboBox.Text + ' | Kullanıcı: ' + UsernameEdit.Text);
  
  // SAYFA GEÇİŞİ BURAYA EKLENDİ
  openhareketdurumu;
}

{
  MyForm = TCLForm.Create(Self);
  MyForm.SetFormColor('#CDA2BE', '#CDA2BE',clGCross );

  // Başlık Etiketi
  TitleLabel = MyForm.AddNewLabel(MyForm, 'TitleLabel', 'ERP Giriş Portalı');
  TitleLabel.Align = alMostTop;
  TitleLabel.Margins.Top = 5;
  TitleLabel.Margins.Right = 20;
  TitleLabel.TextSettings.Font.Size = 40;
  TitleLabel.TextSettings.Font.Style = [fsBold];
  TitleLabel.TextSettings.FontColor = '#1a1a1a';

  // Şirket Seçim Alanı (Combobox)
  CompanyComboBox = MyForm.AddNewComboBox(MyForm, 'CompanyComboBox');
  CompanyComboBox.Align = alTop;
  CompanyComboBox.Margins.Top = 30;
  CompanyComboBox.Margins.Right= 20;
  CompanyComboBox.Height = 45;
  
  // Örnek şirketleri listeye ekliyoruz
  CompanyComboBox.AddItem('Merkez Şirket (A.Ş.)', '1');
  CompanyComboBox.AddItem('Fabrika Şubesi (LTD.)', '2');
  CompanyComboBox.ItemIndex = 0; // Varsayılan ilk şirket seçili gelsin

  MainPnl=MyForm.AddNewProPanel(MyForm,'MainPnl');
  MainPnl.Align = alTop;
  MainPnl.Width = 300;
  MainPnl.Height = 300;  
  MainPnl.Margins.Top = 20;
  MainPnl.clProSettings.BorderColor = clAlphaColor.clHexToColor('#ecc0c0');
  MainPnl.clProSettings.backgroundColor = clAlphaColor.clHexToColor('#ecc0c0');
  MainPnl.clProSettings.RoundHeight = 5;
  MainPnl.clProSettings.RoundWidth = 5;
  MainPnl.clProSettings.BorderWidth = 1;
  MainPnl.clProSettings.IsFill = True; 
  MainPnl.clProSettings.IsRound = True;
  MainPnl.SetclProSettings(MainPnl.clProSettings);

  // Kullanıcı Adı Kutusu
  UsernameEdit = MyForm.AddNewEdit(MainPnl, 'UsernameEdit', 'Kullanıcı Adı');
  UsernameEdit.Align = alTop;
  UsernameEdit.Margins.Top = 15;
  UsernameEdit.Margins.Right = 20;
  UsernameEdit.Height = 40;

  // Şifre Kutusu
  PasswordEdit = MyForm.AddNewEdit(MainPnl, 'PasswordEdit', 'Şifre');
  PasswordEdit.Align = alTop;
  PasswordEdit.Margins.Top = 20;
  PasswordEdit.Margins.Right = 15;
  PasswordEdit.Height = 40; // Hata düzeltildi (Noktalı virgül eklendi)
  PasswordEdit.Password = True; // Şifrenin yıldızlı görünmesini sağlar

  // Giriş Yap Butonu
  LoginButton = MyForm.AddNewButton(MainPnl, 'LoginButton', 'Giriş Yap');
  LoginButton.Align = alTop;
  LoginButton.Margins.Top = 20;
  LoginButton.Margins.Right = 15;
  LoginButton.Height = 40;
  
  MyForm.AddNewEvent(LoginButton, tbeOnClick, 'OnLoginClick');
  
  AltPnl = MyForm.AddNewProPanel(MyForm, 'AltPnl');
  AltPnl.Align = alBottom; 
  AltPnl.Height = 280;
  AltPnl.clProSettings.IsFill = False; 
  AltPnl.SetclProSettings(AltPnl.clProSettings);
  
  // --- RESMİ PANELE EKLEME ---
  LeftAltResim = MyForm.AddNewImage(AltPnl, 'SolAltResim');
  LeftAltResim.Align = alLeft; // Resmi alt panelin soluna dayandırır
  LeftAltResim.Width = 280;
  LeftAltResim.Margins.Left = 0;
  LeftAltResim.Margins.Bottom = 0;
  
  // Örnek bir logo url'si
  MyForm.SetImage(LeftAltResim, ' https://resmim.net/cdn/2026/08/12/EyIUUI.jpg" rel="nofollow - https://resmim.net/cdn/2026/08/12/EyIUUI.jpg '); 

  MyForm.Run;
}
https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1}" crossorigin="anonymous">


Mesajı Yazan: nuray
Mesaj Tarihi: 12 Ağustos 2026 Saat 11:22
var
  MyForm: TCLForm;
  TitleLabel: TCLabel;
  
  // Kar/Zarar Paneli ve Yazilari
  ProfitLossPnl: TclProPanel;
  ProfitLossTitle: TCLabel;
  ProfitLossValue: TCLabel;
  
  // Liste Basliklari
  ReceivablesLabel: TCLabel;
  PayablesLabel: TCLabel;
  
  // Listelera
  ReceivablesList: TCLListView;
 

{
  MyForm = TCLForm.Create(Self);
  // Login ekranindaki ayni arka plan rengini koruyoruz
  MyForm.SetFormColor('#CDA2BE', '#CDA2BE', clGCross);

  // --- SAYFA BASLIGI ---
  TitleLabel = MyForm.AddNewLabel(MyForm, 'TitleLabel', 'Financial Dashboard');
  TitleLabel.Align = alTop;
  TitleLabel.Margins.Top = 15;
  TitleLabel.Margins.Left = 20;
  TitleLabel.Margins.Right = 20;
  TitleLabel.TextSettings.Font.Size = 22;
  TitleLabel.TextSettings.Font.Style = [fsBold];
  TitleLabel.TextSettings.FontColor = '#1a1a1a';
  TitleLabel.Height = 35;

  // --- KAR/ZARAR PANELİ (PROFIT / LOSS) ---
  ProfitLossPnl = MyForm.AddNewProPanel(MyForm, 'ProfitLossPnl');
  ProfitLossPnl.Align = alTop;
  ProfitLossPnl.Margins.Top = 15;
  ProfitLossPnl.Margins.Left = 20;
  ProfitLossPnl.Margins.Right = 20;
  ProfitLossPnl.Height = 85;
  ProfitLossPnl.clProSettings.BorderColor = clAlphaColor.clHexToColor('#4CAF50'); // Yesil cerceve
  ProfitLossPnl.clProSettings.backgroundColor = clAlphaColor.clHexToColor('#E8F5E9'); // Acik yesil arka plan
  ProfitLossPnl.clProSettings.RoundHeight = 10;
  ProfitLossPnl.clProSettings.RoundWidth = 10;
  ProfitLossPnl.clProSettings.BorderWidth = 2;
  ProfitLossPnl.clProSettings.IsFill = True;
  ProfitLossPnl.clProSettings.IsRound = True;
  ProfitLossPnl.SetclProSettings(ProfitLossPnl.clProSettings);

  ProfitLossTitle = MyForm.AddNewLabel(ProfitLossPnl, 'ProfitLossTitle', 'Net Profit / Loss');
  ProfitLossTitle.Align = alTop;
  ProfitLossTitle.Margins.Top = 10;
  ProfitLossTitle.Margins.Left = 15;
  ProfitLossTitle.TextSettings.Font.Size = 14;
  ProfitLossTitle.TextSettings.FontColor = '#555555';

  ProfitLossValue = MyForm.AddNewLabel(ProfitLossPnl, 'ProfitLossValue', '+ $12,500.00');
  ProfitLossValue.Align = alTop;
  ProfitLossValue.Margins.Top = 5;
  ProfitLossValue.Margins.Left = 15;
  ProfitLossValue.TextSettings.Font.Size = 22;
  ProfitLossValue.TextSettings.Font.Style = [fsBold];
  ProfitLossValue.TextSettings.FontColor = '#2E7D32'; // Koyu Yesil Yazi

  // --- ALINACAKLAR LİSTESİ (ACCOUNTS RECEIVABLE) ---
  ReceivablesLabel = MyForm.AddNewLabel(MyForm, 'ReceivablesLabel', 'Accounts Receivable');
  ReceivablesLabel.Align = alTop;
  ReceivablesLabel.Margins.Top = 20;
  ReceivablesLabel.Margins.Left = 20;
  ReceivablesLabel.TextSettings.Font.Size = 16;
  ReceivablesLabel.TextSettings.Font.Style = [fsBold];
  ReceivablesLabel.Height = 25;

  ReceivablesList = MyForm.AddNewListView(MyForm, 'ReceivablesList');
  ReceivablesList.Align = alTop;
  ReceivablesList.Margins.Top = 5;
  ReceivablesList.Margins.Left = 20;
  ReceivablesList.Margins.Right = 20;
  ReceivablesList.Height = 150; // Listenin yuksekligi

  // --- YAPILACAK ÖDEMELER LİSTESİ (ACCOUNTS PAYABLE) ---
  PayablesLabel = MyForm.AddNewLabel(MyForm, 'PayablesLabel', 'Accounts Payable');
  PayablesLabel.Align = alTop;
  PayablesLabel.Margins.Top = 15;
  PayablesLabel.Margins.Left = 20;
  PayablesLabel.TextSettings.Font.Size = 16;
  PayablesLabel.TextSettings.Font.Style = [fsBold];
  PayablesLabel.Height = 25;

  
  MyForm.Run;
}
https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1}" crossorigin="anonymous">



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net