If it makes any difference, I’m using the version that comes with Visual Studio 2010.
This should be easy I think. As you may already know, the PerformClick method raises a click event, but it doesn’t show the button pushing down and back up again. I’m sure there must be code to simulate a button being clicked by the mouse. If so, what is it?
You can make a button looked like it is being pressed by sending it the BM_SETSTATE message. You send it twice: once with the wParam set to TRUE to make the button look pushed and again with the wParam set to FALSE to return it to normal. Pause for however long you want to in between.
I left out a lot of the details. You need to send BM_SETSTATE to the button using the SendMessage API. I’m not familiar with the latest VB stuff, but in the past you would declare a private function and declare a constant for the message you want to send. I believe that the window handle (hwnd) you need is a property of the button. So the code would look something like this (again, this is from my recollection of how VB worked in the past. It may differ somewhat now):
Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Something like that, anyway. I’m sure what I have above isn’t exactly right. You should be able to find many examples of people using SendMessage in the current version of VB to model your code from.