Professional Documents
Culture Documents
Visual Basic Coding
Visual Basic Coding
Summary:
C# is object oriented. C# has access to the powerful .NET Framework Class Library—a vast
collection of prebuilt classes that enable you to develop apps quickly. C# graphical user interfaces
(GUIs) are event driven. You can write programs that respond to user-initiated events such as
mouse clicks, keystrokes.
In 2000, Microsoft announced its .NET initiative (www.microsoft.com/net), a broad vision for using
the Internet and the web in the development, engineering, distribution and use of software. The
.NET Framework Class Library provides many capabilities that you’ll use to build substantial C#
apps quickly and easily. The Common Language Runtime (CLR), another key part of the .NET
Framework, executes .NET programs and provides functionality to make them easier to develop
and debug.
Question No.2 Write down the definition, 5 properties, 2 events of Listbox and PictureBox Control.
5 properties :
Checked
Gets or sets a value indicating whether the check box is selected.
Font
This property specify font type, style, size
Height
This is the height of the Form in pixels.
MinimizeBox
By default, this property is True and you can set it to False to hide the Minimize button on the title
bar.
MaximizeBox
By default, this property is True and you can set it to False to hide the Maximize button on the title
bar.
MinimumSize
This specifies the minimum height and width of the window you can minimize.
NumericUpDown Control :
A NumericUpDown control allows users to provide a spin (up/down) interface to move through
pre-defined numbers using up and down arrows.
Question No 3: Identify control in the given form Write down how many controls are on the form and
what are their control name and user defined name.
Mention all controls and their specified properties. Also write down the code of Form and Button.
Answer :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Departmenttt
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
else if (dep.SelectedIndex == 1)
{
l2.Items.Clear();
l2.Items.Add("BsIT");
l2.Items.Add("MIT");
l2.Items.Add("MSIT");
}
else if (dep.SelectedIndex == 2)
{
l2.Items.Clear();
l2.Items.Add("BsEnglish");
l2.Items.Add("MSEnglish");
}
else if (dep.SelectedIndex == 3)
{
l2.Items.Clear();
l2.Items.Add("BsMath");
l2.Items.Add("MSMath");
}
else
{
MessageBox.Show("select the list");
}
}
}
}