Arsip: Deklarasi Global di delphi 8
more 15 years ago
rusli_chow
Rekan delphier, gimana ya mendeklarasikan suatu variabel tapi variabel tersebut dapat dipakai utk semua form dalam satu project ? Saya deklarasikan di bawah implementation tapi yang bisa pakai variabel ini cuma dalam 1 form.
seperti ini ;
unit WinForm;
interface
uses
System.Drawing, System.Collections, System.ComponentModel,
System.Windows.Forms, System.Data;
type
TWinForm = class(System.Windows.Forms.Form)
{$REGION 'Designer Managed Code'}
strict private
/// <summary>
/// Required designer variable.
/// </summary>
Components: System.ComponentModel.Container;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure InitializeComponent;
procedure TWinForm_Load(sender: System.Object; e: System.EventArgs);
{$ENDREGION}
strict protected
/// <summary>
/// Clean up any resources being used.
/// </summary>
procedure Dispose(Disposing: Boolean); override;
private
{ Private Declarations }
public
constructor Create;
end;
[assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]
implementation
//saya deklarasikan disini
var a : string;
more 15 years ago
pebbie
global var di bagian interface bisa diakses oleh semua unit lain yang menginklusi unit tsb. global var di bagian implementation hanya bisa diakses oleh modul tsb (global thd kode prosedur/class method di lingkup implementation itu saja).
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 5 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- bagaimana menggunakan quick report
by divanda in Hal umum tentang Pascal Indonesia more 17 years ago - Ask: Open Query With Multi Thread
by cyber_hecker in Tip n Trik Pemrograman more 18 years ago - mencari jumlah subtotal pada seluruh record pada 1 table
by khumaedy in Tip n Trik Pemrograman more 16 years ago - Tanya Cara Compact And Repair DiFireBird
by bendot20 in FireBird more 16 years ago - MS SQL server service
by iconfuseme in MsSQL more 17 years ago - MySQL dan Oracle
by xproof in MySQL more 15 years ago - Desktop VS Web Programming
by dannyong1999 in OOT more 17 years ago - Program zoom in/out images
by zed1308 in Tip n Trik Pemrograman more 15 years ago - [Ask]User login ID and password
by vahnkrist in Bedah Kasus more 12 years ago - Pascal Data Objects (PDO)
by Kecret in OpenSource dan Gratis more 17 years ago