473,246 Members | 1,314 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,246 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 2210
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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...

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.