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

vb6.0 help Urgent

I am using this code for when i scan more than one page in my application. if we click previous page button it shows previous page. but present i need code for next page.




If n_ImageCount > 1 Then
n_ImageCount = n_ImageCount - 1
cpapidrawimage PicImage.hWnd , g_Image(n_ImageCount)
Else
MsgBox ("This is last page")
End If
Jul 17 '06 #1
3 1372
BSOB
77
you would need a function to return the number of pages scanned in so far. either count each time this sub runs or have a static veriable that just adds one each time one is scanned.

maxscanned

If n_ImageCount < maxscanned Then
n_ImageCount = n_ImageCount - 1
cpapidrawimage PicImage.hWnd , g_Image(n_ImageCount)
Else
MsgBox ("This is last page")
End If

not that i changed the ">1" to "<maxscanned"

determining the number of scanned pages depends on the rest of your application
Jul 18 '06 #2
Thanks for u r responce n_imagecount is the variable that count no of pages we scan. so can u give me full explanation... how to declare maxscanned...

Thanku


you would need a function to return the number of pages scanned in so far. either count each time this sub runs or have a static veriable that just adds one each time one is scanned.

maxscanned

If n_ImageCount < maxscanned Then
n_ImageCount = n_ImageCount - 1
cpapidrawimage PicImage.hWnd , g_Image(n_ImageCount)
Else
MsgBox ("This is last page")
End If

not that i changed the ">1" to "<maxscanned"

determining the number of scanned pages depends on the rest of your application
Jul 19 '06 #3
BSOB
77
from what i can tell from your 4 or 5 lines of code, "n_imagecount" is not the number of pages you have scanned but it is the page number that you are currently veiwing. you need to have a variable (i chose the name maxscanned arbitrarily) that tells you how many pages you have total.
each time you scan a page, add 1 to the variable maxscanned.
to ensure that the scope is big enough, put

Dim MaxScanned as integer

in your general declaration section.
you will then be able to return or set its value from anywhere on that form.
im still leaving it up to you to use that variable as a running count of scanned pages. again i say that that depends on the rest of your code.
my previous post still holds valid.
Jul 19 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Rob | last post by:
I have a form - when you click the submit button, it appends a variable to the URL (e.g. xyz.cgi?inputID=some_dynamic_variable) It also opens a new page. Now, that some_dynamic_variable is...
9
by: Stefan Bauer | last post by:
Hi NG, we've got a very urgent problem... :( We are importing data with the LOAD utility. The input DATE field data is in the format DDMMYYYY (for days) and MMYYYY (for months). The target...
8
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
28
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
16
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
7
by: zeyais | last post by:
Here is my HTML: <style> ..leftcolumn{float:left;width:300px;border: 1px solid #ccc} ..rtcolumn{float:left;width:600px;border: 1px solid #ccc} </style> <body> <div class="leftcolumn"...
33
by: dembla | last post by:
Hey Frnds can anyone help me in this i need a program in 'c' PROGRAM to print NxN Matrix 9 1 8 1 2 3 2 7 3 as 4 5 6 6 4 5 7 8 9 in sorted form
8
by: ginnisharma1 | last post by:
Hi All, I am very new to C language and I got really big assignment in my work.I am wondering if anyone can help me.........I need to port compiler from unix to windows and compiler is written...
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
7
by: Cirene | last post by:
I used to use the Web Deployment Project with my VS2005 projects. Now I've fully upgraded to VS2008. Do I have to download a new version of the Web Deployment Project? If so where can I find...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.