.net

Drive select box with icons in windows form.

Is there any windows form control that shows list of drive letters with icons? ...

Programatically finding a message box and generating a click on a button

I am trying to automate testing of a winform application. I am running it in the same process as the test code, so it is fairly easy to find the .Net controls and simulate user action on them. I got however stuck a bit with a message box (created using the standard MessageBox.Show method). How can I get hold of it and simulate that a but...

Multiple Comboboxes with a list of objects.

I have a 3 ComboBoxes in a Form, a list of objects. I need to bind the the comboboxes with 3 different members of the class from the list. (C# 3.0, .NET 3.5) I am currently doing this Title_Combo.DataSource = ListContaining.GroupBy(item => item.Title).Where(item => !item.Key.Equals(string.Empty)).ToList(); Title_Combo.DisplayMember = "...

How do I get the MySQL Connector/NET driver version programmatically ?

Is there an easy way to get the version of the MySQL driver programmatically from within a C# program referencing MySQL.Data.dll ? ...

Use of Specific Version Reference in VS 2008

I have an assembly Foo, which has reference to assembly Bar(Version X.X.X.2000). In the properties, specific version is set to False. I have both Bar(x.x.x.2000) and Bar(x.x.x.1000) in my local GAC. Everything is fine. On another machine, where no version of Bar is in the GAC, but Bar(x.x.x.1000) is located in the same directory as Foo,...

.net webservice, help with method parameters.

When writing a .net webservice, can I use a existing xsd to be my parameters for my web service method. I want to point to the xsd and the web method will be created for me, instead of coding it. I am using vs 2005, framework 2.0. Thanks ...

Combo box with icons in windows forms?

Is there a combobox alike component that displays list of items with icons? ...

WCF Web Service operation throws exception when passed more than 50kb byte[]

I have a WCF Service operation which takes an object as a parameter. This object has a byte[] property among others. A Client program calls this service operation using a svcutil generated proxy. when client program populates the object's bype[] propery with size more than 50Kb it throws following error. (while an image size smaller th...

Cannot map network drive using .Net / WNetAddConnection2W (Error 67 - The network name cannot be found)?

Good afternoon, I am using the code below to map a network drive in a .net application.. well more precisely, try to do it. Whenever I do make the call to WNetAddConnection2W, I get a win32exception with the error code 67... which basically translates into 'The network name cannot be found'.. but I really do now know why... any ideas wh...

How to add an imagelist to WPF listview?

I don't even see it in the Toolbox in the designer. Is it called something else? I am trying to port my winforms listview to wpf. ...

How to listen for broadcast packets on any port?

Using .NET, how can I listen to udp broadcast packets sent to .255 on any port without the need of binding to a specific port? ...

XpsDocumentWriter.WriteAsync not working

I am trying to use XpsDocumentWriter.WriteAsync to write to a printer. Write works perfectly but as soon as i use WriteAsync nothing happens. Do i need to do anything special to use WriteAsync ? ...

Send windows message to a Windows Service

Is there any tool to send (mimic) a windows message like 'WM_ENDSESSION' to a windows service? OR How can I send a windows message to a process using C#? (I know only C#) EDIT: Purpose: Basically I have to debug a windows service for fixing a bug that occurs only on system shut down. ...

Difference between SystemInformation.ComputerName, Environment.MachineName, and Net.Dns.GetHostName

From what I have seen, in the MSDN documentation and in other questions here on SO, there are four ways to get the local machine name. Environment.MachineName; System.Net.Dns.GetHostName(); System.Windows.Forms.SystemInformation.ComputerName; System.Environment.GetEnvironmentVariable(“COMPUTERNAME”); Is there a differnece in what the...

Using linqpad as primary query tool

A member of my team recently moved to LinqPad as his primary query tool (still will use SQL Studio at times) for the simple purpose of forcing himself to make using LINQ more natural to use. I thought this was a pretty good idea and am considering asking the rest of my team to make this switch. Does anyone have any thoughts / ideas on ...

Seeing WHICH object reference caused a NullReferenceException

When debugging C# with Visual Studio, is it possible to see WHICH object reference on a given line of code caused a NullReferenceException? I have what seems like an odd situation where, occassionally, when running a debug build of an application from Visual Studio, I will get a NullReferenceException at a certain line. Visual Studio w...

Where can I get started with basic online functionality for a game in VB.NET?

I am creating a Boggle clone game and it works very well so far. Right now it is only single player. I would like to make it so that other players can connect, and show up in a listbox, and then I can select that person and play a 3 min round with them. What would be the best way to accomplish this? I know a lot about VB.NET, but I ...

Discriminator Property

Hello all, Working through this step by step guide. I am trying to create the inheritance between BirthAppointment / tblAppointment. However I need the Discriminator Property to be set to appCatId. The appCatId is held within tblAppointmentType. How can I access this. Thanks in advance for your help. Clare ...

Connection Lifetime=0 in MySql connection string

What exactly does Connection Lifetime=0 mean in a connection string? ...

Cannot return 'null' from generic methods?

Good afternoon, I have an generic method like public T GetLevelElement<T>(string name) where T : ILevelElement { [...] } Which basically performs a lookup in a db and in some cases it does not (and cannot return) a result and I would like to return null. However that's obviously not possible because of 'There is no...