473,382 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

picturebox image property

I've seen a couple of posts on the Internet with others having this problem,
however, no one seems to have a good answer.

I am working on a C# Smart Device application and have been able to browse
for a PictureBox image and insert in the Visual Studio .NET 2003 PictureBox1
properties pane. Now for some reason I can't - it's grayed out. I also
cannot add an imageList control and add an image. It gives me an "Object
reference not set to an instance of an object" error message. I've tried to
use Reflection to add the image and that didn't work either although I
really don't want to do that anyway.

Anyone have any ideas?

Thanks.

Nov 17 '05 #1
5 3129
Hi Jeff,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you cannot browse for a picture to
display it on the Picturebox. If there is any misunderstanding, please feel
free to let me know.

I have tried it on my machine. However, currently, I didn't reproduced it.
If you create a new Smart Device application, does this happen again? If it
doesn't, there might be some thing wrong with the project. I'd be
appreciate if you could send me the project with repro steps that can
reproduce this issue. It will be easier for me to troubleshoot on this.
Removing 'online' from the no spam alias is my email. Thanks!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #2
Hi,

I am working on a C# Smart Device application and have been able to browse
for a PictureBox image and insert in the Visual Studio .NET 2003
PictureBox1
properties pane.
So you mean that you include a PictureBox in your form that the IDE named
PictureBox1
Now for some reason I can't - it's grayed out. I also
cannot add an imageList control and add an image. It gives me an "Object
reference not set to an instance of an object" error message.
This error is shown at runtime or design ?
I've tried to
use Reflection to add the image and that didn't work either although I
really don't want to do that anyway.


I cannot see where reflection fix here, by default the image used is added
as a resource to the assembly.
I have never had such a problem, try this , add a new form to the project
and try to insert a picturebox there and see what happens.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Nov 17 '05 #3
Well, that's odd. I took both posters advice and created a new project and
that worked. I created a new form in my project and that worked. I went
back to my existing form where I was having problems and now it is showing
the ability to add a graphic!!! Don't know what the original problem was -
maybe creating a new project got it unstuck or something :)

Thanks for the advice.
"Jeff" <je**@newsgroup.nospam> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
I've seen a couple of posts on the Internet with others having this
problem,
however, no one seems to have a good answer.

I am working on a C# Smart Device application and have been able to browse
for a PictureBox image and insert in the Visual Studio .NET 2003
PictureBox1
properties pane. Now for some reason I can't - it's grayed out. I also
cannot add an imageList control and add an image. It gives me an "Object
reference not set to an instance of an object" error message. I've tried
to
use Reflection to add the image and that didn't work either although I
really don't want to do that anyway.

Anyone have any ideas?

Thanks.

Nov 17 '05 #4
You're welcome, Jeff. Thanks for sharing your experience with all the
people here. If you have any questions, please feel free to post them in
the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #5
You're welcome, Jeff. Thanks for sharing your experience with all the
people here. If you have any questions, please feel free to post them in
the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Pavan Arise | last post by:
Dear all.. I have a picturebox filled on a form. The picturebox has some graphics displayed on it.I was trying to save the picturebox, but continuesly failed to do so. I am clueless of why it is...
15
by: Jose Michael Meo R. Barrido | last post by:
Hi! Can u please tech me a way to know if the image in the picturebox has changed? what event should i catch the chage?
4
by: Ed Landau | last post by:
In VB6.0, I can put an image on a form and assign it's .picture property at run-time. In VBA (within MS Access), when I put down an image control on a form, it asks me for the source to the image...
2
by: David Ricker | last post by:
I have created a PictureBox control which can have it's Image property directly bound to an image field in a database. This works perfectly for showing the images that are in the database. When I...
9
by: SStory | last post by:
I have a picturebox in my About form. would like to have a link to my company website. Wanted the links background to be transparent. It seems that no one knows how to do this. Have asked...
8
by: nobody | last post by:
How do I save a PictureBox bitmap with changes drawn on the bitmap? This doesn't do it: PictureBox1.Image.Save("key30.bmp")
5
by: Christopher Kurtis Koeber | last post by:
Dear All, This may sound like an elementary question but how do you implement scrollbars for the Picturebox control. Do I have to create my own code to do this or is there some property that I can...
0
by: dlamar | last post by:
I'm using VB.NET with 2.0 - I have a number of PictureBoxes in my application - all of which use a context menu to change the associated Image to one of 5 options. I need to maintain the state of...
5
by: GoGs | last post by:
How this vb6 code convert in c# dotnet2 ----- Image1.Visible = False Image1.Picture = LoadPicture("c:\image008.jpg") Dim x, y As Single x = Image1.Width y = Image1.Height Do While x...
3
by: kirk | last post by:
I have a form with a PictureBox control on it. The .Image property is set to a PNG file(which shows the picture of the US map) with some transparency in it. The .BackColor property is set to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.