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

Lecture 07-08 (Windows Form Applications & TextBox)

Uploaded by

Memoona Basharat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lecture 07-08 (Windows Form Applications & TextBox)

Uploaded by

Memoona Basharat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

CS-404 Visual Programming

Lecture 07 (Windows Form Application)


Course Teacher: Awais Mehmood, Department of Computer Science, UET, Taxila (Pakistan)
DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 1
Goals for ▪ Windows Form Application
today ▪ Desktop Application

DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 2


Desktop Application
Stand-alone application which run on system and laptops.

These applications are installed on the systems via downloading online or


buying CDs online or from the store.

Desktop applications are high in efficiency and can be customized by using


new technology in the market.

Internet connection is not required for accessing the applications, it works on


the local server present in the system.

DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 3


▪ Desktop applications can be easily customized.
▪ No Internet connection required to access the
application.
▪ Available for every OS.
Advantages ▪ Building a desktop application is cost effective.
▪ Runs on systems or laptops having low specs.
▪ Easy to install.
▪ Easy update.

DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 4


Platform is simply a hardware on which
Operating system and all the other
applications run.
Platform

There can be three kinds of platform


applications.
Desktop Mobile Web-based
applications applications applications

DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 5


Windows File Explorer
Examples of
desktop Microsoft Office applications
applications
Adobe Photoshop

MS Teams

PDF Editor

Illustrator

DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 6


Windows form application
▪ A UI framework for building Windows desktop apps.
▪ Provides one of the most productive ways to create desktop apps based on
the visual designer provided in Visual Studio.
▪ Functionality such as drag-and-drop placement of visual controls makes it easy
to build desktop apps.

7
Desktop Application

8
Desktop Application

9
Desktop Application

10
Desktop Application

11
Console vs. Desktop Application

12
Desktop Application

13
Desktop Application

14
Desktop Application

15
Desktop Application

16
Desktop Application

17
Adding controls to blank C# form

18
Adding controls to blank C# form

19
Adding controls to blank C# form

20
Adding controls to blank C# form
Properties of C# controls

21
Adding controls to blank C# form
Properties of C# controls

22
Adding controls to blank C# form
Properties of C# controls

23
Adding controls to blank C# form
Properties of C# controls

24
Adding controls to blank C# form
Properties of C# controls

25
Adding controls to blank C# form
Properties of C# controls

26
Adding controls to blank C# form
Properties of C# controls

27
Adding controls to blank C# form
Properties of C# controls

28
(Object sender, EventArgs e)

29
Adding Controls to a Blank C# Form
Adding C# Code to a Button: C# MessageBox

30
Adding Controls to a Blank C# Form
Adding C# Code to a Button: C# MessageBox

31
Adding Controls to a Blank C# Form
Adding C# Code to a Button: C# MessageBox

32
Adding Controls to a Blank C# Form
Adding C# Code to a Button: C# MessageBox

33
Adding Controls to a Blank C# Form
Adding C# Code to a Button: C# MessageBox

34
More about C# MessageBox

35
Hide, Show and close Form

36
Questions?
Thank you
Ethics is knowing the difference between what you have a right to
do and what is right to do.
- Potter Stewart
DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 38
CS-404 Visual Programming
Lecture 08 (TextBox Control)
Course Teacher: Awais Mehmood, Department of Computer Science, UET, Taxila (Pakistan)
DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 39
Goals for today

Adding controls
Variables and
to windows
expressions
form (Textbox)

DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 40


Adding textbox

41
Properties of C# control-textbox

42
Variables in C#

43
Variables in C#

44
Variables in C#

45
Variables in C#

46
Variables in C#

47
Variables in C#

48
Variables in C#

49
Variables in C#

50
Variables in C#

51
Variables in C#

52
String Variables concatenation in C#

53
Comments in C#

54
Working on TextBox values

55
Working on TextBox values

private void button3_Click(object sender, EventArgs e)


{
int input_text1, input_text2, add_input;
input_text1 = int.Parse(textBox1.Text);
input_text2 = int.Parse(textBox2.Text);
add_input = input_text1 + input_text2;
MessageBox.Show(add_input.ToString())
} 56
Questions?
Thank you
Any change, even a change for the better, is always
accompanied by discomfort.
- Arnold Bennett
DEPARTMENT OF COMPUTER SCIENCE, UET TAXILA (PAKISTAN) 59

You might also like