|
I think this is maybe something to do with which thread you hook up to? - If you are importing the SetWindowsHookEx method from user32.dll it takes a parameter for the thread you want to hook into, maybe this is where your problem is?
|
|
|
|
|
|
The message arrives so I don't think it has anything to do with the thread id. But I will take a closer look .
|
|
|
|
|
I had a similair problem with windows hooks and it wasn't actually that the hook wasn't being fired, but in the callback function I was using readfile/writefile which apparently wasn't syncronizing right for multiple processes. So it was more of a process synchronization issue. I solved it using memory mapped files (which was more elegant anyway since it got rid of the need for a file at all for ipc).
|
|
|
|
|
Hi, anyone knows how to translate ASCII value ("int" = say, 53) into a "char"?
Thanks
norm
|
|
|
|
|
char MyChar = (char) someIntValue;
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
... how about....
char A = (char)65;
int i = 66;
char B = (char)i;
Best of luck - Bernd
|
|
|
|
|
I have a panel in my form which I set its BackColor the same as TransparencyColor of my Form so the contect behind the form is visible now.I want to take screenshot from the things behind panel.How can I get pixels behind it or get content of it as Image? I think I should get pixels inside client area of panel.Any idea?
Mazy
No sig. available now.
|
|
|
|
|
Regards,
I need familiarization with algorithms and methods that script/code parsers use to extract meaningful expressions from a plane text. can anybuddy reference me to some good resaources and examples?
Thanks in advanced,
-nSun
---
"Art happens when you least expect it"
|
|
|
|
|
You should look into Regular Expressions[^].
I passionately hate the idea of being with it, I think an artist has always to be out of step with his time.
-Orson Welles
|
|
|
|
|
nt
---
"Art happens when you least expect it"
|
|
|
|
|
Hi,
I want to know if I create a web service method in C# that returns a Dataset as it's return type, can a Java Client call it and retrieve it's values or do I need to convert it to some other object? Right now we have a Java Client that's calling the webservice, but she is getting null values for the return. I know the call is completed with no errors because I am logging the steps. Thanks in advance.
|
|
|
|
|
DataSet is a .NET framework class, it can't be handled in Java or other non .NET programs.
What you can do is write a new web method that returns a string generated by the data set (hint: the GetXML method of the DataSet class) and make your java code to call this new method.
My articles and software tools
|
|
|
|
|
What is the suggested thread model for a Listener class? My particular situation involves an asyncronous multicast client that continuously listens for available data and notifies via delegates of received data. The problem is the receive function becomes a blocker if the sender no longer publishes data and the ListenHelper function will never progress. I realize that I could Abort the thread, but for some reason that seems like poor solution. Maybe not. See the snippet below:
class AsyncMCListener {
BeginListen
{
_thListener = new Thread( new ThreadStart( ListenHelper ) );
_thListener.IsBackground = true;
_thListener.Priority = ThreadPriority.BelowNormal;
_thListener.Start();
}
ListenHelper {
while( !_bDone ) {
ReceiveData //BLOCKING CALL
NotifyConsumerDataReady
}
}
EndListen {
_bDone = true;
}
}
|
|
|
|
|
I can't think of an obvious way to tell the difference between "there's no more data coming in" and "there will be data in a while", so I think you're stuck with the loop you have.
Can you explain why the loop being blocked on the receive is a problem?
|
|
|
|
|
The problem arises when the client wants to stop listening. They've decided they no longer want to be a part of the chat session or the video stream or in my case the Trace/Debug broadcast. There very well may be more data "in a while", but the client/subscriber has chosen not to receive that data. I've implemented the Listener loop such that it handles ThreadAbort and does the socket.Shutdown and socket.Close in the finally of try...catch, but it doesn't seem right. I feel as if there should be an interrupt in there somewhere in the ReceiveFrom call on the socket. That's about the only other way to do it, but that's not built into the socket class, so oh well. Anyways, here's what we've got instead...
|
|
|
|
|
sorry to be so lame with this question, but i'm still learning how this works.
how can i get the input from a user in a textbox control on one form to display on another form?
private void data()<br />
{<br />
Mainform.sdgform sdg = new Mainform.sdgform();<br />
MessageBox.Show(sdg.txtShipTo.Text);<br />
}<br />
<br />
public System.Windows.Forms.TextBox txtShipTo;<br />
public void textboxexample()
{<br />
this.txtShipTo.Text = "example data";<br />
}
I have a whole form with a lot of textboxes that a user fills in and i need this data to write to a text file. the problem for me is that the toolbar button (on form 1) generates the 'write to textfile' code but it doesn't see the users input (from form 2). i know it's a lame-o question, but i'm still very new.
Thanks for your help.
|
|
|
|
|
One way would be to make your textboxes public, that way the other form can "see" it.
|
|
|
|
|
Hello all,
I'm having a bit of trouble with decimal.Parse. I am trying to convert a currency string into a decimal number. This is my code...
decimal theValue = decimal.Parse(strValue, NumberStyles.Currency);
This works fine for string values such as "£1.23" or "$4.56", but throws an invalid input exception if i try it with "€9.87".
I'm using VS.NET 2002 (1.0 framework), does anyone know if this works with euro's in 2003 (1.1)?? If so then i'll upgrade to that, if not has anyone got a workaround?
Thanks in advance,
Simon.
|
|
|
|
|
Simon_uk wrote:
I'm using VS.NET 2002 (1.0 framework), does anyone know if this works with euro's in 2003 (1.1)??
If anyone cares, then this is still a problem in the 1.1 framework so you have to deal with Euro's manually.
Simon.
|
|
|
|
|
Simon_uk wrote:
If anyone cares, then this is still a problem in the 1.1 framework so you have to deal with Euro's manually.
I care very much, what is the exact problem? Some sort of bug or...
I'm about to port (re-write actually) a 400,000+ lines of code c++ program to c# that will definitely be parsing user entry of Euro values (not to mention pesos, kroners etc etc).
|
|
|
|
|
hi,
does anyone know how to change the standardprinter in a .net application?
thanks
michael
ps:
my concret problem is that i use the acrobat pdf-control to display a pfd in my application. ich even can print it with the "printAll()" methode on the standardprinter. but i found no way to set the printer the document should be printed. i even would be thankfull for a tipp to change the sprinter-settings in the pfd-control ;o)
|
|
|
|
|
Hi folks,
I´m building a database application, which has to connect to a database through an ODBC provider, but when I insert an OleDbDataAdapter in my form, and try to "connect" it with any ODBC data source, I get a nasty message telling me that the data source and the adapter are not compatible.
If I choose another OleDB provider, such as Microsoft Jet driver it works fine.
The question is: ¿do I need any kind of special code/libraries to get data from ODBC sources?.
Thanks in advance.
|
|
|
|
|
What does your ConnectionString look like? Can you also post what excatly the error message says?
-------------------------------
Joan
MomComputerGeek.com
|
|
|
|
|
The ConnectionString of my connection is:
"Provider=MSDASQL.1;Persist Security Info=False;Data Source=Base de datos de ejemplo Xtreme;Extended Properties="DSN=Base de datos de ejemplo Xtreme;DBQ=C:\Archivos de programa\Microsoft Visual Studio .NET\Crystal Reports\Samples\Database\es\xtreme;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;";Initial Catalog=C:\Archivos de programa\Microsoft Visual Studio .NET\Crystal Reports\Samples\Database\es\xtreme"
And I get this error message:
"La conexión que acaba de crear no funciona con el adaptador actual"
In english:
"The connection you´ve just created doesn´t work with the current adapter"
Maybe I need some patch or update for my VS copy.
"When I look into your eyes, there´s nothing there to see, nothing but my own mistakes staring back at me"
|
|
|
|