[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Web addess pic will not appear in a windows form a win form vb.net

Posted on 2014-08-19
2
Medium Priority
?
181 Views
Last Modified: 2014-08-19
I have a picture box and I swore I had no problem doing this before but has anyone came across this
http://images.sportsnetwork.com/nfl/atthegridiron/players/7528.jpg I have a textbox that binds to playerID

AND OF COURSE i HAVE AN ERROR WITH THIS

 Dim strimage As Integer = txtPlayerID.Text
        picplayer.ImageLocation = "http://images.sportsnetwork.com/nfl/atthegridiron/players/" And strimage And ".jpg"
        picplayer.Image = CInt(strimage) And ".jpg"

jUST DON'T GET HOW A SIMPLE THING LIKE THIS IS A NIGHTMARE.
0
Comment
Question by:powerztom
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 40271324
A lot of strange things there.
It,s a nitghtmare because you are using types without being careful, and the syntax makes no sense in VB.

What are the "And"s as operators. Looks like you want to concatenate, which is done with &

Why do you define strImage as Integer, assigne it text and then convert it to an integer when you want to use it?

picPlayer.Image = should assign a Bitmap, not some king of file name.

The following is sufficient:

PictureBox1.ImageLocation = "http://images.sportsnetwork.com/nfl/atthegridiron/players/" & txtPlayerID.Text & ".jpg"

Open in new window

0
 

Author Closing Comment

by:powerztom
ID: 40271380
James,

ThankYou  Yes I tried everything I could trying to solve a simple problem. Thanks Again.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question