Jump to content

C# DIALOG/FORM


TBBW

Recommended Posts

Hi All,

this is what I have;


namespace COD
{
public partial class KeyGen : Form
{
public KeyGen()... private void button1_Click(object sender, EventArgs e)... }
}

The public KeyGen() is the InitializeComponent() routine.

The button1_click, is the when button1 is clicked routine.

Is there a way to add some more coding? iow another routine, which is not connected to a button or so.

to give an example, when a dialog (which is NOT mine) is moved, my dialog should be moved as well?

regards,

ger

Edited by TBBW
Link to comment
  • 4 months later...
Guest ROBiNBYTE/MSJ

I assume your target uses the .Net framework, since you're using C# code.

Could you please be more specific about your problem, add a more complete real-world example?

For what I understand from your question, you want another app to call a function in your program. If that's the case, you should familiarize yourself with System.Reflection, and injecting code in a loaded assembly.

With this information alone, I can't help you any more further.

-r

Link to comment

If you are just looking to code your own functions to be called, just keep adding onto the current class:


namespace COD
{
public partial class KeyGen : Form
{
public KeyGen()... private void button1_Click(object sender, EventArgs e)... } // Example string combination function.
private string CombineStrings(string strParam1, string strParam2)
{
return strParam1 + strParam2;
}
}
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...