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

Carreras Form Dllimport: "User32.Dll" "Releasecapture"

The document defines multiple classes that represent different academic programs (e.g. Ingenieria, Educacion, Licenciatura). The classes share common methods for initializing forms, closing forms, and capturing mouse clicks. Each class contains a button click method that checks student credentials like semester count and GPA against requirements for that program and displays a pass/fail message.

Uploaded by

Rayleigh 05
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)
105 views

Carreras Form Dllimport: "User32.Dll" "Releasecapture"

The document defines multiple classes that represent different academic programs (e.g. Ingenieria, Educacion, Licenciatura). The classes share common methods for initializing forms, closing forms, and capturing mouse clicks. Each class contains a button click method that checks student credentials like semester count and GPA against requirements for that program and displays a pass/fail message.

Uploaded by

Rayleigh 05
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
You are on page 1/ 6

namespace #2

{
public partial class carreras : Form
{
[DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]
private extern static void ReleaseCapture();

[DllImport("user32.DLL", EntryPoint = "SendMessage")]


private extern static void SendMessage(System.IntPtr hWnd, int wMsg, int wParam, int
lParam);
public carreras()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
if (Rindustrial.Checked)
{
Doctorado fr = new Doctorado();
fr.Show(this);
}
else if (Rtelematica.Checked)
{
Ingenieria fr2 = new Ingenieria ();
fr2.Show(this);
}
else if (Rcomputos.Checked)
{
new Educacion fr3 = new Educacion();
fr3.Show(this);
}
else if (Rmecanica.Checked)
{
new Educacion fr4 = new Licenciatura();
fr4.Show(this);
}
else
{
MessageBox.Show("SELECIONE UNA OPCION");
}

private void label6_Click(object sender, EventArgs e)


{
this.Close();
}

private void carreras_Load(object sender, EventArgs e)


{

private void panel1_MouseDown(object sender, MouseEventArgs e)


{

ReleaseCapture();
SendMessage(this.Handle, 0x112, 0xf012, 0);
}

private void carreras_MouseDown(object sender, MouseEventArgs e)


{

ReleaseCapture();
SendMessage(this.Handle, 0x114, 0xf015, 0);
}
}
namespace #2
{
public partial class Ingenieria: Form
{

[DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]


private extern static void ReleaseCapture();

[DllImport("user32.DLL", EntryPoint = "SendMessage")]


private extern static void SendMessage(System.IntPtr hWnd, int wMsg, int
wParam, int lParam);
public Ingenieria()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
int matri, semes;
double promedio;

semes = Convert.ToInt32(textsemes.Text);
promedio = Convert.ToDouble(textpro.Text);

if (semes >= 6 && promedio >= 8.8)


{
MessageBox.Show("PUEDE TOMAR EL TEST");
textpro.Text = "";
textsemes.Text = "";
textmatri.Text = "";
}
else
{
MessageBox.Show("NO PUEDE TOMAR EL TEST ");
}
}

private void computos_Load(object sender, EventArgs e)


{

private void label6_Click(object sender, EventArgs e)


{
this.Close();
}

private void panel1_MouseDown(object sender, MouseEventArgs e)


{

ReleaseCapture();
SendMessage(this.Handle, 0x114, 0xf015, 0);
}
}
}

{
public partial class Educacion : Form
{
[DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]
private extern static void ReleaseCapture();

[DllImport("user32.DLL", EntryPoint = "SendMessage")]


private extern static void SendMessage(System.IntPtr hWnd, int wMsg, int
wParam, int lParam);
public Educacion()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{

int matri, semes;


double promedio;

semes = Convert.ToInt32(textsemes.Text);
promedio = Convert.ToDouble(textpro.Text);

if (semes >= 6 && promedio>=8.5)


{
MessageBox.Show("USTED PUEDE TOMAR EL TEST");
textpro.Text = "";
textsemes.Text = "";
textmatri.Text = "";
}
else
{
MessageBox.Show("USTED NO PUEDE TOMAR EL TEST ");
}
}

private void Form1_Load(object sender, EventArgs e)


{

private void label6_Click(object sender, EventArgs e)


{
this.Close();
}

private void panel1_MouseDown(object sender, MouseEventArgs e)


{

ReleaseCapture();
SendMessage(this.Handle, 0x114, 0xf015, 0);
}
}
}

namespace #2
{
public partial class Licenciatura : Form
{

[DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]


private extern static void ReleaseCapture();

[DllImport("user32.DLL", EntryPoint = "SendMessage")]


private extern static void SendMessage(System.IntPtr hWnd, int wMsg, int
wParam, int lParam);

public Licenciatura()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
int semes;
double promedio;
string matri;

semes = Convert.ToInt32(textsemes.Text);
promedio = Convert.ToDouble(textpro.Text);

if (semes >= 7 && promedio >= 9.0)


{
MessageBox.Show("USTED PUEDE TOMAR EL TEST");
textpro.Text = "";
textsemes.Text = "";
textmatri.Text = "";
}
else
{
MessageBox.Show("USTED NO PUEDE TOMAR EL TEST");
}
}

private void label6_Click(object sender, EventArgs e)


{
this.Close();
}

private void panel1_MouseDown(object sender, MouseEventArgs e)


{
ReleaseCapture();
SendMessage(this.Handle, 0x114, 0xf015, 0);

}
}
}
namespace #2
{
public partial class Diplomado : Form
{

[DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]


private extern static void ReleaseCapture();

[DllImport("user32.DLL", EntryPoint = "SendMessage")]


private extern static void SendMessage(System.IntPtr hWnd, int wMsg, int
wParam, int lParam);

public Diplomado()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{

int matri, semes;


double promedio;

semes = Convert.ToInt32(textsemes.Text);
promedio = Convert.ToDouble(textpro.Text);

if (semes >= 5 && promedio >= 9.0)


{
MessageBox.Show("USTED PUEDE TOMAR EL TEST");
textpro.Text = "";
textsemes.Text = "";
textmatri.Text = "";
}
else
{
MessageBox.Show("USTED NO PUEDE TOMAR EL TEST ");
}
}

private void label6_Click(object sender, EventArgs e)


{
this.Close();
}

private void panel1_MouseDown(object sender, MouseEventArgs e)


{

ReleaseCapture();
SendMessage(this.Handle, 0x114, 0xf015, 0);
}
}
}

You might also like