Form Background not properly displayed

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

Guest

Hi, im having a very weird problem. I can create a new project and set the
form's background to an image i made in photoshop and run the program, no
code written. the image is displayed as grayscale. i have tried many
different images, formats, and projects yet it wont work. anyone else have
this happen? it was working before (couple months ago) yet now it
wont....thanks

-iwdu15
 
Hi, im having a very weird problem. I can create a new project and set the
form's background to an image i made in photoshop and run the program, no
code written. the image is displayed as grayscale. i have tried many
different images, formats, and projects yet it wont work. anyone else have
this happen? it was working before (couple months ago) yet now it
wont....thanks

Very odd. Typically, we might see a question in this newsgroup asking
how to accomplish the behavior you're seeing, not how to avoid it. :)

My first guess would be that there's something unusual about the image
you saved, but you say you've tried different images and formats. Most
image formats don't support alternative representations within the same
file (e.g. a color version and a grayscale one) so presumably your
tests would rule that out as a possibility.

So, given that, I'd say that you really need to post the code.
Assuming there's nothing wrong with the image itself, you either have
something wrong with your own code, or something's broken with your
..NET installation. You can rule out the latter by trying to same
compiled executable on a different computer. If that leaves only the
former, then without looking at your code it would be very hard to
answer the question.

Make sure that you post a concise-but-complete sample of code. Posting
just the line that sets the background isn't likely to be useful.
Unless you already know for sure what area of your code is the problem
(and if you do, you probably wouldn't be posting here), you need to
post all of it. Make sure you've removed any code that is not directly
related to the problem though (i.e. make the sample "concise").

Pete
 
Make sure that you post a concise-but-complete sample of code. Posting
just the line that sets the background isn't likely to be useful.
Unless you already know for sure what area of your code is the problem
(and if you do, you probably wouldn't be posting here), you need to
post all of it. Make sure you've removed any code that is not directly
related to the problem though (i.e. make the sample "concise").

thats the problem, theres no code in the program, its a blank program and
the only thing i did was set the background property to that of an image in
the resources. i dont understand this because another program i wrote that
uses the same image, just with different colors, works perfectly fine. i did
install the VS2008 beta and uninstalled it later, so might that have
something to do with it? thanks

--iwdu15
 
thats the problem, theres no code in the program, its a blank program and
the only thing i did was set the background property to that of an image in
the resources.

There's no such thing as "a blank program" that actually does
something, like showing a form. You may not have written some code,
but the VS Designer did. If that's the only code you have to show,
that's fine. It's still the relevant code.
i dont understand this because another program i wrote that
uses the same image, just with different colors, works perfectly fine. i did
install the VS2008 beta and uninstalled it later, so might that have
something to do with it?

Sure, it _might_ have something to do with it. That's why I suggested
running the same executable on a different computer. If the same
problem happens on a different computer (especially one that hasn't
been through the same "install 2008 beta and uninstall" routine), then
that means the problem is in the code. If it doesn't happen on a
different computer, then it's likely you just have a problem with your
..NET installation.

In other words, my previous post has all of the information you need to
proceed with debugging the problem.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top