|
-
Jun 3rd, 2001, 12:21 PM
#1
Thread Starter
Lively Member
two easy questions
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?
-
Jun 3rd, 2001, 12:39 PM
#2
Frenzied Member
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
-
Jun 3rd, 2001, 12:41 PM
#3
Lively Member
Code:
If cd.CancelError = False Then
MsgBox ("I'm pressed Cancel")
End If
'cd = Comman Dialoge
-
Jun 3rd, 2001, 12:49 PM
#4
Thread Starter
Lively Member
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.
-
Jun 3rd, 2001, 12:54 PM
#5
Addicted Member
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. ?????
-
Jun 3rd, 2001, 12:55 PM
#6
Lively Member
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.
-
Jun 3rd, 2001, 01:04 PM
#7
Thread Starter
Lively Member
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 visible
-
Jun 3rd, 2001, 01:06 PM
#8
Addicted Member
I tried it and now I can't get my cursor back in VB
-
Jun 3rd, 2001, 01:11 PM
#9
Addicted Member
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.
I had to save and restart VB to get it back.
Last edited by stevess; Jun 3rd, 2001 at 01:15 PM.
-
Jun 3rd, 2001, 01:39 PM
#10
Addicted Member
I can't get to work either, I can get to completely kill my cursor, never to return, or nothing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|