🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Eventi tastiera

#3388
From: Roscio
Date: Wed, 10 Jul 2002 11:17
35 lines
1834 bytes
"track" <C-G-S@libero.it> wrote in message
news:BHBW8.15415$7N3.340069@twister2.libero.it...

> Ciao ,
> avrei bisogno di un aiuto, sto creando un gioco, e dovrei spostare una
> immagine a destra e a sinistra (premendo il tasto "z" a sinistra, e
premendo
> il tasto "c" a destra).

 Private Sub Form_KeyPress(KeyAscii As Integer)

    keyc = 99
    keyz = 122

    Select Case KeyAscii

        Case keyc
            img1.Left = img1.Left + 5

        Case keyz
            img1.Left = img1.Left - 5

        Case Else

    End Select

End Sub


A questo dovresti aggiungere un controllo per vedere se
l'immagine esce dallo schermo o dall'area di gioco, sia
a destra che a sinistra.

--
Er Roscio.
Technical Details
Message-ID: <AJUW8.19292$7N3.431357@twister2.libero.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!mtu.ru!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail
References: <BHBW8.15415$7N3.340069@twister2.libero.it>

Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII-7-bit
X-Google-Thread: f94ee,d6ae68c2795a41cb
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2002-07-10 06:15:24 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!mtu.ru!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail
From: "Roscio" <sergint@libero.it>
Newsgroups: free.it.visual-basic
References: <BHBW8.15415$7N3.340069@twister2.libero.it>
Subject: Re: Eventi tastiera
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Message-ID: <AJUW8.19292$7N3.431357@twister2.libero.it>
Date: Wed, 10 Jul 2002 11:17:52 GMT
NNTP-Posting-Host: 151.29.34.139
X-Complaints-To: abuse@libero.it
X-Trace: twister2.libero.it 1026299872 151.29.34.139 (Wed, 10 Jul 2002 13:17:52 MET DST)
NNTP-Posting-Date: Wed, 10 Jul 2002 13:17:52 MET DST
Organization: [Infostrada]