Posted December 26, 201014 yr 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 December 26, 201014 yr by TBBW
May 4, 201114 yr 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
May 9, 201114 yr 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; }}
Create an account or sign in to comment