Kamis, 20 Juli 2017

Re: [MS_AccessPros] Re: Dragging borderless form

 

I have added code to one of my databases to drag a form from anywhere within
it.
(Access 2003).

I declared public variables for the form:
Public Xo as Single, Yo as Single.

On the Detail part of the form I added two event procedures:
On Mouse Down, On Mouse Move.

Private Sub Detail_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If Button = 1 Then 'Ignore unless left button pressed.
Xo = X 'Get initial coordinates with respect to the top left corner of the
form
Yo = Y
End If
End Sub

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If Button = 1 Then 'Ignore unless left button pressed.
Move (Me.WindowLeft + X - Xo), (Me.WindowTop + Y - Yo)
'Move window while keeping cursor in same position relative to window.
End If
End Sub

Regards,
Dave W

----- Original Message -----
From: Kambiz Afshartous kenaf42@yahoo.com [MS_Access_Professionals]
To: MS_Access_Professionals@yahoogroups.com
Sent: Wednesday, July 19, 2017 4:56 PM
Subject: Re: [MS_AccessPros] Re: Dragging borderless form

Thank you Andrew, please do find it.

Kambiz

From: "yahoo@craven.de [MS_Access_Professionals]"
<MS_Access_Professionals@yahoogroups.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Tuesday, July 18, 2017 3:38 PM
Subject: [MS_AccessPros] Re: Dragging borderless form

With a bit of programming, yes, you can make a borderless form move around
per mouse drag-and-drop. I'm fairly sure I found the code somewhere. I'll
try to find it again.

Yours,
Andrew

__._,_.___

Posted by: "Dave Williams" <davewillgmale@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (12)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar