|
-
Apr 6th, 2000, 07:16 PM
#1
Thread Starter
New Member
1. How can I see if a form has been moved?
Resize doesn't help.
2. How can I make a form act like a dialogbox as msgbox?
-
Apr 6th, 2000, 08:23 PM
#2
Junior Member
Hmm...
An answer to your first question:
Code:
' Create a timer and call it "CheckForm"
' Then plug this in
'In General Declarations
Dim FormX, FormY As Double
Private Sub Form_Load()
FormX = YourForm.Left
FormY = YourForm.Top
CheckForm.Enabled = True
CheckForm.Interval = 200
End Sub
Private Sub CheckForm_Timer()
If YourForm.Left <> FormX Then
YourForm.Left = FormX
End If
If YourForm.Top <> FormY Then
YourForm.Top = FormY
End If
End Sub
That resets the forms position every time you move it.
-
Apr 6th, 2000, 10:07 PM
#3
Junior Member
In regards to your second question, if I understand it you want to use a form to present info in a message box style.
One way to do this is to create a form with the info you want and the size you want and change its border style to 4-FixedToolWindow which means that it can't be resized and gives it the look of a message box. When you want it to show, use the vbModal command so that the user can't flick between forms until he has acknowledged the message-form, e.g.
frmMessage.Show vbModal
Hope this helps
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|