By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

gdi+, please help!

P: n/a
J
I am a newbie in vb.net and gdi+, in my windows app, I using System.drawing to
display image file, now when user view a multipage tiff file, they moved to 3rd
page, then chose a new tiff file, it's display 3rd page instead of first page, I
tried something but not works, so what I need to do? please help.
Thank in advance.
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Can you post some sample code?
(specifically where you control the name/location of the tiff file)
"J" <j@NoSpam.org> wrote in message
news:tc********************************@4ax.com...
I am a newbie in vb.net and gdi+, in my windows app, I using System.drawing to display image file, now when user view a multipage tiff file, they moved to 3rd page, then chose a new tiff file, it's display 3rd page instead of first page, I tried something but not works, so what I need to do? please help.
Thank in advance.

Nov 21 '05 #2

P: n/a
J
a user control:
Private Sub imageControl_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
tmpFileName = "c:\logo.jpg"
view = Image.FromFile(tmpFileName)
Catch ex As Exception
view = Nothing
End Try
End Sub

Private Sub imageControl_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.Transform = transform
' Draw Image using the DrawImage method
If (Not (view Is Nothing)) Then
e.Graphics.DrawImage(view, New Rectangle(Me.AutoScrollPosition.X,
Me.AutoScrollPosition.Y, (view.Width * curZoom), (view.Height * curZoom)))
End If
End Sub

on the main program:
Private Sub showImage()
Try
ImageControl1.view = Image.FromFile(Current_Image_File_Path)
Dim img As Image = Image.FromFile(Current_Image_File_Path)
img.Dispose()
End Try

' Repaint the form, which forces the Paint
' event hanlder
Me.ImageControl1.Invalidate()
End Sub


On Tue, 9 Nov 2004 11:49:21 -0600, "Will Gillen"
<g_i_l_l_e_0_0_1_@_n_s_u_o_k_._e_d_u> wrote:
Can you post some sample code?
(specifically where you control the name/location of the tiff file)
"J" <j@NoSpam.org> wrote in message
news:tc********************************@4ax.com.. .
I am a newbie in vb.net and gdi+, in my windows app, I using

System.drawing to
display image file, now when user view a multipage tiff file, they moved

to 3rd
page, then chose a new tiff file, it's display 3rd page instead of first

page, I
tried something but not works, so what I need to do? please help.
Thank in advance.


Nov 21 '05 #3

P: n/a
Hi,

Maybe this will help.
http://www.bobpowell.net/addframes.htm

Ken
----------------
"J" <j@NoSpam.org> wrote in message
news:tc********************************@4ax.com...
I am a newbie in vb.net and gdi+, in my windows app, I using System.drawing
to
display image file, now when user view a multipage tiff file, they moved to
3rd
page, then chose a new tiff file, it's display 3rd page instead of first
page, I
tried something but not works, so what I need to do? please help.
Thank in advance.
Nov 21 '05 #4

P: n/a
http://www.vbdotnetheaven.com/

J wrote:
I am a newbie in vb.net and gdi+, in my windows app, I using System.drawing to
display image file, now when user view a multipage tiff file, they moved to 3rd
page, then chose a new tiff file, it's display 3rd page instead of first page, I
tried something but not works, so what I need to do? please help.
Thank in advance.


Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.