0% found this document useful (0 votes)
3 views

UNIT2

Uploaded by

Mathanraj S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

UNIT2

Uploaded by

Mathanraj S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

COMPONENT

BASED
TECHNOLOGY
COMPONENT BASED TECHNOLOGY

UNIT-II
APPLICATION DEVELOPMENT USING C# .NET

3Mark:
1.Define Windows Programming?
Visual Studio .NET y; ,uz;L User Interface fs; c s ; s d
(i) Windows Form
(ii) Web form
Windows Forms: Windows Application i a c U t h f ; f gad;gLfpd;wd.
Web Forms: Web Application fi s c U t h f ; f gad;gLfpd;wd.

Define Event?
2.

xU Form m y ; y J Control kPJ nra;ag;gLk; ve;j xU action f;Fk; event vd;W


ngah;
Eg: Key i a Press g z ; Z t J , Mouse [ Click n r a ; t J

Define Click and Load?


3.

Clcik: Button,label Nghd;w xU Control kPJ runtime y; click nra;Ak; NghJ , e ; j Event
Vw;gLfpwJ
Load: xU form M d J Load MFk; NghJ , e ; j event Vw;gLfpwJ. Load event y; code
vOjg;gLLhy;; form xt;nthU K i w Load MFk;

Define Mouse UP, Mouse Down and Mouse move?


4.

Mouse Move: Mouse Pointer [ label ,button Nghd;w xU Control kPJ efh;j;jpdhy;
Mouse mouse event Vw;gLfpwJ.
Mouse down: Mousey; c s ; s Key fPNo mOj;jk; NghJ Mouse down event
Vw;gLfpwJ.
Mouse Up: fPNo mOj;jpd; Mouse Key [ tpLtpf;Fk; NghJ Mouse up event
Vw;gLfpwJ.

5. Define Keypress, keydown and keyup?


Key press:Keyboard y; xU
gLLd; ;
mOj;jg;gLk;NghJ , e ; j event fs;
czLhfpd;wd; .
Keyboard y; c s ; s VNjDk; xU Character key type nra;ag;gLk;NghJ key press vd;w
Sl no
event Vw;gLfpwJ. Show() Show dialog()
1 Modelless form
xU Key fPNo mOj;jg;gLk;NghJ keydown vd;w event k; Model form
mOj;jg;gLL;
2 key i a tpLtpf;Fk;NghJ keyup vd;w event k; Vw;gLfpwJ.Application i a Close
Run MFk; Application i a Close Run MFk;
nra;a Ntz;ba mtrpak; , y ; i y nra;a Ntz;Lk;
3 between show()
6. Difference Eg:VBand Show dialog()? Eg:Notepad

7.Define Dialog box?


xU Project y; v j ; j i d form fi s Ntz;LkhdhYk; gad;gLj;jyhk;.,t;thW gy
form fi s gad;gLj;Jk; NghJ Kjypy; activate M f Ntz;ba form v J v d ; g i j user
Fwpg;gpL Ntz;Lk;

7 Mark & 14 Mark:


1. Explain creating windows forms?
(i) Design time
(ii) Run time

Prepared by
Kalaiyarasi S
HOD/Comp Page 2
COMPONENT BASED TECHNOLOGY

Design Time:
Design Neuj;jpy; user j d f ; F tpUg;gkhd Kiwapy; xU form [ design
nra;fpwhh;

Run time:
Run time Neuj;jpy; me;j form ,af;fg;gL;L N j i t a h d input fi s form
topahf ngw;Wf; nfhz;L output [ ntspapLfpwJ

2.Explain Working with toolbox controls?


Toolbox vd;gJ g y t i f a h d control fi s nfhz;L xU window MFk;.
Eg: button, label, textbox, checkbox
Toolbox ypUe;J control fi s drag nra;J form fspy; itf;fyhk;

Prepared by
Kalaiyarasi S
HOD/Comp Page 3
COMPONENT BASED TECHNOLOGY

Button:
xU Fwpg;gpL;L function [ execute nra;tjw;F nghJthf , e ; j control
gad;gLfpwJ

Properties: font,text,name etc


Events: click,keypress,resize etc
Eg: (i) Windows application nra;aNtz;Lk;
Button
[ open (ii) f;fhd click event y; code [ edit
nra;Ak;
(iii) MsgBox(“button is clicked”)
F5 [ mOj;jp run
Check Box:nra;aTk;
xU Option [ select m y ; y J clear nra;tjw;F , e ; j gad;gLfpwJ
control
Properties : name,text ,checked etc
Events: click,drag over etc
Eg:
(i) Windows application nra;aNtz;Lk
[ openCheckbox1
(ii) f;fhd checkedchanged event y; code [ edit
nra;Ak;

if checkedbox1.checked
{
Texbox1.font=font(“aril”,12,drawing.fontstyle.italic)
(iii) }
Checkbox2 f;fhd checkedchanged event y; code [ edit
if(checkbox2.checked)
nra;Ak;
{
Textbox1.font=font(“courier”,11,drawing.fontstyle.bold)
}
(iv) F5 [ mOj;jp run nra;aTk;

Combobox:
Edit nra;Ak; t r j p A i L a drop down list [ cUthf;Ftw;F , e ; j control
gad;gLfpwJ
Properties : Font,Dropdownwidth etc
Methods: Selected index,add,clear etc
Eg:
(i) Windows application nra;aNtz;Lk;
[ open (ii)
Button1 f;fhd click event y; code [ edit
Combobox1.items.add(“select”)
nra;Ak;
(iii) Button2 f;fhd click event y; code [ edit nra;Ak;
Combobox1.items.clear()
(iv) F5 [ mOj;jp run nra;aTk;

Label and Text box:


xU read only j d ; i k A i L a text [ fhL;Ltjw;F Label fs;
gad;gLj;jg;gLfpd;wd
user jUk; input [ runtime y; ngw;W nfhs;tja;F texbox fs;
gad;gLfpd;wd
Properties: text, font, name etc
Prepared by
Kalaiyarasi S
HOD/Comp Page 4
COMPONENT BASED TECHNOLOGY

List Box:
gy cWg;Gf;fi s nfhz;L xU gL;bai y fhL;Ltjw;F , e ; j control
gad;gLfpwJ.me;j
list ypUe;J xd;W m y ; y J mjw;F Nkw;g;gL;L cWg;Gf;fi s select nra;J nfhs;syhk;
Properties: Selectedindex,selecteditem
etc Methods:
Items.add-Gjpa c W g ; G fi s
Nrh;g;gjw;F
Items.insert:Gjpa c W g ; G fi s user
epidj;j ,Lj;jpy; Nrh;g;gjw;F
Items.remove: XNu xU cWg;ig
ePf;Ftjw;F
Items.clear: List y; c s ; s vy;yh
cWg;Gfi sAk; ePf;Ftjw;F
Eg:
(i) Windows application
[ open
nra;aNtz;Lk;
(ii) Button1 f;fhd click
event y; code [ edit
nra;Ak;
Listbox1.items.add(“orange
”)
(iii) Button2 f;fhd click
event y; code [ edit
nra;Ak;
Listbox1.items.clear()
(iv) F5 [ mOj;jp run
nra;aTk;

Radio button and groupbox:


gy Option fspypUe;J xd;iw
kL;Lk; select nra;a
mDkjpg;gjw;F ,e;j
control gad;gLfpwJ
Radio button f;Fk; checkbox f;Fk; NtWghL vd;dntd;why; xU
group y; c s ; s xU radio button [ select gz;zpdhy; k w ; w i t fi s
select g z ; z K b a h J

Eg:
(v) Windows application [ open nra;aNtz;Lk;
(vi) Radio Button1 f;fhd click event y; code [ edit nra;Ak;
If(Radio button1.checked)
{
Prepared by Textbox1.font=new font(“arial”,12)
Kalaiyarasi S }
(iii)
HOD/Comp mijg;NghyNt radiobutton2 f;F times new roman font k; Page 5
radiobutton3 f;F
impact font k; assign nra;tjw;F code vOjTk;
(iv) F5 [ mOj;jp run nra;aTk;
COMPONENT BASED TECHNOLOGY

(i) xU Gjpa Form [ Open nra;f.Menustrip vd;w control [ drag nra;J form
y; i t f ; f T k ;

(ii) Typehere vd;w text kPJ click nra;f .,jpy; &file vd;W type nra;f.& vd;w
symbol
M d J F xU access key v d ; g i j

(iii) File menu f;F fPNo new,open,save exit Mfpatw;iw type nra;f.
(iv) View menu f;F fPNo &toolbox, Status bar Mfpatw;iw type nra;f
(v) Program y; gad;gLj;j trjpahf xt;nthU menu item d; ngaiuAk;
khw;wp mikf;fTk;
(vi) xU menu item slect nra;ag;gLk; NghJ eiLngw Ntz;ba function fi s
vOj mjd; kPJ double click nra;J gpd;G Code vOjTk;
(vii) Form y; VNjDk; xU ,Lj;jpy; click nra;JtpL;LL run nra;f
(viii) ,jpy; VNjDk; xU menu item [ click nra;jhy; mjw;Nfw;w Process
eiLngWk;
Context menu:
xU form m y ; y J control kPJ right click nra;Ak; NghJ Njhd;Wfpw menu Tf;F
context menu vd;W ngah;
(i) System context menu
(ii) Custom context menu
System and custom context menu:
xU form m y ; y J control kPJ right click nra;Ak; NghJ jhdhf Njhd;Wk; menu Tf;F
system context menu vd;W ngah;
xU form m y ; y J control kPJ right click nra;Ak; NghJ Njhd;w Ntz;ba menu i t
user j d J tpUg;gg;gb mikj;jpUe;jhy; mjw;F custom context menu vd;w ngah;
Steps:
<<

1. xU Gjpa form [ open nra;f Context menustrip vd;w Control [ drag nra;J form
y; i t f ; f T k ;
2. Typehere vd;w text [,click nra;J saveas,print,hide Mfpatw;iw type nra;aTk;
3. Form f;fhd property window i t open nra;J contextmenu vd;w property y;
mjd; ngaiu nfhLf;fTk;
4. Application [ run nra;aTk;

Prepared by
Kalaiyarasi S
HOD/Comp Page 6

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy