Let's say you make a DLL, and you have a small bit of code like so:
This code will not work when an app calls it. The button will become disabled, but the hourglass will not appear.Code:Public Sub BusyProgram(cmdButton As Object) On Error Resume Next cmdButton.Enabled = False Screen.MousePointer = vbHourglass DoEvents End Sub
I know why. It's beause the DLL doesn't know what form/application it's supposed to make busy.
So how do i get a DLL to turn my cursor into an hourglass? I guess i need some tricks with the form name and/or the hwnd.
PS: Edneeis and I have already determined that it will work if you call the class from within the same project, so you need to have two different projects running in order to test this correctly.




Reply With Quote