A
Apnea
Hi all
I am working on a C# application that is launched as a child within a
3rd party application (not .net)
my problem is that when i use the any control on the form that
inherits from toolstrip the buttons that i add do not do anything.
they paint etc ok but no event gets fired.
I am relatively new to C# and am just finding my feet. I am grateful
for any suggestions
I am currently using the following code to tie my app into the 3rd
party app:
private void MainForm_Load(object sender, EventArgs e)
{
System.IntPtr i = Win32.FindWindow("clawin8388608class2",
"Gemini 6 - Eurotel Ltd");
System.IntPtr j = Win32.FindWindowEx(i, 0, "mdiclient",
null);
Win32.SetParent(this.Handle, j);
}
public class Win32
{
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_CLOSE = 0xF060;
[DllImport("user32.dll")]
public static extern System.IntPtr FindWindow(
string lpClassName, // class name
string lpWindowName // window name
);
[DllImport("user32.dll")]
public static extern System.IntPtr FindWindowEx(
System.IntPtr hWnd, // handle to destination window
int Msg, // message
string wParam, // first message parameter
string lParam // second message parameter
);
[DllImport("user32.dll")]
public static extern int SetParent(
System.IntPtr chH, // class name
System.IntPtr pH // window name
);
}
I am working on a C# application that is launched as a child within a
3rd party application (not .net)
my problem is that when i use the any control on the form that
inherits from toolstrip the buttons that i add do not do anything.
they paint etc ok but no event gets fired.
I am relatively new to C# and am just finding my feet. I am grateful
for any suggestions
I am currently using the following code to tie my app into the 3rd
party app:
private void MainForm_Load(object sender, EventArgs e)
{
System.IntPtr i = Win32.FindWindow("clawin8388608class2",
"Gemini 6 - Eurotel Ltd");
System.IntPtr j = Win32.FindWindowEx(i, 0, "mdiclient",
null);
Win32.SetParent(this.Handle, j);
}
public class Win32
{
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_CLOSE = 0xF060;
[DllImport("user32.dll")]
public static extern System.IntPtr FindWindow(
string lpClassName, // class name
string lpWindowName // window name
);
[DllImport("user32.dll")]
public static extern System.IntPtr FindWindowEx(
System.IntPtr hWnd, // handle to destination window
int Msg, // message
string wParam, // first message parameter
string lParam // second message parameter
);
[DllImport("user32.dll")]
public static extern int SetParent(
System.IntPtr chH, // class name
System.IntPtr pH // window name
);
}