Mouse move error handling

Cereldine

Registered User.
Local time
Today, 22:28
Joined
Aug 4, 2005
Messages
71
Hi, i have inherited a database to do some development on. the previous developer had written some code in to it that works when the mouse moves over the detail or particular buttons, an example is below.

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.modify_property_btn.Visible = True Or Me.new_applicant_btn.Visible = True Or Me.modify_scheme_btn.Visible = True Then
hide_menu_btns
End If
rollovers.reset_all_btns
End Sub

code actions like these are throughout the database, they work fine until an error occurs, i have some error handling to handle other common errors, once these errors are handled it results on further errors based on these mouse movement actions. The only way to get rid of them is to close the particular form im working on at that time.

My question is, how can i put some error handling in that stops these constant frustrating mouse move errors?
 
put in the function/procedure on error resume next? :) its sloppy, but at least it means you wont be bothered by them until you have a chance to sort them out properly.
 
unfortunatly error resume causes it to loop back to the beginning and restart when you move the mouse again!!!
any ideas
 
AFAIK there is no subsitute for error handling in *every* procedure. The code you posted seems to have function calls that are not returning anything. That works but you might try converting them to Sub's and using Call to eliminate the stack problem. You might also try Error Handling code in the Form OnError event but I don't think that will work. I imagine that you are aware that unhandled errors cause variables to loose their value.
 

Users who are viewing this thread

Back
Top Bottom