|
Hi
Thats the Internet Explorer to which I am sending F1 key.It responds to F1 key if i press it on keyboard.
Is it really the case that IE donot responds to WM_KEYUP or WM_KEYDOWN events.I have tried for WM_CLOSE and for quit too but it did not worked.
I am trying to find.
THE SK
(Sandeep Kalra)
"I am the One"
|
|
|
|
|
Sandeep Kalra wrote: I have tried for WM_CLOSE and for quit too but it did not worked
Then like I said. You are doing something wrong.
Simon
|
|
|
|
|
How do you know you're sending the messages to the right window?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have the handle of that window to which i wanted to send the message.
I have also found that the PostMessage API which has same parameters as that of SendMessage ,is working fine.
Declared this above in code
[DllImport("user32.dll",EnteryPoint="PostMessage"]
public static extern bool PostMessage(int hwnd,int msg,int wparam,int lparam)
[DllImport("user32.dll",EnteryPoint="SendMessage"]
public static extern int SendMessage(int hwnd,int msg,int wparam,int lparam)
I am transferribg same parameters to the PostMessage and SendMessage by declaring them public ,on two different button_click event on my form
Button with a PostMessage is working fine.But button_click with SendMessage is not working at all.I am not getting any warning, error or runtime errror.
Also found that WM_KILLFOCUS,WM_QUIT are not working on PostMessage.However WM_CLOSE ,WM_KEYDOWN,WM_KEYUP worked fine.
I do not know whats wrong(sure not coding).Please suggest.
And I also want to know whic among SendMessage and PostMessage is more reliable
|
|
|
|
|
To make a lParam integer, try this:
public int MakeLParam(int loWord, int hiWord)
{
return ((hiWord << 16) + loWord);
}
public int MakeWParam(int loWord, int hiWord)
{
return ((hiWord << 16) + loWord);
}
Now, all you have to do is construct the two parts of the lParam value, and pass them into one of those functions.
You may also want to look at this page:
http://www.pinvoke.net/default.aspx/user32/SendInput.html[^]
As usual, a little googling would have saved you *and us* HOURS of time.
[EDIT] and the univoter strikes again. I provide an answer and get 1'd. How f***ing pathetic.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Tuesday, October 14, 2008 7:06 AM
|
|
|
|
|
hi to all,
I m facing a problem with Ajax modalpopupextender.
I'am passing a parameter to the model popup, which gets displayed on the popup,
For the next parameter, the popup is not refreshed, still the previous parameter is
shown on the popup.
Thanks & Regards,
sai krishna
|
|
|
|
|
Hi,
I am having spanish characters as memorystream, when i give this stream to xmldocument.load - it gives me Invalid characters errro. How to solver this isssue.
Be simple and Be sample.
|
|
|
|
|
Which encoding do you use for the characters, and what encoding is specified in the xml header?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
check encoding and update it accordingly.
Cheers!!
Brij
|
|
|
|
|
Make sure the encoding is the same. You should probably use UTF-8
ASCII tables, HTML entities, types, string formats and more info for the serious coder at: www.codecharts.com
|
|
|
|
|
Ok, three people so far have suggested that it's the encoding that is the problem.
Anyone else why want to suggest that it's the encoding that is the problem before we close?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: Anyone else why want to suggest that it's the encoding that is the problem before we close?
Not me.
I'm thinking there's characters in the stream that are invalid for the encoding of the XML.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hai
I am developing an application in C#.NET to control processes in remote machine I successfully started a process in remote machine but it is not visible ,it is visible only in task manager.Please help to make it visible
Sree
|
|
|
|
|
|
hi evreyone
is it possible to use xml file as database ?
if yes, is someone has any sample code in C# that can do Insert,Update and Delete job's ?
thank's alot for any help
|
|
|
|
|
Yes you can. But it doesnt mean you should. Performance wise its even a worse idea.
To do insert/update/delete you will need to load the xml document, find the node that you want as parent (for insert) or the node you want to update/delete, perform the action you need to do and then save the document again.
Loading the document once and keeping it in memory will speed up the process if its small amounts of data, else you'll find yourself running out of memory soon.
Hope this helps.
|
|
|
|
|
thank's for the quick anser
by database is very very small and i think,
that it will be better to use xml insted access or sql server
can i get any sample ?
|
|
|
|
|
As Guffa has said, its easy to load the data in a datatable and then save it as xml. That will increase query performance. That will however increase your xml document size.
If you dont want to use that way, heres a really simplified example of an update to a xml file:
<?xml version="1.0"?>
<Employees>
<Employee>
<ID>1</ID>
<FirstName>John</FirstName>
<LastName>Doe</LastName>
</Employee>
<Employee>
<ID>2</ID>
<FirstName>Peter</FirstName>
<LastName>Pan</LastName>
</Employee>
</Employees>
string xmlFilePath = @"C:\Employees.xml";
int EmployeeIdToUpdate = 2;
string NewEmployeeLastName = "Panne";
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.Load(xmlFilePath);
System.Xml.XmlNode eNode = doc.SelectSingleNode("Employees");
for (int i = 0; i < eNode.ChildNodes.Count; i++)
{
System.Xml.XmlNode employeeNode = eNode.ChildNodes[i];
int ID = int.Parse(employeeNode.SelectSingleNode("ID").InnerText);
if (ID == EmployeeIdToUpdate)
{
//Perform action
employeeNode.SelectSingleNode("LastName").InnerText = NewEmployeeLastName;
}
}
doc.Save(xmlFilePath);
Hope this helps.
|
|
|
|
|
You can save and load a DataTable as xml. Load the DataTable, change the DataRow items, and then save it.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
good.....
can i get code sample ?
|
|
|
|
|
|
.NET has many XML manipulation classes available. Use any of them to load and save data to XML file. If you are looking for file system based database, consider SQL lite[^]
|
|
|
|
|
|
Just use a borderless form.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
OK... but how do i find out, WHERE the Window should have its location?
And... "close" the form... how works that? Because, if it's a DialogForm i can't close it by clicking somewhere else!
modified on Tuesday, October 14, 2008 8:38 AM
|
|
|
|