Cannot set form background image

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I recently started using VisualStudio.Net for the first time. I started a
project and created some forms to gain an understanding of how to use C#,
Visual Studio, and the .Net framework.

One of the first things I did was to create a non-standard window with
rounded corners and set the background image of the form. I set the
background image by simply opening the form properties and clicking the "..."
button next to the BackgroundImage property and selected an image to use as
the background, in this case it was a JPG, and all was fine. I could see the
background image in Visual Studio and when I ran my application.

Sometime later I created a new project and started developing a small and
real application. I decided to add a splash screen. I wanted to use a bitmap
I created as the backgroud of the splash screen. As before I opened the form
properties and clicked the "..." button next the BackgroundImage property and
selected the bitmap only to receive an error "Empty path name is not legal".
I tried selecting several different images with the same result. I then
copied images to c:\ and tried selecting from there with the same result.

I thought I must have been doing something differently then I had done with
the first project in which I sucessfully set the background image. I tried
setting the background image in the first project, thining it would work, but
it did not. I got the same error. So I closed everything down and rebooted,
thinking this might help, but it did not help.

What the heck is going on? Has anyone ever encountered this problem? Did I
inadvertently change some critical environment setting that is causing this
problem? I am baffled!
 
I discovered today that I SaveFileDialog does not work either. I get the same
error as whn trying set the background image. The SaveFileDialog alwasy
returns an empty string rather than the specified file.

I was able to get backgrounds working by manually adding the image to my
project, changing its build action to Embedded Resource and then manually
setting the background in the form ctor.

There must be something wrong with the framework or VS. I am going to
reinstall. I will post if it solves the problem. If it does then I wonder how
often I am going to need to reinstall VS 2003 to keep it working.
 
I tried reinstalling .Net but still could not set background images or use
the save dialog. I then tried repairing VS but still had the same problems. I
then reinstalled VS and still have the same problem. Great, now VS is
virtually unusable!

Good job Microsoft!
 
I just discovered a component I installed from Stardock named EhancedDialog
was the culprit. After I uninstalled it the problems were gone. It works fine
with everything else except Visual Studio. I wonder where the problem lies,
with Stardock or with Microsoft.
 
Back
Top