Results 1 to 10 of 10

Thread: two easy questions

  1. #1

    Thread Starter
    Lively Member Optic's Avatar
    Join Date
    Mar 2001
    Location
    I'm everywhere and nowhere, I'm inside your computer and inside your mind. You can't escape me for I am vision.
    Posts
    117

    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?

  2. #2
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    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

  3. #3
    Lively Member VB7's Avatar
    Join Date
    Jan 2001
    Posts
    86
    Code:
    If cd.CancelError = False Then
    MsgBox ("I'm pressed Cancel")
    End If
    'cd = Comman Dialoge

  4. #4

    Thread Starter
    Lively Member Optic's Avatar
    Join Date
    Mar 2001
    Location
    I'm everywhere and nowhere, I'm inside your computer and inside your mind. You can't escape me for I am vision.
    Posts
    117
    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.

  5. #5
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    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. ?????

  6. #6
    Lively Member VB7's Avatar
    Join Date
    Jan 2001
    Posts
    86
    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.

  7. #7

    Thread Starter
    Lively Member Optic's Avatar
    Join Date
    Mar 2001
    Location
    I'm everywhere and nowhere, I'm inside your computer and inside your mind. You can't escape me for I am vision.
    Posts
    117
    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

  8. #8
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    I tried it and now I can't get my cursor back in VB

  9. #9
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    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.

  10. #10
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    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
  •  



Click Here to Expand Forum to Full Width