CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Posts
    1

    How to disable PrintScreen Key in VB

    I'am building an application in VB6.0.I know how to use API's in VB. I don't want the users of my application to take a PrintScreen of my form, so how can I acheive it in VB.

    Thank you,
    Sudhi


  2. #2
    Join Date
    Aug 2001
    Posts
    14

    Re: How to disable PrintScreen Key in VB

    The VB I worked with didn't really let you (even though it was supposed too -- a bug with VB stopped it from working), but if you can figure out what ASCII key number that is, you can go into the frmNAME_KeyPress selection, and say something similar to this:

    If (KeyAscii = ##) Then
    Do what you want it to do instead

    That's supposed to work (works best in text boxes, where you don't want the user hitting certain letters -- but for some reason it didn't work with my works VB).

    -Picky


  3. #3
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: How to disable PrintScreen Key in VB

    Merrion certainly has a way out with a keyboard hook. But here's a simpler workaround. Not a neat solution though.


    private Sub Form_Load()
    Timer1.Interval = 500
    End Sub

    private Sub Timer1_Timer()
    Clipboard.Clear
    End Sub





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

Featured