Similar Threads
1. How to send message to all window(include child window)
Hi,
How to send a message to every window(include child window),
I use SendMessage ,but It can't do that.
class frmA
{
public const int WM_test = 0x400 + 1;
protected override void WndProc(ref Message m)
{
// Listen for operating system messages.
switch (m.Msg)
{
case WM_test:
MessageBox.Show(WM_test.ToString()); break;
}
base.WndProc(ref m);
}
private void button1_Click(object sender, System.EventArgs e)
{
try
{
IntPtr nullhandle = IntPtr.Zero;
int i = SendMessage((int)this.Handle,WM_test,0,0);
//send ok,i == 1,popup messagebox
int i = SendMessage((int)nullhandle,WM_test,0,0);
//i == 0,do nothing
}
catch(Exception ep)
{
MessageBox.Show(ep.Message);
}
}
}
void func()
{
frmA frmTestA = new frmA();
frmA frmTestB = new frmA();
frmTestA.show();
frmTestB.show();
}
//now when i push the frmTestA button1,I want to send the WM_test msg to
frmTestA and frmTestB,how to do this?
Is there any designed patterns can implement my request?
best regarsd,
Harvie
2. Sending Window Messages from an MFC app to a Windows Firm tray application
3. Sending message to another window
I have an application using dial monitors which is used in an aution room.
The auctioneer has a form showing details of the current lot number. As
he changes to the next lot number I need to send a message to a form on
the other monitor to change to picture to this new lot.
Shat is the best way to have a form send a message to another form.
ie Monitor one is showing lot 10 details and the monitor two is showing
the picture of lot 10. The auction moves to the next lot on his screen
(lot 11) and the form on the second monitor now updates with the details
of lot 11.
Regards
Jeff
4. send/post a message to a window - CSharp/C#
5. Send Message to Windows Service
Hi!
I want to develop two applications one a Windows Service and the other a GUI
based application. I want some sort of communication between Service and
GUI. I have decided to use Remoting for this purpose.
For this I registered an object on Service side for Remoting purposes.
Remote Object exposes a function named ReloadFiles() that should internally
send a message to service class to Reload some files. Now I don't know how
to send message to that service class because Remote Object doesn't have a
reference to service.
Anybody there to give me a helping hand.
Thanks in advance.
Ahmad Jalil Qarshi
6. How to receive message sent from another window? - CSharp/C#
7. Unable to Send text message to child window
hi,
From My MFC Application I create a modless window on the click of a
button. From the same clicking function I assign a value to an edit
box( CString value).
CTestModless *p;
p = new CTestModless;
p->Create (CTestModless::IDD, GetDesktopWindow());
CRect rSize ;
p->GetWindowRect(&rSize);
p->MoveWindow(10,10, rSize.Width(), rSize.Height());
p->ShowWindow(SW_SHOW);
GetDlgItem (IDC_BUTTON2)->EnableWindow(FALSE);
p->ShowWindow(SW_SHOW);
p->m_strD1Bc1 = "123";
p->UpdateData(FALSE);
But it is giving an error telling there is some problem on doing
UpdateData()
.
What could be the reason.
pls help.
Thanx in advance.
Neo.
8. Message Sending from a Control to MainFrame Window