The API

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 21
Reputation: the_swan is an unknown quantity at this point 
Solved Threads: 0
the_swan the_swan is offline Offline
Newbie Poster

The API

 
0
  #1
Dec 9th, 2008
what is the API
for dispalying an image an image in VB
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: The API

 
0
  #2
Dec 9th, 2008
Not clearly enough...
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: The API

 
0
  #3
Dec 9th, 2008
There's no API calls needed. If you have a picturebox control and an image file, you just do the following:
  1. PictureBox1.Image = Image.FromFile("C:\somepic.jpg")
Of cource, there are other ways to get and display images depending on the source of the image.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 21
Reputation: the_swan is an unknown quantity at this point 
Solved Threads: 0
the_swan the_swan is offline Offline
Newbie Poster

Re: The API

 
0
  #4
Dec 9th, 2008
I save the picture in an array of byte in a file
and the picture was choosen from uploadefile web server control
i want to display the picture a gain on the screen using the repeater . do i need the API to display it
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: The API

 
0
  #5
Dec 10th, 2008
Still no API needed.
  1. Imports System.IO
  2.  
  3. Dim MemStream As MemoryStream
  4. Dim ByteArr() As Byte
  5.  
  6. ' Read image bytes from the file
  7. ByteArr = My.Computer.FileSystem.ReadAllBytes("C:\somepic.jpg")
  8. ' Create a memory stream from the bytes
  9. MemStream = New MemoryStream(ByteArr)
  10.  
  11. ' Create an image from the stream
  12. PictureBox1.Image = Image.FromStream(MemStream)
and the picture box is a control in the repeater control.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC