473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Toolstrip buttons not working when Form launched from external application

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
);

}

Feb 20 '07 #1
0 1398

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fredrik Melin | last post by:
2005 RTM: Have a form, quite a few control, (full form of stuff, tab pages, buttons, labels, text-controls etc) Selecting controls, going in and out between code/design view is a little bit...
2
by: VBTricks.de.vu Webmaster | last post by:
Hello, I'm still reimplementing the GUI of my app using the new toolstrips. My current problem is to autosize a combobox to the available with in the parent toolstrip. There are some buttons...
0
by: perspolis | last post by:
Hi all I have a form that owns a Toolstrip with some buttons. I made it's modifire to protected and GenerateMember to true. when I inherit another form from this form I can't change properties...
0
by: Javier Ros | last post by:
Hi, I´m using visual inheritance in WinForms and I have a problem with ToolStrip control. I have a Form called WndBase thah Inherit from Form. I have insert a ToolStrip in WndBase and I have...
1
by: trainersb | last post by:
I am trying to use the ToolStrip control in Visual Studio 2005. I create a C# Windows application & add a ToolStripContainer control to the form with top, left, bottom & right panels visible. I...
0
by: Martijn Mulder | last post by:
The ToolStrip on top of my form is to small. I want to increase its height. Simply setting the Height-property doesn't change the height, though. So I tried to place the ToolStrip in a...
5
by: Daniel Jeffrey | last post by:
Hello, I have no idea how this is happening. I have a TabControl on the form, and in one of the tabs I have a ToolStrip with a few buttons and Grid. Every now and then I look and the...
2
by: daveL | last post by:
Hi I have a Toolstrip on a Window with 5 buttons i want to send this to a application static fucnction to enable / disable the buttons based on User rights When i send Window.controls to the...
1
by: priyamtheone | last post by:
In C# 2005 (.Net 2.0), while working with a toolstrip, if its TabStop property is set to TRUE and there are two comboboxes and a button in the toolstrip, why doesn't the button get any focus when the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.