This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy


■ P R O G R A M M I N G   W I T H   W I N D O W S   F O R M S 963



Download 21,46 Mb.
Pdf ko'rish
bet1817/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   1813   1814   1815   1816   1817   1818   1819   1820   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

P R O G R A M M I N G   W I T H   W I N D O W S   F O R M S



963

8849CH27.qxd  10/16/07  11:59 AM  Page 963




{

components.Dispose();

}

base.Dispose(disposing);



}

private void InitializeComponent()

{

this.components = new System.ComponentModel.Container();



this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.Text = "Form1";

}

}

The IContainer member variable and Dispose() methods are little more than infrastructure



used by the Visual Studio designer tools. However, do notice that the InitializeComponent() is pres-

ent and accounted for. Not only is this method invoked by a form’s constructor at runtime, Visual

Studio makes use of this same method at design time to correctly render the UI on the Forms

designer. To illustrate, change the value assigned to the Text property of the window to "My Main

Window". Once you activate the designer, you will find the form’s caption updates accordingly.

As well, when you are making use of the visual design tools (such as the Properties window),

the IDE will update InitializeComponent() automatically. To illustrate this aspect of the Windows

Forms designer tools, ensure the Forms designer is the active window within the IDE and find the

Opacity property listed in the Properties window. Change this value to 0.8 (80%), which will give

your window a slightly transparent look and feel the next time you compile and run your program.

Once you have made this change, examine the implementation of InitializeComponent() once

again:


private void InitializeComponent()

{

this.SuspendLayout();



//

// MainWindow

//

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);



this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.ClientSize = new System.Drawing.Size(284, 264);

this.Name = "MainWindow";


Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   1813   1814   1815   1816   1817   1818   1819   1820   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish