TBBW Posted December 26, 2010 Posted December 26, 2010 (edited) 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, 2010 by TBBW
Guest ROBiNBYTE/MSJ Posted May 4, 2011 Posted May 4, 2011 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
atom0s Posted May 9, 2011 Posted May 9, 2011 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; }}
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now