I created this class because every year at school we have graduation day and on the screen in the auditorium I had to display all the sponsors who help us organize the event every year. With this class I can do it easily without resorting to existing applications on the market.

The TScrollImg class is a custom control for FiveWin/Harbour that allows you to create a scrollable image gallery (banner) inside a Windows application. Images can be associated with URLs, allowing users to open websites with a click. The control is designed to be fluid, without flickering, and supports flexible configurations to adapt to different needs.
Main Features
- Image scrolling: Images scroll horizontally (left or right) with a configurable speed.
URL association: Each image can have an associated URL, which opens in the default browser with a click.
Visual feedback: The cursor becomes a hand when it passes over an image with a valid URL.
Customization: Supports background colors, borders, sizes and scroll modes.
Backwards compatibility: Works with simple image arrays (without URLs) or with associated URLs.
Optimization: Use double buffering to eliminate flickering during animation
Configure the aBanners Array
The aBanners array defines the images to display. It can be in 3 formats:
Simple (images only):
LOCAL aBanners := {"Bosch.png", "Brother.png", "Canon.png"}
In this case, the images scroll but are not clickable (no URL associated).
With URLs (images and links):
LOCAL aBanners := {{"Bosch.png", "www.bosch.it"}, {"Brother.png", "www.brother.it"}}
The images are clickable, and a click opens the URL in the browser.
With codeblock (images and codeblock):
local aBanners := { ;
{ "Bosch.png", "www.bosch.it", .F. },;
{ "Brother.png", "www.brother.it", .F. },;
{ "Canon.png", {|| MsgInfo("select one category") }, .T. }}
The images are clickable, and a click eval the codeblock . w
We could then create a scroll of images of the categories and open an xbrowse with the products of that category
User Interaction
Scrolling: The images scroll automatically based on nMode and nSpeed.
Cursor: When the mouse hovers over an image with a URL, the cursor changes to a hand, indicating that it is clickable.
Click: Clicking an image with a URL opens the associated website in the default browser. or run a codeblock
the animation starts automatically but by means of a button you can change the direction, the speed, the space between the images
Usage
Code: Select all | Expand
@ 10, 10 SCROLLIMG oScroll ;
PATH cImagePath ;
BANNERS aBanners ;
SPEED 2 ;
MODE 1 ;
SIZE 300, 30 ;
BORDER ;
COLORBORDER nRGB(150,150,150) ;
OF oDlg
I will send to Antonio.