Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rewinding Through Records
Message
From
16/05/1998 10:12:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
16/05/1998 09:34:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00099920
Message ID:
00099924
Views:
25
>I'm looking for a way to 'rewind' through records using VCR buttons. The effect I want is to be able press and hold my 'Previous' button and the records displayed will step backwards at 3 or 4 per second. At the same time, a single click will take me back one record at a time. I have tried putting my rewinding code in the MouseDown event, but the button picture does not change state to appear pressed until all code in the MouseDown event is completed. I could draw normal and MouseDown bmps and change the This.picture value in the MouseDown and MouseUp events, but this isn't as elegant as it should be. Ideally, there needs to be a kind of WhileMouseDown event to do this correctly.
>Anyone have any samples or solutions to the button problem or the coding of the actualy rewinding process?
>
>Much obliged.
>
>DRE
In your prev and next buttons put something like this
* Prev.Mousedown event
if nButton = 1
  now = seconds()
  do while !bof() and mdown()
    if seconds() - now > 1
	skip -1
	thisform.refresh
* Update other nav buttons as necessary
	now = seconds()
    endif
  enddo
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform