Answer Questions
Benjamin Bradley MSFT Printing text directly to a printer (NOT as a graphic)
I can print text if i do a e.Graphics.DrawString(......) My problem is that I am trying to print to a card printer, and usually it checks what text it is printing, and if it hits a '~' it then encodes the magnetic stripe. When i print from Microsoft word, or Access, it works fine because text is sent to the printer. But using "PrintDocument" object and drawing to a bitmap, it is unable to parse the text. Any ideas on how to print text ...Show All
Randy Focht Why won't my variable initialize in an overriden function?
OK, I'm having a very peculiar problem here. I've got a modified DataGridViewTextBoxCell where I want to override the GetFormattedValue function to handle complex types in my data source. The problem is that I can't seem to initialize simple datatypes inside this overriden function. Here's the code: protected override object GetFormattedValue( object value, int rowIndex, ref DataGridViewCellStyle cellStyle, TypeConverter valueTy ...Show All
Ted Romaniszyn RS232, convert string to hex string
Hi all, I have my device that put out to RS232 port by hex format. I try using write code to receiver its information and when it display in string format, i can understand , such as : " Uay <00>€€€€<00><00Uay<00>€€€€<00><00> Uay <00>€€€€<00><00>Uay <00>€€€€<00><00> Uay I€€€€<00><00>UUay €€€€<00><00> Uay <00>€€€€<00><00> Uay<0 ...Show All
Scott S. Waschitz Multiple Threads and Synchronizing Output to a Log File
Hello everyone... I'm working with a multi-threaded application. I believe I have it to the point now where several different threads can write to one common log file. Writing to the log would be used at initial startup and for an occasional exception, and is not something that would not happen very often. What I'd like some advise on is making sure the act of writing to the log is thread safe, in that when a thread writes to& ...Show All
cruzer JPEG Image compression
How do i create a function that takes a jpeg image and compress it even more, and save it again i have tried to search for an answer but can't find the solution, is there a class i can use en .net like the system.drawing.image links i found, but they are in C and using gdi http://msdn.microsoft.com/library/default.asp url=/library/en-us/gdicpp/GDIPlus/usingGDIPlus/usingimageencodersanddecoders/transformingajpegimagewithoutlossofinformat ...Show All
Justin Cao if..then..else
protected void Button1_Click( object sender, EventArgs e) { if (DetailsView1.Visible == false ) then; Button1.Text = "Update" ; DetailsView1.Visible = true ; else ; Button1.Text = "N ...Show All
Karthikeyan K Localizing Application (User) settings
I am running C# 2005 beta 2. I need to persist several strings in app.config using Properties.Settings. I will programmaticly set a label's text property with the string. Everything works great, except I can't figure out how to localize them! Localizing the form won't work as the label's text will change with the application's current state. I get the string I want using something like this: string temp = S e ...Show All
Kevin Herbert "Layer of Abstraction" Confusion
Hi folks, I'm trying to understand what events are, and primarily, why and when to use them, however, I'm having a little trouble understanding the subject. I hear a lot of people saying that events are another layer of abstraction, but I don't actually know what that means. I've tried Googling around, and I have found some sites that discuss it, but they seem to be talking to people who are CS graduates. Could someone explain the conc ...Show All
gill cleeren How to efficiently read an array from a file?
In C++, you can read directly from a file into an array without having to use an intermidiary buffer. For example, suppose I have a file containing 10000 32-bit integers. You can read from the file directly into an array of ints of the right size using "fread()". I can't find any way of doing the same thing in C#. The only ways I have found are: (1) Read each int in turn into the array via BinaryReader.ReadIn32(). (2) Read all the data ...Show All
ksona FileSystemWatcher [File is in user by other process]
Hello All Here is my dilema. I created an app and used FileSystemWatcher to watch for newely created files. When a user creates a file my app kicks in and save it to database and remove the file from the FileSystem. Recently we got an issue when a user created a file that was large in size and when my process tried to save the file to database I got an error that "The file is in use by another program" . How can I determine when the fil ...Show All
livehedfsdfsd ASP login to c#/aspx login
newbie in aspx obvious. i would like to know how to setup a web page which has login form; username and password i can't access the textbox values and i can't setup a action in a button. my approach is asp. for those asp coders i know u get my point... ty see Login Class (System.Web.UI.WebControls) ah ic i apologize. but anyway thank you for answering my post. ASP.NET questions are off topic here. It looks like you got y ...Show All
Patc4 How to import a dll made in C++ Win 32
Hello Everyone, I have a dll which is made in Win 32, as it is not an assembly neither COM can't be used as a refrence, so I have to Import it.... Can someone tell me how to do it...As when i do it asks for the entry point and secondly how to call the functions from that dll.....A brief example will be highly appreciATED... Thanks, Harsimrat You got it!!! Hey when u will use the dll i think you wi ...Show All
atreus769 Generics & Type Casting
I'm trying to write a generic method to sort 2-dimensional arrays. I'm converting each row in the array to a delimited string, which I then add to an ArrayList and then use the ArrayList.Sort() method. The problem I'm having is in then casting the objects in the sorted ArrayList back to the original type. This is the code: Type type = typeof(T); sortedArray[rowIndex, columnIndex] = (type) delimitedFields[columnIndex]; I'm getting ...Show All
Steffen H Enter button sensitivity in Console Apps (C# Express)
Hi I've been trying to run a program which asks a user for coordinates of several lines. The code then uses pythagoras to calculate the length of these lines. However, the problem that I'm having is when a user enters the first coordinate and presses enter, they get no opportunity to enter the remaining ones. It's alomost as though whne the enter button is pressed, the program thinks it has been hit more than once and skips ...Show All
m_edmondson Microsoft Office Document Imagine (MODI) PLEASE HELP
Hello everyone, I have found numerous documentation regarding this on the internet and on MSDN but there all IN VB.net which I can convert to C# most of the time. but there are a few functions im not sure how to get to work in c# .. basically what I am trying todo is Load a scanned document .. OCR the document .. and then Search the document for or Specify a X - Y location on the page in screen cordinates where the data is on the document that I ...Show All
