Coder X
7/10/2012 2:06:00 AM
I see you are still asking for others to write your code for you. Have you
ever, once, actually tried writing your own code, even if it means days of
trial and error? Since I've never seen you post any, I'm guessing not.
And shame on the rest of you for enabling this kid. In the old days, we
used to ask folks to show the code they wrote so we could look at it,
instead of handing it to them.
::shakes head::
"BeeJ" <nospam@spamnot.com> wrote in message
news:jtfm8k$s1f$1@speranza.aioe.org...
> Deanna Earley submitted this idea :
>> On 08/07/2012 17:26, BeeJ wrote:
>>> I am dragging a file from Windows Explorer to my VB6 app and want the
>>> mouse icon to reflect what my VB6 app will do when the mouse is over my
>>> app and over my app drop spot (a Picturebox or Image):
>>> The mouse icon state is dependent on the state of SHIFT as well.
>>> i.e.
>>> no shift or over a non-drop area = illegal
>>> Ctrl = OK with one type of mouse icon
>>> Ctrl-Shift = OK with a different type of mouse icon
>>>
>>> How do I change the mouse icon for this operation?
>>> I googled and found nothing.
>>> I tried doing the work in imgIcon_OLEDragOver and it changed the icon
>>> after not during.
>>
>> You set the value of Effect to specify what you want it to do/allow.
>> Windows will then change the cursor to suit.
>>
>> Private Sub FeedList_OLEDragOver(Data As ComctlLib.DataObject, Effect As
>> Long, Button As Integer, Shift As Integer, X As Single, Y As Single,
>> State As Integer)
>> Dim Item As Node
>>
>> 'Default to none
>> Effect = vbDropEffectNone
>>
>> 'Get the highlighted item
>> Set Item = FeedList.HitTest(X, Y)
>>
>> 'Only the group items are drop targets
>> If ItemType(Item) = "group" Then
>> 'We're only interested in the local feeds
>> If Data.GetFormat(CF_CONSOLEFEED) Then
>> Effect = IIf(Shift And vbShiftMask, vbDropEffectMove, 0) Or
>> IIf(Shift And vbCtrlMask, vbDropEffectCopy, 0)
>> 'Allow a default action dependant on the source group
>> Effect = Effect Or IIf(ParentGroupID = "groupall",
>> vbDropEffectCopy, vbDropEffectMove)
>> End If
>> End If
>> End Sub
>
> Also, I see that this code only works if the Shift, Ctrl or Alt keys are
> NOT used. Shift and Ctrl override the Effect returned thus nullifying the
> desired visual.
>
> --
> Present and unaccounted for.
>
>