We are trying to emulate a POS keyboard in order to integrate an application with an existing Point of Sale application.
We ran across this software: Virtual Serial Port Kit
It basically creates a virtual serial port pair so that data send to COM1 can come out of COM4 and vice versa. This allows our application to send data through CO...
Does anyone know why the code below throws System.ArgumentException?
using (var tfc = new TempFileCollection())
{
var fn = tfc.AddExtension("tmp");
Console.WriteLine(fn);
}
Here is exact exception:
System.ArgumentException: The file name 'C:\Users\pczapla\AppData\Local\Temp\iqulrqva.tmp' was already in the col...
Hi,
I am using a HttpListener to implement a very simple http server, which is accepting a POST from a Java client. When the client calls I get a HttpListenerRequest, which contains all the form parameters. How can I extract the form parameters? I seem to have access only to the content stream....
...
Consider an algorithm that needs to determine if a string contains any characters outside the whitelisted characters.
The whitelist looks like this:
'-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÖÜáíóúñÑÀÁÂÃÈÊËÌÍÎÏÐÒÓÔÕØÙÚÛÝßãðõøýþÿ
Note: spaces and apostrophes are needed to be included in th...
I have an application that logs exception strack traces and I wanted those stack traces to include file names and line numbers when deployed in production. I figured out how to deploy the debug symbols w/ the assembly, but in the process of researching the issue I ran accross this question, which implies that it's not a good idea to inc...
Many of my questions here on SO concerns IEquatable implementation. I found it being extremely difficult to implement correctly, because there are many hidden bugs in the naïve implementation, and the articles I found about it are quite incomplete. I want to find or write a definitive reference which must include:
How to implement IEqu...
I have a data-binding set on a dependency property of a class. I also have an IValueConverter to handle the calculation of this value based on other elements. The context of my question is inside the IValueConverter.Convert method.
#1
If the calculated return value is equal to the current property value, can I tell the framework not t...
Is it possible to create an appointment in Outlook from a custom Sharepoint Web Part programmatically? VB.Net links or examples would be most helpful.
Thanks.
...
Hi,
Using c# .net 2.0 , I want to bind a textbox to a specific row of my table. In Example :
Table Person
ID NAME PRENOM SPECIAL_CATEGORY
1 BOB BOB mex
2 AL AL tot
3 PO PO pap
I want to bind my textbox on the field name where the row contains special_categeory = 'tot'.
Is it possible? or I need to create a D...
It looks like the value in my session object changes when I modify a local variable set from session.
Setup:
.net 2.0
BasePage retrieves a complex object from session , casts it, and stores it in a class level variable.
Child Page uses class level variable to do play out some optional scenarios. User decides to not keep changes, sess...
Is there a way to view the generated source of a web page (the code after all AJAX calls and JavaScript DOM manipulations have taken place) from a C# application without opening up a browser from the code?
Viewing the initial page using a WebRequest or WebClient object works ok, but if the page makes extensive use of JavaScript to alter...
I am trying to read a text file using the code (pasted below), but the last line of the file does not get read. Is my logic correct?
using (StreamReader reader = new StreamReader(stream))
{
try
{
string line = reader.ReadLine();
string[] data = BreakLine(line);
...
I know I'm going all the way down the long tail on this one, but does anyone have any FUNCTIONING Redi Plus Active X API Samples? I need to connect to their API and none of the .NET code samples they gave me actually work, and I cannot get anyone from Redi to give me any support as to why they don't work.
If you've used the Redi Plus Ac...
I've got an application that traps text entry at the window level (i'm using a barcode scanner) and occasionally the operator will click on view elements which then gain focus, taking focus off the window, and the window no longer recieves either previewtextentry or textentry events, any ideas?
...
I'm looking for a WinForms .NET control that behaves exactly like the WinForms TextBox control in multi-line mode, but instead of the text being anchored to the top of the text box, I would like the text to be aligned in the middle - vertically. So, just like there is a TextBox.TextAlign property that takes Left|Right|Center, I'd want a...
Say I have a rolling collection of values where I specify the size of the collection and any time a new value is added, any old values beyond this specified size are dropped off. Obviously (and I've tested this) the best type of collection to use for this behavior is a Queue:
myQueue.Enqueue(newValue)
If myQueue.Count > specifiedSize Th...
I'm using a virtualized web server and I don't remember whether it's running Windows Server 2000 or 2003. How can I tell which?
Ask the ISP, course, which I did. The question, then, is somewhat academic. Is there any way to tell this from .NET?
I access the machine through Plesk, which is designed to shield you from this kind of arc...
I am installing an application on a client machine. The application is throwing an exception that I am logging that states "Class Not Registered". This an app written in Visual Studio 2005 using VB.NET. The dll dependencies of my .exe are located in the same folder as the .exe. What class is this talking about and how can I resolve t...
Hello. I am using Nektra's Deviare to hook winsock's send method calls. My ideia is to learn to also send messages through the same socket than the original application. So what I'm doing is when i detect the first call to send message, I save the socket id(the first argument of the send function), so I can use it later.
So here is my c...
As far as I understand, the IDeserializationCallback interface and the OnDeserialized event can both be used when an object needs to perform some task after being deserialized.
IDeserializationCallback:
[Serializable]
public class Foo : IDeserializationCallback
{
public void OnDeserialization(object sender)
{
// initia...