🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: mouse down fisso

#40
From: Tiscali
Date: Tue, 30 Dec 2008 14:02
34 lines
1928 bytes
EffeEmme ha scritto...
> Devo muovere con continuit� un cursore tenendo  il tasto sinistro del 
> mouse
> costantemente premuto.
> Ho provato con la funzione mousedown, ma questa viene rilevata solo una
> volta.
> Devo usare un timer e controllare periodicamente lo stato del mouse?
> Non c'� una funzione nativa apposita?

Dim isDown As Boolean

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, 
Y As Single)
    If Button = vbLeftButton Then isDown = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, 
Y As Single)
    If isDown Then
        Do: DoEvents
            'Quello che vuoi
        Loop Until Not isDown
    End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y 
As Single)
    If Button = vbLeftButton Then isDown = False
End Sub


-- 
Ciao Fede

By Chicco Production
http://bcp.freetools.it
Technical Details
Message-ID: <495a2a09$0$11377$5fc30a8@news.tiscali.it>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news2!feeder.erje.net!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!draco.tiscalinet.it!news-f2.tiscali.it!not-for-mail
References: <49553e85$0$1116$4fafbaef@reader3.news.tin.it>

Show Full Headers
Complete Article Headers
X-Google-Thread: f94ee,83ae0ddddeb88b86
X-Google-Attributes: gidf94ee,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news2!feeder.erje.net!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!draco.tiscalinet.it!news-f2.tiscali.it!not-for-mail
From: "Tiscali" <melis.federico126@tiscali.it>
Newsgroups: free.it.visual-basic
References: <49553e85$0$1116$4fafbaef@reader3.news.tin.it>
Subject: Re: mouse down fisso
Date: Tue, 30 Dec 2008 15:02:56 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Lines: 36
Message-ID: <495a2a09$0$11377$5fc30a8@news.tiscali.it>
Organization: Tiscali SpA
NNTP-Posting-Host: 78.15.90.233
X-Trace: 1230645769 news.tiscali.it 11377 78.15.90.233:3662
X-Complaints-To: abuse@tiscali.it