|
Sorry, I don't know what hook means! also C/C++ !
Can you send me a referral link about it?
maybe I can try !
|
|
|
|
|
Information on hooking[^]
C[^]
C++[^]
Both are computer languages with similar syntax's, infact C++ was developed to extend and enhance the C language. Both are native languages.
This is an example of a Keyboard hook[^] written in C#. You can use the logic here to apply to your model.
The reason why I bothered to gather all this info? It will be useless to you, I sense you need a beginners book before attempting to understand global hooks. If you don't even know what C/C++ is, then you're in big trouble.
Good luck, you're going to need it.
|
|
|
|
|
this sample will be very helpful I think,
I know C# well, but I didn't mean that I don't know C/C++ I just meant I'm not familiar with that languages.
thanks for your help
|
|
|
|
|
How does this:
using (MyObj myObj = new MyObj(); ) {
myObj.DoSomething();
}
differ from this?:
{
MyObj myObj = new MyObj();
myObj.DoSomething();
}
I have been using the latter and I'm just wondering if it is more correct to use the former?
|
|
|
|
|
using can only be used on IDisposable implementing objects, and will call Dispose at the end. The other just quietly lets the object die. using can release the objects memory faster if the object would otherwise need to be finalized before collection (correct implementations of Dispose should call GC.SuppressFinalize )
It's usually best to use using whenever possible, especially on things like Stream s and Bitmap s.
|
|
|
|
|
It's not so much a case of correctness, as necessity.
The difference is that when the "using" code block goes out of scope, the resources used are immediately disposed. MSDN on using[^]
In the second case, they will be disposed when the garbage collector feels like it.
For example, if you open a file for exclusive access, then use using. If you don't, then the file may not be completely freed and released by the time you next come around to opening it, and you could get a "file in use" exception, despite you having let go of the file four routines back.
Don't go overboard with using, but if it is a scarce resource, or similar, the using is the way to go.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
There is also at least one case (SearchResultCollection) in which you must dispose manually an object to avoid memory leaks.
|
|
|
|
|
I'm reading text from a SerialPort that begins and ends each message with a newline character. The following code causes the console to display the message:
<br />
while (port.BytesToRead == 0) ;<br />
Console.WriteLine(port.ReadLine());<br />
Console.WriteLine(port.ReadLine());<br />
But this code causes the console to display nothing, and in fact the program hangs on the second ReadLine() :
<br />
while (port.BytesToRead == 0) ;<br />
port.ReadLine();<br />
Console.WriteLine(port.ReadLine());<br />
It seems that some kind of delay (sleeping the thread for a few tenths of a second, writing anything to the console, even setting a break point!) is necessary to make consecutive ReadLine()s execute properly. My understanding of ReadLine() is that it blocks and waits until a newline character appears in the buffer, which is inconsistent with what I'm observing. I've even tried to just clear the first newline character with a Read() or ReadChar(), but the same problem occurs.
Note: the reads need to be synchronous because the serial port data affects my program's logic. I'm not just printing to console/textbox.
|
|
|
|
|
hallo,
I need to create a new application using Visual studio .net (C#) but the boss want an attractive interface with animation and so on. can anyone give me some ideas about the product to use?
thank you very much
|
|
|
|
|
Use WPF if you are using .Net 3.0 or 3.5.
|
|
|
|
|
You can try out the following link to sart with Visual Studio 2008 -
http://msdn.microsoft.com/en-us/vstudio/default.aspx[^]
I can suggest you to use some 3rd party product for rich user interfaces. Among them DevExpress is a very good produc per my experience. There are several other products also availble which you can use based on your requirement,cost etc.
Btw, welcome .NET world 
|
|
|
|
|
ty very much! The library wfp is exactly what i'm looking for.....
|
|
|
|
|
Hi,
I need to change dynamically one parameter value of this attribute : SoapRpcMethodAttribute.
My goal is to extract an Action identifier and put it in the SOAP Message to send.
Do you have some other ideas.
I will very appreciate.
Reda.
|
|
|
|
|
Hi, I use the standard webbrowser control (not the extended version that is available here) (.net framework version is 3.5) in my C# application. When I input data in a text field a javascript function checks that input and displays a YES/NO Messagebox based on that input. Is there any way to get the Dialogresult of that messagebox (i.e. what button was pressed) or better yet a way to intercept this event in order to display my own messagebox?
|
|
|
|
|
I think you are using confirm() function. If not then try out the following -
<html>
<head>
<script type="text/javascript">
<!--
function confirmUserInput() {
var ans = confirm("Are you sure?")
if (ans){
alert("Thank you for your answer")
}
else{
alert("Please made your mind first")
}
}
</script>
</head>
<body>
<form>
<input type="button" onclick="confirmUserInput()" value="Confirmation">
</form>
</body>
</html>
|
|
|
|
|
It's possible to print a form (in format A4) with all controls included in it as the form appear on the desktop ? without manual creation of a specific PrintDocument.
Is there a class that realize this print ?
|
|
|
|
|
why can't you use PrintDocument?
it's as simple as this[^]
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
thanks...it's perfect. But the quality of the print it's low quality.
|
|
|
|
|
Hi everybody
I want to know what does this code do, why do they put a delegate? please explain me the topics and concepts behind every word
Thanks
Converter<int, String> converter = new Converter<int, String>(delegate(int value){return Convert.ToString(value);});
|
|
|
|
|
Angel Romero wrote: please explain me the topics and concepts behind every word
Why? They are already explained on the MSDN Web site. If I type it into a forum message you still have to READ IT. What's the point?
|
|
|
|
|
Well it doesn't explain why they use "delegate" or Generics for this conversion 
|
|
|
|
|
Angel Romero wrote: Well it doesn't explain why they
And how would anyone but "them" know why "they" did it?
You might want to check this out[^]
|
|
|
|
|
Well thanks for your answers
I can't find what I need from you
Thanks anyway
|
|
|
|
|
Angel Romero wrote: Well thanks for your answers
And thank you for answering my question.
Good luck, you're going to need it.
|
|
|
|
|
It fits in their design pattern? It was required by some part of the .NET library? Who knows? Up to them, right? Whoever they might be..
|
|
|
|