|
And why do you need to draw on the desktop?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Just for fun.
Forever Developing
|
|
|
|
|
It might not be what you want to do, but check out the ControlPaint class.
|
|
|
|
|
I do not know of a way in .NET but in Win32 you can probably do it with a DLL and HookProc. It will map your DLL into the system memory space were you can trap the messages. I used this method in the old days to communicate with the AOL software and capture its messages.
Rocky Moore <><
|
|
|
|
|
It's best not to deal with system-wide hooks, but it can be done. The main thing is that if your DLL hangs, the system hangs. (I've had experience with that! ) You might also look into a journal hook, although it may not work for paint messages.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
The main thing is that if your DLL hangs, the system hangs.
Makes debugging interesting
Actually, I never had any problems with System Wide Hooks. The code required to implement them is not complex and as long as you keep to only what is required and do not pile a lot into the DLL, things should be fine.
You need to watch when you attach and detach from different applications, a goof in there can cause strange things to happen
Thre are not anything to be afriad of though, I used them for years with the application I mentioned and never recieved on issue about it crashing their system.
Rocky Moore <><
|
|
|
|
|
jdunlap wrote:
It's best not to deal with system-wide hooks, but it can be done.
FYI: According to MSDN you can't perform a global hook under the .NET Framework : Knowledge Base Article - 318804[^]
-Nick Parker
|
|
|
|
|
"To install a global hook, a hook must have a native dynamic-link library (DLL) export to inject itself in another process that requires a valid, consistent function to call into. This requires a DLL export, which .NET Framework does not support. "
But this supported by MC++. I have a single dll with exports and a manifest ad can be used by bith managed and unmanaged apps, just as long as you have .NET installed, the process is transparent to unmanaged code.
So IMO its should be a trivial task to make an interface for a global hook.
I havent done anything like this, am I correct?
leppie::AllocCPArticle(Generic DFA State Machine for .NET);
|
|
|
|
|
leppie wrote:
But this supported by MC++. I have a single dll with exports and a manifest ad can be used by bith managed and unmanaged apps, just as long as you have .NET installed, the process is transparent to unmanaged code.
I guess what they mean is that the .NET Framework doesn't natively support this type of functionality (strictly within the Framework itself), I believe what you have is a "work-around". Then again, I could be completely wrong.
-Nick Parker
|
|
|
|
|
I want to traverse a 3 column table to get the 3rd column's textbox data. The first 2 cell's have text assigned to the cell (cell.text="xyz"). When I run this, column 2 cell's text is read with no problem:
for(int i=1; i<=TasksTable.Rows.Count-1; i++)
{
string txtColumn2 = TasksTable.Rows[i].Cells[1].Text;
}
However I get error message when I try to use FindControl or do something like:
for(int i=1; i<=TasksTable.Rows.Count-1; i++)
{
// Or like.. txtColumn3 = TasksTable.Rows[i].Cells[2].Text;
TextBox txtColumn3 = (TextBox)TasksTable.Rows[i].Cells[2].FindControl ("Hours");
}
Your syntax help would be appreciated. Thanks in advance if you don't hear from me, Jim.
|
|
|
|
|
if this is a datatable
MessageBox.Show(MyDataSet.Tables["myTable].Rows[0]["MyFirstColumn"].ToString());
Like wise
MessageBox.Show(MyDataSet.Tables["myTable].Rows[0][0].ToString());
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hi, I'm looking into application updater libraries/packages/systems. It would either be something where the user clicks on "Check for updates," or something
that happens automatically when the application loads. Ideally the server would be OS-independent (i.e. not require .NET or Windows).
Does anyone have any preferences? Microsoft's Application Updater Block might do the trick, but I might run into an OS dependency , and besides, it seems like 3rd parties tend to outdo Microsoft...
cheers,
Arun
|
|
|
|
|
Hello Gurus,
I need to record my rows' position orders and assign an order number to each row. How can I implement this by dragging and dropping rows on DataGrids? I appreciate it very much if you have any info. on this.
Thanks Gurus,
Khang Nguyen
|
|
|
|
|
How are these recorded underneath the form
A custom coollection lis implementing IBindingList would work more than likely
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hello Ista,
The row orders are translated into numbers and then saved to the database. Each row has a unique number.
Underneath the DataGrid, I bind it to DataTable and TableStyle.
Thanks
Have a great weekend, everyone
Khang
|
|
|
|
|
How can i convert a string into an int or double in C#?
-Alma-
|
|
|
|
|
string s = "5";
int i = int.Parse(s);
|
|
|
|
|
|
you might also want to put it inside a try block also in case it cant be converted.
the Char class has an isNumber to determine if thier all numbers.
I'm sure theres a better way of doing it though
Maybe even better would be to extend the Double if its not final
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
i have a search form which has (text boxes )firstname, lastname, phone, (button) search
i would like to be able to press Enter in any textbox and have the "Search" button clicked.
any tips on how to make this happen?
that is my primary objective .. i also can not find how to make the carrot focus on a text field when the form is called, or after the "search" button is submitted.
any insight on either of these would be much appreciated. thanks!
|
|
|
|
|
Make "search button" Accept button of the form
Regarding to second question..
if focus was on the textbox when you started search, it should be returned on textbox automatically when search is finished.
"...hasn't really been well accepted ... as the ratings tell us so far " - Nishant S
|
|
|
|
|
I am currently involved in a project that is a distrubeted network for sharing medical teaching cases between hospitals. It operates kind of like a specialized kazaa. The current system is in beta. It uses java servlets to send custom HTML messages between the querying program and the stroage server. I thought that it could be better implemented using a web service. Firstly the implementation would be more elegant from a programming stand point. Second, web services are a good technology base for future work. They are full featured and the functionality is constantly being expanded. The engineer in charge of the project has no knowledge of SOAP at all and he has been resistant to my ideas. He does report to a committee that overseas the project. What would be the best way to convice people that the project should use web services? I need more than the fact that it is cooler and technologically superior. Thanks.
Steve
Not all who wander are lost...
|
|
|
|
|
Steve Severance wrote:
What would be the best way to convice people that the project should use web services? I need more than the fact that it is cooler and technologically superior. Thanks.
The cool thing about web services is that they don't need to be the only API you provide to your system. You can also provide alternative solutions, like traditional (simpler) socket APIs, and so on.
If you're stuck with pure C on an old UNIX machines, SOAP messages can be hard to hand-code.
Therefore, my advice is: provide alternative implementations to ease access from older technologies, and make those alternative APIs consistent with the Web Service. When the time comes, almost everyone will migrate to the most efficient technology.
while (!sorted)
;
|
|
|
|
|
web services aren't just only to SOAP.
You can transport via HTTP and FTP
The good thing about web services is any language can tie into them using DISCO and hook to a wsdl.
But there a huge security risk, hackers can easily get past firewalls since firewalls dont guard agains web services. tpyically though becuase I heard some are sifting for unusual data.
But send jsp http requests to update data seems kind of old-world since web services are easier and less code means easier maintainable. Which in your employers eyes means more product for less money. If you want it to fly the keyword is "real world experiences saving MONEY"
do some research and make a 3 page report.
but youll create an enemny. be forwarned.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
how to read worksheet with C#
someone can help me to write this code
Thanks!!
Nho'c Ti`
|
|
|
|