Arsip: Deklarasi Global di delphi 8
more 16 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 16 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
AI Forward
🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now:
https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 5 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 5 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 5 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 5 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 5 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 5 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 6 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 13 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 13 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 13 years ago
Random Topic
- Simulator
by lunaromance in Tutorial & Community Project more 16 years ago - ToOl Is3ng BuaT mIndahIn dAta
by cyber_hecker in MsSQL more 19 years ago - menu aplikasi dapat di pindah posisinya ga ya????
by $tring in Hal umum tentang Pascal Indonesia more 16 years ago - input data di postgres
by ferry in Lain-lain more 17 years ago - source decrypt MD5
by waterbomm in Hal umum tentang Pascal Indonesia more 18 years ago - Komponen Yang Bagus Buat Akses ke Firebird 2
by lord_kimm in FireBird more 19 years ago - tolong di bantu, program testing RFID
by alisiana in Lain-lain more 13 years ago - Kode Looping???
by camp_sire in Tip n Trik Pemrograman more 17 years ago - Tolong bantu aku buat aplikasi untuk antrian rumah sakit....
by agustinusbobby86 in Enginering more 17 years ago - safe mode
by bodoh in OOT more 16 years ago

