472,353 Members | 1,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

How To Rotate Thru a set of Pic's

Hello

I have On a form an Unbound Picture (BMP) that I would like to be able
to change by clicking on it and having it got display the next Pic in the List.

Like This:

I Open The Form (Normally) and when I click on the Pic, it will rotate to the
Next Pic in the list (About 16 In Total), After the last one it goes back to the
first pic again.

Is this possible in Access, How much coding is involved?

Thanks

Keith
Nov 13 '05 #1
1 1633
1. Create an image control, with "(none)" as the Picture property, and
Picture Type property "Linked"
2. Create a button, and place it completely over the image control. Set
it's Transparent property to "Yes"
3. Create a table with the full path of each photo:
photo_id photo_path
1 "C:\images\image1.bmp"
2 "C:\images\image12.bmp"
4. Declare form level variables:
Private photoID as Long
Private imageCount as Integer
5. In your form's Load event, load your first image from your table & store
the photo_id:
[Open recordset rs]
photoID = rs.Fields(0)
Me.imgPhoto.Picture = rs.Fields(1)
[Close recordset]
[Count records in recordset and store in imageCount] (you can use
DCount)
6. In your buttons OnClick event:
Dim cnt As Integer
[Open recordset rs]
[rs.MoveNext until rs.Fields(0) = PhotoID, incrementing cnt as you go]
If cnt = imageCount
rs.MoveFirst
Endif
photoID = rs.Fields(0)
Me.imgPhoto.Picture = rs.Fields(1)

It could be made much simpler if you name the images 1.bmp, 2.bmp, etc and
used a hardcoded path, but this allows you to have file names that are not
important to the code, a variable number of images, and variable file
locations.

Darryl Kerkeslager
<ca*****@hotmail.com> wrote:
I have On a form an Unbound Picture (BMP) that I would like to be able
to change by clicking on it and having it got display the next Pic in the List.
Like This:

I Open The Form (Normally) and when I click on the Pic, it will rotate to the Next Pic in the list (About 16 In Total), After the last one it goes back to the first pic again.

Is this possible in Access, How much coding is involved?

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Showjumper | last post by:
Hi, I have developed an upload server controls to be reused over a number of projects. One of the tasks it needs to handle is to rotate an image. I...
3
by: byrd48 | last post by:
Hi, I am developing a web site which allows users to upload and share photos. I have a datalist which lists the photos and has the usual edit,...
2
by: Peter Proost | last post by:
Hi group, I got the following piece of code which draws a square with stars round it, now I want the stars to rotate round the square, I can do...
17
by: santel_helvis | last post by:
Hi All, Could anyone tell me how to rotate the image in javascript. Which concepts I should concentrate to rotate the image
8
by: Const | last post by:
Hi! I wonder how to rotate a pictureBox, welle, the image in the pictureBox ! I watched old post form here, but i can't find any answer for...
8
by: lovecreatesbeauty | last post by:
I write a function to rotate a matrix by 90 degrees clockwise, this function works on a matrix of specific size, for example, it rotates a 4*4...
8
by: Samuel Shulman | last post by:
Is it possible and how to rotate pictures in HTML document Thank you, Samuel
10
by: Joey_Stacks | last post by:
Does anyone know of a scipt that will rotate random div layers on page refresh? I have a primary content area front and center on my site...
8
by: Syoam4ka | last post by:
Hi, I have a WinApp in which I have a pictureBox. I can draw in it like in the paint of windows - I accomplish that with an arrayList of Points...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.