473,387 Members | 1,698 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,387 software developers and data experts.

Using the Picture Control

Ive been programming for some time now, so i wanted to get into graphics, but
i wanted to see if I could make a Picture Viewer. I have no experience with
the picture control, ive tryed the MSDN tutorial for the control. If the code
to use it in is in Basic, dont bother sending it. Nor do i have much
experience with the "Open" dialog box.
Jul 21 '05 #1
5 2218
Hi Michael,

Both the controls are very strightforward. Since you had been programming
for some time, it shouldn't be a problem at all.

Here's an MSDN link which shows how to set the picture in the PictureBox
control at run time
http://msdn.microsoft.com/library/de...satruntime.asp
You could also directly set the path to the picture.

And here's the MSDN's intro to the OpenFileDialog component
http://msdn.microsoft.com/library/en...oloverview.asp

Let me know if you need more help.

HTH,
Rakesh Rajan

"Michael" wrote:
Ive been programming for some time now, so i wanted to get into graphics, but
i wanted to see if I could make a Picture Viewer. I have no experience with
the picture control, ive tryed the MSDN tutorial for the control. If the code
to use it in is in Basic, dont bother sending it. Nor do i have much
experience with the "Open" dialog box.

Jul 21 '05 #2
Thanks for the quick reply, but im still confused. The sites you included are
helpful, but when trying the code for the PictureBox, it comes back with
multible errors, ones i have no idea how to fix, here they are:

error C2065: 'pictureBox1' : undeclared identifier

error C2227: left of '->Image' must point to class/struct/union
type is ''unknown-type''

error C2653: 'String' : is not a class or namespace name

error C2653: 'System' : is not a class or namespace name

error C2653: 'System' : is not a class or namespace name

error C2065: 'Personal' : undeclared identifier

error C3861: 'Concat': identifier not found, even with argument-dependent
lookup

error C3861: 'GetFolderPath': identifier not found, even with
argument-dependent lookup

Thanks, Michael

"Rakesh Rajan" wrote:
Hi Michael,

Both the controls are very strightforward. Since you had been programming
for some time, it shouldn't be a problem at all.

Here's an MSDN link which shows how to set the picture in the PictureBox
control at run time:
http://msdn.microsoft.com/library/de...satruntime.asp
You could also directly set the path to the picture.

And here's the MSDN's intro to the OpenFileDialog component.
http://msdn.microsoft.com/library/en...oloverview.asp

Let me know if you need more help.

HTH,
Rakesh Rajan

"Michael" wrote:
Ive been programming for some time now, so i wanted to get into graphics, but
i wanted to see if I could make a Picture Viewer. I have no experience with
the picture control, ive tryed the MSDN tutorial for the control. If the code
to use it in is in Basic, dont bother sending it. Nor do i have much
experience with the "Open" dialog box.

Jul 21 '05 #3
Hi,

I guess you copy-pasted the samples given in the articles.

Instead of doing that, create a new project and drag and drop the required
components and code. Don't copy the sample code exactly as it is given -
instead copy only the portions you need and modify the control names as you
have given in your code.

HTH,
Rakesh Rajan
"Michael" wrote:
Thanks for the quick reply, but im still confused. The sites you included are
helpful, but when trying the code for the PictureBox, it comes back with
multible errors, ones i have no idea how to fix, here they are:

error C2065: 'pictureBox1' : undeclared identifier

error C2227: left of '->Image' must point to class/struct/union
type is ''unknown-type''

error C2653: 'String' : is not a class or namespace name

error C2653: 'System' : is not a class or namespace name

error C2653: 'System' : is not a class or namespace name

error C2065: 'Personal' : undeclared identifier

error C3861: 'Concat': identifier not found, even with argument-dependent
lookup

error C3861: 'GetFolderPath': identifier not found, even with
argument-dependent lookup

Thanks, Michael

"Rakesh Rajan" wrote:
Hi Michael,

Both the controls are very strightforward. Since you had been programming
for some time, it shouldn't be a problem at all.

Here's an MSDN link which shows how to set the picture in the PictureBox
control at run time:
http://msdn.microsoft.com/library/de...satruntime.asp
You could also directly set the path to the picture.

And here's the MSDN's intro to the OpenFileDialog component.
http://msdn.microsoft.com/library/en...oloverview.asp

Let me know if you need more help.

HTH,
Rakesh Rajan

"Michael" wrote:
Ive been programming for some time now, so i wanted to get into graphics, but
i wanted to see if I could make a Picture Viewer. I have no experience with
the picture control, ive tryed the MSDN tutorial for the control. If the code
to use it in is in Basic, dont bother sending it. Nor do i have much
experience with the "Open" dialog box.

