0% found this document useful (0 votes)
3 views4 pages

Samples

The document contains C# code for a Windows Forms application with two main forms: frmvolcylinder and frmcommunication. The frmvolcylinder calculates the volume of a cylinder based on user input for height and radius, while frmcommunication computes a formula involving user-provided values. The application also includes menu items to open these forms within a parent form.

Uploaded by

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

Samples

The document contains C# code for a Windows Forms application with two main forms: frmvolcylinder and frmcommunication. The frmvolcylinder calculates the volume of a cylinder based on user input for height and radius, while frmcommunication computes a formula involving user-provided values. The application also includes menu items to open these forms within a parent form.

Uploaded by

wagakorurennox
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

using System;

using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];

namespace GasPettroleumeng
{
public partial class frmvolcylinder : Form
{
public frmvolcylinder()
{
InitializeComponent();
}
public double vol(int r, double h)
{
double v;
v = [Link] * r * r * h;
return v;
}
private void btnok_Click(object sender, EventArgs e)
{
double h, volume;
int r,r1,r2;
h = [Link]([Link]);
r1 = Convert.ToInt32([Link]);
r2 = Convert.ToInt32([Link]);
for (int i = r1; i < r2; i++)
{
volume = vol(i, h);
[Link]([Link](), [Link](), [Link]());
}

private void btncancel_Click(object sender, EventArgs e)


{

[Link] = "";
[Link] = "";
}

private void btnexit_Click(object sender, EventArgs e)


{
[Link]();
}
}
}

using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace GasPettroleumeng
{
public partial class frmcommunication : Form
{
public frmcommunication()
{
InitializeComponent();
}

private void btnok_Click(object sender, EventArgs e)


{
double G, E, W, F;
G = [Link]([Link]);
E = [Link]([Link]);
W = [Link]([Link]);
F = (G * E) + W;
[Link] = [Link]();
}

private void btncancel_Click(object sender, EventArgs e)


{
[Link] = "";
[Link] = "";
[Link]();
[Link] = "";
}
}
}

private void volumeOfCylinderToolStripMenuItem_Click(object sender, EventArgs e)


{
frmvolcylinder fm = new frmvolcylinder();
[Link]();
[Link] = this;
}

private void communicationToolStripMenuItem_Click(object sender,


EventArgs e)
{
frmcommunication p = new frmcommunication();
[Link]();
[Link] = this;
}

You might also like