🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #1445

Il parametro Shift di KeyDown e KeyUp

#1445
From: (�`�.�Massy�.���)
Date: Thu, 29 Apr 2004 14:03
34 lines
1653 bytes
Sul mio manuale fa un esempio di codice per estrarre informazioni dal
partametro "Shift", ricevuto dagli eventi KeyDown e KeyUp (cio� per vedere
se � stato premuto ctrl, alt o maiusc):
Private SubText1_KeyDown(KeyCode As Integer, Shift As Integer)

If Shift And vbShiftMask Then

Print "Maiusc premuto"

End If

If Shift And vbCtrlMask Then

Print "Ctrl premuto"

End If

If Shift And vbAltMask Then

Print "Alt premuto"

End If

' ...

End Sub



Ora ho visto che il codice funziona anche sostituendo "=" ad "And" nelle
varie istruzioni if.

Volevo sapere qual'� la differenza o se sia con = che con and le due
istruzioni sono equivalenti.
Technical Details
Message-ID: <MW7kc.28857$Qc.1109278@twister1.libero.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!ecngs!feeder.ecngs.de!x-privat.org!inn1.libero.it!twister1.libero.it.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII
X-Google-Thread: f94ee,4cdf350303981dd6,start
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2004-04-29 07:03:25 PST
From: "\(�`�.�Massy�.���\)" <massimiliano_2000@libero.it>
Newsgroups: free.it.visual-basic
Subject: Il parametro Shift di KeyDown e KeyUp
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <MW7kc.28857$Qc.1109278@twister1.libero.it>
Date: Thu, 29 Apr 2004 14:03:24 GMT
NNTP-Posting-Host: 151.38.51.249
X-Complaints-To: abuse@net24.it
X-Trace: twister1.libero.it 1083247404 151.38.51.249 (Thu, 29 Apr 2004 16:03:24 MET DST)
NNTP-Posting-Date: Thu, 29 Apr 2004 16:03:24 MET DST
Organization: [Infostrada]
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!ecngs!feeder.ecngs.de!x-privat.org!inn1.libero.it!twister1.libero.it.POSTED!not-for-mail