PROGRAM 24
AIM: Program to implement CD/DVD Browsing Application using C#.net
Program:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog open = new OpenFileDialog();
[Link] = "CD/CVC Browser";
[Link]();
}
private void button2_Click(object sender, EventArgs e)
{
[Link]();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult d = [Link]("Are you sure you want to close this
application?", "Browsing Application", [Link],
[Link], MessageBoxDefaultButton.Button2);
if (d == [Link])
[Link] = true;
}
}
}
1604-11-737-029
Output:
1604-11-737-029
PROGRAM 25
AIM: Program to Implement Information Retrieving Box Application using
C#.Net
Program:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
[Link]();
}
1604-11-737-029
private void button1_Click(object sender, EventArgs e)
{
DialogResult d = [Link]("Click any of the button and see the information
retrieved and displayed below!", "Information To Retrieve",
[Link], [Link]);
if (d == [Link])
[Link] = "You have clicked Yes button!";
else if (d == [Link])
[Link] = "You have clicked No button!";
else if (d == [Link])
[Link] = "You have clicked Cancel button!";
[Link] = true;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult d = [Link]("Are you sure you want to close this
application?", "Information To Retrieve", [Link],
[Link], MessageBoxDefaultButton.Button2);
if (d == [Link])
[Link] = true;
}
}
}
1604-11-737-029
Output:
1604-11-737-029
PROGRAM 26
AIM: Program to Implement a Currency Converter Application using C#.Net
Program:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if ([Link] < 0)
{
[Link]("please select a country", "currency converter",
[Link], [Link]);
[Link]();
1604-11-737-029
return;
else if ([Link] == 0)
{
[Link]("please enter amount", "currency converter",
[Link], [Link]);
[Link]();
return;
double currencyValue = 0;
switch ([Link])
{
case 0: currencyValue = 75;
break;
case 1: currencyValue = 170;
break;
case 2: currencyValue = 13;
break;
case 3: currencyValue = 43;
break;
case 4: currencyValue = 48;
break;
}
double amount = [Link]([Link]);
[Link] = (currencyValue * amount).ToString();
}
private void button2_Click(object sender, EventArgs e)
{
1604-11-737-029
[Link]();
}
}
}
Output:
1604-11-737-029
PROGRAM 27
AIM: ActiveX control program
Program:
[Link]
using System;
using [Link];
namespace ANamespace
{
public interface ASignatures
{
string FName();
string SName();
int Age { get;}
}
[ClassInterface([Link])]
public class AClass :ASignatures
{
public string FName()
{
return "I";
}
public string SName()
{
return "N";
}
public int Age
{
get { return 249; }
}
}
}
[Link]:
<html>
<head>
<script language="javascript">
<!-- Load the ActiveX object -->
var x = new ActiveXObject("[Link]");
<!-- Access the Method -->
alert([Link]());
alert([Link]());
<!-- Access the Property -->
alert([Link]);
</script>
</head>
<body>
</body>
1604-11-737-029
Output:
1604-11-737-029
1604-11-737-029