.net

How can I change text on a win32 window?

Looking for hints, tips and search terms for changing the text on a win32 window from C#. More specifically, I'm trying to change the text on the print dialog from "Print" to "OK", as I am using the dialog to create a print ticket and not do any printing. How can I find the dialog's window handle? Once I've got it, how would I go about...

Fire Event from within Outlook 2007 Add In which is picked up by external application

I have an Outlook Addin which does some processing of the Outlook mailboxes. On processing an email it fires an MailProcessed Event, if it couldn't process the email it fires MailProcessFail Event. Now I have an external service which is running. It calls the add-in every 60 seconds to start processing the emails. It needs to listen to ...

search for icq libraries for c#

I search a libraries that i can to interact with icq via c#.. i googling and not found useful information.. anybody knows one? ...

Compilation Error: "The modifier 'public' is not valid for this item" while creating public method on a class for explicitly implementing the interface.

I am getting this error while creating public method on a class for explicitly implementing the interface. I have the workaround: by removing the explicit implementation of PrintName Method, But surprised why i am getting this error. Can anyone explain the error. Code for Library: using System; using System.Collections.Generic;...

Strange error message when closing WinForms App

We have an Windows Forms application which make use of some com components such as the web browser control and an API for a signature pad. When the application is closed, sometimes an error dialog is shown with the following text: "sw: myapp.exe - Error in Application" The text was like this: The instruction xyz caused an illegal acce...

.NET Forms Abstraction for WPF, Silverlight, Winforms, WebForms, etc...

Anyone know of a project(s) that seek to abstract form definitions on level higher than WPF, Silverlight, Winforms, WebForms, etc... I'm working on a project where we are fixing up 16 somewhat simple WebForms. But we may convert (and probably will convert to WPF or Silverlight 3 to 4 months from now. I'd rather define these forms once ...

Console.WriteLine does not show up in Output window

I have put some Console.WriteLine calls in to test, but they aren't appearing in the output box? public static ArrayList myDeliveries = new ArrayList(); public mainForm() { InitializeComponent(); } private void mainForm_Load(object sender, EventArgs e) { if (!File.Exists("../../MealDeliveries.txt")) ...

File using .net sockets, transferring problem

I have a client and server, client sending file to server. When i transfer files on my computer(in local) everything is ok(try to sen file over 700mb). When i try to sent file use Internet to my friend in the end of sending appears error on server "Input string is not in correct format".This error appears in this expression fSize = Con...

How can I implement a voting system (UP/DOWN) or (THUMP UP/DOWN) like StackOverFlow in .NET ?

How can I implement a voting system (UP/DOWN) or (THUMP UP/DOWN) like StackOverFlow in .NET ? I found PHP codes but I want something that works in .NET environment. I don't care about security issues like multi votes and such restrictions at this stage. ...

Slow performance when utilizing Interop.DSOFile to search files by Custom Document Property

I am new to the world of VB.NET and have been tasked to put together a little program to search a directory of about 2000 Excel spreadsheets and put together a list to display based on the value of a Custom Document Property within that spreadsheet file. Given that I am far from a computer programmer by education or trade, this has been ...

operator not defined for System.Data.SqlClient.SqlConnection and System.Data.SqlClient.SqlConnection

i hope i'm just doing something wrong here. Ideally i'm trying to open the connection, open a transaction execute a ton of prebuilt sqlstatements (with parameters) against this connection then close the connection. ideally all in the same batch. It's easy enough to wrap this all in a for loop, however i'd like to use the forEach functi...

Problem serializing primitive data using WCF

Scenario: WCF client app, calling a web-service (JAVA) operation, wich requires a complex object as parameter. Already got the metadata. Problem: The operation has some required fields. One of them is a enum. In the SOAP sent, isnt the field above (generated metadata) - Im using WCF diagnostics and Windows Service Trace Viewer: [System...

How to get mx records for a dns name with System.Net.DNS?

Is there any built in method in the .NET library that will return all of the MX records for a given domain? I see how you get CNAMES, but not MX records. ...

Simple way to serialize ConfigurationElement into JSON

I need to take a portion of my xxx.config custom configuration and serialize it as JSON directly into my page. Using DataContractJsonSerializer yields {"LockItem":false} Which is similar to the response from XmlSerializer. I can't seem to find an override that gives me control over the serialization process on System.Configuration ...

Random RAM usage amounts

I was hoping someone could explain why my application when loaded uses varying amounts of RAM. I'm speaking about a compiled version that uses the exe directly. It's a pretty basic applications and there are no conditional branches in the startup of the application. Yet every time I start it up the RAM amount varies from 6MB-16MB. I ...

How to parse user input from a textarea line by line

If I have a variable that contains text information (say taken from a textarea), how can I read the text content held in a string variable line by line? The text entered in the text area will have \n (enter key) to separate the line. ...

Take a string to a byte[]

I have a string in my database that represents an image. It looks like this: 0x89504E470D0A1A0A0000000D49484452000000F00000014008020000000D8A66040.... <truncated for brevity> When I load it in from the database it comes in as a byte[]. How can I convert the string value to a byte array myself. (I am trying to remove the db for some...

Returning a value from a function after an elapsed amount of time?

I have a web service in ASP.NET being called by a time-sensitive process. If the web service takes longer than N seconds to run I want to return from the call so the time sensitive operation can continue. Is this possible and if so what is the code for this? ...

ASP.NET Download All Files as Zip

I have a folder on my web server that has hundreds of mp3 files in it. I would like to provide the option for a user to download a zipped archive of every mp3 in the directory from a web page. I want to compress the files programmatically only when needed. Because the zip file will be quite large, I am thinking that I will need to send ...

.NetFramework 4 SDK

Where can I download .NetFramework 4 SDK? Update I am looking specifically for the SDK and tools that come with it like GacUtil, not just the .NetFramework 4 Redistributable which lacks these tools. I want to avoid installing VS 2010 if possible... Answer from below Windows SDK that includes .NET 4.0, it was not announced or release...