OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17-11-2011, 07:18
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 146
Default Close form by mouse moving

I would like close form window just by moving mouse cursor outside of frame. Can i make it by standard VBA operations or need use API calls or hooks ? May be need somehow to trace mouse positions from UserForm_MouseMove...
Reply With Quote
  #2  
Old 17-11-2011, 13:24
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Place all form controls inside of a frame that is almost the size of the form but a little smaller. Use the mouse move event to close the form.
The only trick needed would be to place the cursor inside the frame area when you start the form.

Code:
Private Sub UserForm_Initialize()
    'move mouse cursor to center of form....
End Sub

Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    Me.Hide
End Sub
~John
Attached Images
 
Reply With Quote
  #3  
Old 22-11-2011, 02:14
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 146
Default thank you

Hi
Thank you very much for your help. I was going to use API-GetCursorPos to track mouse, but your idea is better.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Argh! :) You export jpp/png and Draw X4 crops so close sometimes it cuts image fungel General 3 22-10-2010 05:13
Close Path Macro macrofan CorelDRAW/Corel DESIGNER VBA 14 12-12-2009 05:16
Best way to Close a form RobC CorelDRAW/Corel DESIGNER VBA 2 19-09-2009 02:30
cannot close combined shape jemmyell CorelDRAW/Corel DESIGNER VBA 5 27-07-2005 15:25
How to use close path in a VB routine? jconnor CorelDRAW/Corel DESIGNER VBA 1 02-04-2005 04:15


All times are GMT -5. The time now is 05:12.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com