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:
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...
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.
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?
does anyone know how to change the standardprinter in a .net application?
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)
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?.
"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"
"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"
public class FileStruct
public FileStream fileBW;
public StreamWriter swBW;
public FileStream fileBR;
public StreamWriter swBR;
public FileStream fileFR;
public StreamWriter swFR;
public FileStream fileStats;
public StreamWriter swStats;
I have a contextmenu which I use & for charachter to set shortcut for users. Foe example it has a "&Hello" test.The problem is an underline is shown in design mode under 'H' , but at run time it does not appear.The event habdler fires when I press H but there is no underlinw at run time.Any idea?
You might have Windows' setting turned on where it doesn't show the accelerator letters unless you press Alt. An easy way to tell is to put a MainMenu on your form and do the same thing. If at runtime you don't see the accelerator letters then you know this is the case. Press Alt to bring up the menu and then they'll be there.
At Jethro Tull's August 28, 2003 concert Ian Anderson mentioned that the group would be performing a medley of title tracks. The songs were "Songs from the Wood", "Too Old to Rock and Roll; Too Young to Die"; and from the Heavy Horses album, "Stairway to Heaven".