Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Change the Cursor (Read 3140 times)
andrewsando1973
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Feb 14th, 2010
Change the Cursor
Mar 4th, 2010 at 12:55pm
Print Post  
1- How can i change the mouse pointer during drawing, i mean how can i keep the mouse pointer as a Thin Cross (like in MS Word) while drawing a box and then return back to normal after creating that box?

2- Is there any reference for the new features in the new release of FlowChartX (4.3)?

3- How can i add a ruler, so that the user can now exactly the size of the box he is drawing? or do you recommend certain ActiveX Control i can buy to do this function (ruler)?

Thanks in Advance
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Change the Cursor
Reply #1 - Mar 4th, 2010 at 1:20pm
Print Post  
1. You can use the SetMouseCursor method. It is used to specify cursors for the different contexts while moving or dragging the mouse. There's also an undocumented mcCurrent member that lets you set a 'current' cursor permanently, until you call it again with a 0 value to revert to the context-sensitive cursors.

2. You can find it here if you don't wish to install the full package -
https://mindfusion.eu/_temp/FlowChartX.zip

3. There's no built-in ruler. You could implement a simple ruler using two Table objects to represent the ruler scales, and possibly move them in response to the Scroll event so they stay aligned to the top-left of the visible area.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
andrewsando1973
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Feb 14th, 2010
Re: Change the Cursor
Reply #2 - Mar 10th, 2010 at 6:51pm
Print Post  
1- I tried using the SetMouseCursor but it gives strange results !!!
can you give me any simple example to change the cursor to a Cross using mcCurrent then back again.

2- The link you posted for the new features documentation is broken, can you check it please?

Sorry for any inconvenience.
Andrew
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Change the Cursor
Reply #3 - Mar 11th, 2010 at 9:42am
Print Post  
2. Should work again now.

1. Try the following:

Code
Select All
Private Sub fcx_MouseDown(ByVal button As FLOWCHARTLibCtl.EMouseButton, ByVal keys As Integer, ByVal docX As Long, ByVal docY As Long)
	fcx.SetMouseCursor mcCurrent, Tools.LoadCursor(0, Tools.IDC_CROSS), False
End Sub

Private Sub fcx_MouseUp(ByVal button As FLOWCHARTLibCtl.EMouseButton, ByVal keys As Integer, ByVal docX As Long, ByVal docY As Long)
	fcx.SetMouseCursor mcCurrent, 0, False
End Sub 



Where the Tools module defines

Code
Select All
Public Declare Function LoadCursor Lib "user32.dll" Alias _
	"LoadCursorA" (ByVal hInstance As Long, ByVal _
	lpCursorName As Long) As Long

Public Const IDC_CROSS = 32515 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint