Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Could someone try turning this code from VB into VFP.
Message
De
10/12/2000 18:31:09
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00451166
Message ID:
00451423
Vues:
31
>>I want to hide titlebar.
>>And, I want to move form by mouse.
>>How can I move form not use titlebar?
>Use a form mousemove to set left and top for the form

Im form, It's possable.
But, I want to move form by mouse drag other point over the form.

In VB,
=============================================
Start a new Standard EXE project. Form1 is added by default.


Set Form1's ControlBox, MinButton, and MaxButton properties to False, and then
clear its Caption.


Place a CommandButton control (Command1) on Form1.


Place the following code in the General Declarations section of Form1:
Private Declare Function SendMessage Lib "User32" _
Alias "SendMessageA" (ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long

Private Declare Sub ReleaseCapture Lib "User32" ()

Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2

Private Sub Form_Load()
Command1.Caption = "Exit"
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Dim lngReturnValue As Long

If Button = 1 Then
Call ReleaseCapture
lngReturnValue = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, _
HTCAPTION, 0&)
End If
End Sub

Private Sub Command1_Click()
End
End Sub
=============================================
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform