|
I have read about "Cross-Process Data Extraction" but it doesn´t make sense to me in C# =/
here´s the link in VB: http://www.xtremevbtalk.com/t114019.html[^]
he shows how to retrieve texts from buttons, list view thru memory allocation, but I got no idea in c#.
=/
|
|
|
|
|
Is this what you're looking for?
string strText;
if (myListView.SelectedItems.Count > 0)
strText = myListView.SelectedItems[0].Text;
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I need help trying to figure out how to modify an existing password in a Microsoft Access Document from one and change it to a completely different password all together all in C#. All I know on the topic is how to specify the password for an MS Access document to gain access to it, but I don't know how to change it. Thanks!
-Nebuchadnezzar
|
|
|
|
|
Hello all,
I've written a .Net 2.0 Windows application in C# which allows a baby to bash the keyboard without affecting other applications. The keyboard class might be useful as an article here, so I'd like someone with more experience of C# to have a look at how the code is organised and maybe I'll learn something in the process!
Thanks!
|
|
|
|
|
Write the article and someone will probably pick it appart.
|
|
|
|
|
dan neely wrote: Write the article and someone will probably pick it appart
That's true, though mostly, they seem to post replies saying they can't get the code to work!
|
|
|
|
|
I know for a fact Marc Clifton, and I are looking for something like that for cats
An article, even short would be nice, thanks.
|
|
|
|
|
Yes, having only known cats before having a baby, I can see how similar they are. The only difference is that the baby will hopefully grow out of it!
I think I'll definitely write an article. But I'd still like someone to have a quick look at how the code is actually organised. I'm mostly self-taught and having learned programming with procedural variants of Basic, I'm not sure I use objects the way I should in a good OO language like C#.
|
|
|
|
|
Emma Burrows wrote: I've written a .Net 2.0 Windows application in C# which allows a baby to bash the keyboard without affecting other applications
I've now completed the code and written an article on enabling low-level keyboard hooks using the Windows API in C#. As the saying goes, "publish and be damned", but it would still be nice if someone could have a look at it, so I'd be grateful for any volunteers!
|
|
|
|
|
Hi everyone.
I'm looking for a good way to let one process know that another process has made changes in
a shared database, so that the first process can update its view, if it is currently open.
After alot of searching on inet I've come to the conclusion that PostMessage from the Win32 api might
be the solution, but I haven't managed to find a guide as how to do it.
I think I can manage the PostMessage part, but how do I retrieve it in target process?
Any help or links to tutorials would be greatly appreciated.
-Larantz-
|
|
|
|
|
Override your target process form's WndProc() to handle the message.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
[Solved it]
Hi Ravi.
Thx for reply.
I tried overriding the WndProc() and just added a debugger to
see if it fires when I run the 2nd process with PostMessage(..).
WndProc() process compiles, but when I fire it up, I get an error
along the lines of "Error creating windows referance". (I got it in norwegian...)
How can I preserve / inherit original WndProc() and just extend it with
the code I want to fire?
-Larantz-
-- modified at 9:10 Friday 2nd June, 2006
|
|
|
|
|
Hi again ravi.
I was hoping you might explain to me why the messages I send from
"senderclass" isn't picked up by the "recieverclass".
All I can think of is that the pointer to the process is wrong.
But I know that Process.GetprocessByName("processname") finds the right process.
Here's the code for the PostMessage routines:
[DllImport("User32.Dll")]
public static extern long PostMessage(IntPtr hWnd, long wMsg, long wParam, long lParam);
public const long WM_PAINT = 0x0F;
public const long WM_DISPLAYCHANGE = 0x7E;
System.Diagnostics.Process[] procs = Process.GetProcessesByName("processname_here");
foreach(System.Diagnostics.Process proc in procs)
{
Helpers.PostMessage(proc.Handle, Helpers.WM_PAINT, 0, 0);
}
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == WM_PAINT)
{
MessageBox.Show("Got message");
}
}
Thanks in advance,
-Larantz-
|
|
|
|
|
i'm not sure whether somebody is still interested in this question, but the mistake is the using of proc.Handle. This is a process handle, but for sending messages you need a window handle. So take proc.MainWindowHandle.
|
|
|
|
|
Hi... I have added programaticly to a DataSet two DataTables by the DataSet.Tables.Add() Method.
When I use the DataSet.GetXml() method I get just a line "<New DataSet />".
Why does that happen and how can I have the DataSet with it's tables?
|
|
|
|
|
Hi
Have you tried adding a new DataRow to one of the tables and then calling DataSet.GetXml()? I know that the XML serialiser doesn't generate XML for "empty" columns (where all the values are System.DBNull), so perhaps it's the same for "empty" tables?
Cheers
Andy
|
|
|
|
|
But then I would have 2 tables with a row in each that I don't need, and it will make my project go nuts, it's just an idiotic thing to do...
Can't I do something else instend of inserting a new row with Data I don't need?
|
|
|
|
|
It might be idiotic(?) but it works. If you don't like the way the GetXml call goes about it's business, write your own! Or you could simply build the XML; if it's just the case of a dataset with a couple of empty tables then why not just string-build it? You get a string back from GetXml anyway...
|
|
|
|
|
You have to put data in the tables.
|
|
|
|
|
But then I would have 2 tables with a row in each that I don't need, and it will make my project go nuts, it's just an idiotic thing to do...
Can't I do something else instend of inserting a new row with Data I don't need?
|
|
|
|
|
The only way you're going to see the structure of an empty dataset is to view the schema:
ds.WriteXml(aStream, XmlWriteMode.WriteSchema);
-or-
string s = ds.GetXmlSchema(); Last modified: Friday, June 02, 2006 8:47:59 AM --
|
|
|
|
|
so how from Schema I can add Data?
|
|
|
|
|
I don't understand your dilemma here. You want to see the XML structure of your dataset, but you're not willing to put data in it to do that. How are you trying to use this XML? If you write the schema and data from the DataSet, then another DataSet that reads that XML and schema will have the same structure and data as the original. Otherwise, I really don't see what you're trying to do.
|
|
|
|
|
Hello all,
I've developed a little module of timesheet and within i use a ole db connection to a ms project file.
MsProject 2003 ==> Microsoft.Project.OLEDB.11.0 ole db provider.
On my pc, everything works fine BECAUSE I'VE MS PROJECT 2003 INSTALLED ON IT.
But i try to put it on the server (win 2000 sp 4 enterprise ) :
The 'Microsoft.Project.OLEDB.11.0' provider is not registered on the local machine.
Can anyone help me ?
Thanks a lot.
|
|
|
|
|
Philippe Generet wrote: On my pc, everything works fine BECAUSE I'VE MS PROJECT 2003 INSTALLED ON IT.
But i try to put it on the server (win 2000 sp 4 enterprise ) :
The 'Microsoft.Project.OLEDB.11.0' provider is not registered on the local machine.
At the risk of sounding obvious, I would say you need to either install Project on your server, or find out if there's some other way of installing the provider (though a quick look on Google didn't return anything). As a general rule, programming with Office applications seems to require them to be installed on the server.
|
|
|
|