I have two simple questions (I think).
1. how do you check if a user clicks the cancel bottom in a common dialog control?
2. How can you make the mouse cursor not appear over a certain control?
Printable View
I have two simple questions (I think).
1. how do you check if a user clicks the cancel bottom in a common dialog control?
2. How can you make the mouse cursor not appear over a certain control?
First Question. It's something like that. I am pretty sure there is a better way i have seen it. Second question is a good question, but i have no clue. I cannot find a const for it.
Code:Private Sub Command1_Click()
CommonDialog1.ShowOpen
If CommonDialog1.FileName = "" Then
CommonDialog1.CancelError = True
Else
CommonDialog1.CancelError = False
End If
MsgBox CommonDialog1.CancelError
End Sub
Code:If cd.CancelError = False Then
MsgBox ("I'm pressed Cancel")
End If
'cd = Comman Dialoge
thanx I thought it was something with the cancelerror but I just couldn't figure out how to use it right. Now I just need to know how to get the mouse to dissappear.
jj,
Let me guess, you have tried vbInvisible and vbHidden and they didn't work. Same here. But.......I also tried vbHourGlass and that didn't work either. ?????
Code:Option Explicit
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Sub Command1_Click()
ShowCursor (0)
End Sub
'1 = appear
'0 = disapp.
I tried this and the cursor was still visibleQuote:
Option Explicit
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Sub Command1_Click()
ShowCursor (0)
End Sub
'1 = appear
'0 = disapp.
I tried it and now I can't get my cursor back in VB
lol
That was damn near sabotage. Once you execute the line to hide the cursor in VB you can't get it back, even if you execute it again with (1).
I was forced to function without a mouse for a minute and I was almost lost.:p
I had to save and restart VB to get it back.
I can't get to work either, I can get to completely kill my cursor, never to return, or nothing.