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

gdi+, please help!

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
4 1145
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael Kennedy [UB] | last post by:
Hi Everyone, I have this multithreaded C# windows forms application which does a lot of image processing. Occasionally, I get the following error: A generic error occurred in GDI+....
10
by: **ham | last post by:
I know that's an old dirty issue; GDI+ almost -the slowest part of the framework - has bothered many developers using it in animations. Even in managed C++ the performance is awful. Now, any dude...
5
by: anonymous | last post by:
I'm writing a program that deals extensively with the printer. For the most part my application runs fine, but occasionally I run into some Exceptions. The most common exceptions I run into are...
1
by: Prasad More | last post by:
Hello, I am trying to write a text on Multi-page TIFF image using C# and .NET GDI+. I have written following code to do this. When I execute this code I get "Invalid Parameter User. at...
7
by: | last post by:
We create VC++ programs that does some GDI drawing functionality. I discovered GDI+ and this seems to be a big step forward, and appears to be standard available in Windows XP and Windows Server...
10
by: Jim Hubbard | last post by:
Can you use VB.Net to set a system-wide hook to intercept all GDI calls from GDI to the system's hardware? I want to intercept all GDI instructions sent to the system's hardware layer. As I...
13
by: lgbjr | last post by:
Hello All, I have some pictureboxes on a VB.NET form that are linked to an AccessDB. If the user wishes to open or edit an image, I need to save the image in the picturebox to a temp file, then...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
2
by: AsusUltra | last post by:
Hey, im a newby C++ programmer trying to create a function that will draw a Polygonal shape on a Windows Form: Void DrawRegPoly(int numSides, Point CenterCoord, double radius) { //I dont know...
5
by: Jonathan Boivin | last post by:
Hi, I've got some problems with loading bills using a bill usercontrol I built. If I load all current bills in my test environment (156) everything is fine once, but repeating the operation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.