Hi all,

REALbasic 2006r3 Commercial Pro
Mac OS X 10.4.7

Why the code below always fire Else (Option-Key down or up) ?

BTW: I forgot to tell that the MouseCursor is changed when I press the OptionKey before moving the MouseCursor above the target Canvas (the only one on the window)... And, the MsgBox gives me the color below the EyeDropper... (I use an AppleWorks Palette saved as png file and dropped on the target Canvas).

EyeDropper is a Cursor resource.

Canvas.MouseEnter
  // Change the Canvas MouseCursor
  If Keyboard.AsyncOptionKey Then
    Me.MouseCursor = EyeDropper
  End If

Canvas.MouseDown
  Dim ChoosedColor As Variant

  If Me.MouseCursor = EyeDropper Then
    ChoosedColor = Me.Graphics.Pixel(x,y)
    MsgBox "[If] The selected Color is: " + ChoosedColor


  Else
    ChoosedColor = Me.Graphics.Pixel(x,y)
    MsgBox "[Else] The selected Color is: " + ChoosedColor
  End If

  Return True


Emile


Here's the hex contents of the EyeDropper MouseCursor

00 00 00 00 00 00 00 70 00 F8 03 F8 01 F8 03 F0
04 E0 0A A0 11 00 2A 00 44 00 48 00 70 00 00 00
00 00 00 00 00 00 00 70 00 F8 03 F8 01 F8 03 F0
07 E0 0F A0 1F 00 3E 00 7C 00 78 00 70 00 00 00
00 0E 00 01

Resource Type:  CURS
Resource ID:    4096
Resource Name:  EyeDropper
Resource Size:  68


Courtesy of ResFool, the Resource Editor "Made with REALbasic"
Thanks Brad

http://www.ljug.com/sw/resfool.html

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to