Hi All,
I am trying to write a desktop app where users can browse their computers for images and when they are found drag them onto a design stage. Basically the interface for the app consists of a tools panel on the right side of the screen and the design stage (a large white box) on the left. One of the many tools within the tools panel is a browse button which is used to search for images. How can I add the ability to drag images from where ever they reside onto the design stage using C#? Please point me to a site that talks about importing images into an app if you know of any, thanks in advance for your help.

How can I add the ability to drag images from where ever they reside onto the design stage using C#?

Create a new Panel in the staging-area, and display the image within. Go here[^] for explanation on implementing Drag&Drop.

Images can't be stored in the application, one would use a special directory or, preferably, a local database (like SqlCe or Sqlite). There are various examples on storing and retrieving images from a database.

I need to do a simple drag and drop procedure, but I dont know why this code isn´t working...

MainWindow.XAML:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

try
{
try
{
thrownew Exception();
}
catch(Exception exception)
{
throw; // this rethrows the caugh exception.
}
}
catch(Exception exception2)
{
// here you will get the same exception as you got in the// other catch.// Note that I used throw; to rethrow the exception. If on the// other catch I did a throw exception; I would end-up replacing// the stored callstack (that's usually a bad thing).
}

Note: You can also avoid catching the exception by putting a more specific type in the first catch (like IOException instead of Exception).

Hey folks!! Hope you can help me with my client code.
Först I debugg the Server wich is an consoleapplication and the server starts, secondly I debugg the Client, I put a nickname value to the nickNameTextBox and click on Connect (button2) the compiler stops at this code line

serverStream.Write(outStream, 0, outStream.Length);

It says that the objectreference has not given an instans of a object!!

Note!!!! The code is working fine with VS 2008 but Im currently trying to work with it on VS 2010 but it wont run like it should

from the button 2 handler - unless you have pressed Button1 first, the connection has not been established and it will likely throw an exception - probably the one you are complaining about.

Personally, I would have a "Connect" method, which checked if you are connected and does so if not - and call it from both click events. (I would probably also make it return the stream instead of using a class level variable directly in the two event handlers).

If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

Thank you mate I appreciate your help, I changed it to this code,
the reason I commented out

//clientSocket.Connect("127.0.0.1", 8888);

because the compiler stops there when I debugg telling me that a socket is already connected, now the compiler runs withour errors but the server consoleAppplication doesn't receive any msg at all when I send it from sendTextBox..

"Failed to read data from the transport connection: An existing connection was forced to close by the remote host." It havens because I closed the Server... Anyway this project is driving me crazy man I can't see why it's not working and the Server doesn't get and show the string on the server prompt from the Client