Jul 21 '05 #4
Ok, i understand that, but what i dont understand is the member variable
"pictureBox1". There is a "PictureBox1", the name of the picture control in
my project, but after changing the name, nothing different, i change the
..Image to just "image.gif", not all the stuff about the "My Documents"
folder, but it still comes up with errors. I change the code to just this:
PictureBox1->Image = Image::FromFile("Image.gif");
where it only comes up with 3 errors.
error C2065: 'PictureBox1' : undeclared identifier
error C2227: left of '->Image' must point to class/struct/union
type is ''unknown-type''
error C2064: term does not evaluate to a function taking 1 arguments

maybe if you could send me a sample project, or a detailed explanation, that
would be great, sorry for my lack of knowledge, ive worked with 6.0 for a
while, not .NET, just got it.

Thanks, Michael
Email: ca***********@gmail.com
"Rakesh Rajan" wrote:
Hi Michael,

Both the controls are very strightforward. Since you had been programming
for some time, it shouldn't be a problem at all.

Here's an MSDN link which shows how to set the picture in the PictureBox
control at run time:
http://msdn.microsoft.com/library/de...satruntime.asp
You could also directly set the path to the picture.

And here's the MSDN's intro to the OpenFileDialog component.
http://msdn.microsoft.com/library/en...oloverview.asp

Let me know if you need more help.

HTH,
Rakesh Rajan

"Michael" wrote:
Ive been programming for some time now, so i wanted to get into graphics, but
i wanted to see if I could make a Picture Viewer. I have no experience with
the picture control, ive tryed the MSDN tutorial for the control. If the code
to use it in is in Basic, dont bother sending it. Nor do i have much
experience with the "Open" dialog box.

Jul 21 '05 #5
Never mind, even though you havent responded. I found a great site that
helped alot, and it has things in C++6.0 and .NET, both of which I use.

Check it out:

http://functionx.com/

"Michael" wrote:
Ok, i understand that, but what i dont understand is the member variable
"pictureBox1". There is a "PictureBox1", the name of the picture control in
my project, but after changing the name, nothing different, i change the
.Image to just "image.gif", not all the stuff about the "My Documents"
folder, but it still comes up with errors. I change the code to just this:
PictureBox1->Image = Image::FromFile("Image.gif");
where it only comes up with 3 errors.
error C2065: 'PictureBox1' : undeclared identifier
error C2227: left of '->Image' must point to class/struct/union
type is ''unknown-type''
error C2064: term does not evaluate to a function taking 1 arguments

maybe if you could send me a sample project, or a detailed explanation, that
would be great, sorry for my lack of knowledge, ive worked with 6.0 for a
while, not .NET, just got it.

Thanks, Michael
Email: ca***********@gmail.com
"Rakesh Rajan" wrote:
Hi Michael,

Both the controls are very strightforward. Since you had been programming
for some time, it shouldn't be a problem at all.

Here's an MSDN link which shows how to set the picture in the PictureBox
control at run time:
http://msdn.microsoft.com/library/de...satruntime.asp
You could also directly set the path to the picture.

And here's the MSDN's intro to the OpenFileDialog component.
http://msdn.microsoft.com/library/en...oloverview.asp

Let me know if you need more help.

HTH,
Rakesh Rajan

"Michael" wrote:
Ive been programming for some time now, so i wanted to get into graphics, but
i wanted to see if I could make a Picture Viewer. I have no experience with
the picture control, ive tryed the MSDN tutorial for the control. If the code
to use it in is in Basic, dont bother sending it. Nor do i have much
experience with the "Open" dialog box.

Jul 21 '05 #6

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

Similar topics

4
by: Chris | last post by:
Hi, I am trying to set the position of a picture inside a picturebox with the folowing code: pctOutput.Picture = LoadPicture(App.Path & "\picture.bmp", , , , ) I didn't know what to fill...
5
by: Erwin | last post by:
At the moment I'm using a report which contains an indicator to show if a Service group of the company isn't working well or is working perfectly. This indicator is a "*" which looks like a traffic...
1
by: bborden | last post by:
Novice Access programmer here. I would like to display an image using the Toolbox Image object by calling the images file name using: =fPictureFiles(!!,1) in the Picture control. Below...
3
by: Z D | last post by:
Hello, BACKGROUND: ============== I've created a Windows User Control that contains an Image Control (among other controls). The user control handles the picture resize event. Whenever the...
1
by: | last post by:
How do I control the layering of 4 forms of identical size and position to cause the desired form to be second from the top.. Form1 has my welcome screen etc.and the code for file manipulations...
5
by: Michael | last post by:
Ive been programming for some time now, so i wanted to get into graphics, but i wanted to see if I could make a Picture Viewer. I have no experience with the picture control, ive tryed the MSDN...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
1
by: vidhyaprem | last post by:
i have started a small project in visual basic regarding the stock details in our textile company.It has details like product id,product name,no of items,product picture etc.. so i have created a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.