Click here to Skip to main content
15,909,373 members
Home / Discussions / C#
   

C#

 
Questionretrieve text from a currently selected cell of a datagrid Pin
Saira Tanwir16-Jan-07 22:55
Saira Tanwir16-Jan-07 22:55 
AnswerRe: retrieve text from a currently selected cell of a datagrid Pin
Seishin#16-Jan-07 22:59
Seishin#16-Jan-07 22:59 
GeneralRe: retrieve text from a currently selected cell of a datagrid Pin
Saira Tanwir16-Jan-07 23:04
Saira Tanwir16-Jan-07 23:04 
AnswerRe: Remote Computer Pin
JacquesDP17-Jan-07 0:18
JacquesDP17-Jan-07 0:18 
QuestionHow to Get Current Row Value on DataGirdView Pin
dataminers16-Jan-07 22:20
dataminers16-Jan-07 22:20 
AnswerRe: How to Get Current Row Value on DataGirdView Pin
Seishin#16-Jan-07 22:22
Seishin#16-Jan-07 22:22 
GeneralRe: How to Get Current Row Value on DataGirdView Pin
dataminers16-Jan-07 22:38
dataminers16-Jan-07 22:38 
Questionhow to use SendMassege Pin
freespeed16-Jan-07 21:01
freespeed16-Jan-07 21:01 
Confused | :confused: Confused | :confused: Confused | :confused:

my SendMessage project code:
private void button1_Click(object sender, EventArgs e)
{
IntPtr tohandle = FindWindow(null, "Sub Form");
Point pt = new Point(99, 100);
int iSize = Marshal.SizeOf(typeof(Point));
IntPtr lp = Marshal.AllocHGlobal(iSize);

Marshal.StructureToPtr(pt, lp,true );

if ((int)tohandle != 0)
{
SendMessage(tohandle, 789, IntPtr.Zero , lp);

}
}


my recieve msg project code :

protected override void DefWndProc(ref Message m)
{
if (m.Msg == 789)
{
Point pt = (Point)Marshal.PtrToStructure(m.LParam, typeof(Point));

string message = string.Format("{0},{1},{2},{3}",m.Msg ,m.WParam,pt.X ,pt.Y );
this.listBox1.Items.Add(message);

}

base.DefWndProc(ref m);
}


my issue:
m.Msg and m.WParam is ok ,but pt is error data, Why?




AnswerRe: how to use SendMassege Pin
Luc Pattyn17-Jan-07 0:43
sitebuilderLuc Pattyn17-Jan-07 0:43 
AnswerRe: how to use SendMassege Pin
Luc Pattyn17-Jan-07 1:21
sitebuilderLuc Pattyn17-Jan-07 1:21 
QuestionVSS Database Create directory. Pin
Elephant12316-Jan-07 20:46
Elephant12316-Jan-07 20:46 
AnswerRe: VSS Database Create directory. Pin
ednrgc17-Jan-07 4:45
ednrgc17-Jan-07 4:45 
QuestionRemoting compatibility question Pin
schaf1316-Jan-07 20:29
schaf1316-Jan-07 20:29 
QuestionAlter color of tabpage Pin
livez16-Jan-07 20:26
livez16-Jan-07 20:26 
AnswerRe: Alter color of tabpage Pin
il_masacratore16-Jan-07 21:33
il_masacratore16-Jan-07 21:33 
AnswerRe: Alter color of tabpage Pin
H. Neville III16-Jan-07 23:16
H. Neville III16-Jan-07 23:16 
AnswerRe: Alter color of tabpage Pin
Vinay Dornala16-Jan-07 23:48
Vinay Dornala16-Jan-07 23:48 
GeneralRe: Alter color of tabpage Pin
livez17-Jan-07 0:48
livez17-Jan-07 0:48 
QuestionEvents Pin
Monin D.16-Jan-07 20:20
Monin D.16-Jan-07 20:20 
AnswerRe: Events Pin
Christian Graus16-Jan-07 20:51
protectorChristian Graus16-Jan-07 20:51 
GeneralRe: Events [modified] Pin
Monin D.16-Jan-07 21:21
Monin D.16-Jan-07 21:21 
AnswerRe: Events Pin
S. Senthil Kumar17-Jan-07 0:35
S. Senthil Kumar17-Jan-07 0:35 
GeneralRe: Events Pin
Monin D.17-Jan-07 7:00
Monin D.17-Jan-07 7:00 
QuestionCross threading issue [modified] Pin
JacquesDP16-Jan-07 20:08
JacquesDP16-Jan-07 20:08 
AnswerRe: Cross threading issue Pin
Christian Graus16-Jan-07 20:53
protectorChristian Graus16-Jan-07 20:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.