From: yxq on
There is a article about JumpLists for Windows 7.

http://blogs.windowsclient.net/sergeyzwezdin/archive/2009/06/01/windows-7-programming-taskbar-part-10-final-part-jumplists.aspx

What meaning about the C# code below, how to convert to VB.NET? Thank you.
////////////////////////////////////////////////////////////////////////////
_jumpListManager.UserRemovedItems += (o, e) =>
{
e.CancelCurrentOperation = false;
};
/////////////////////////////////////////////////////////////////////////////

The source code link is below
http://blogs.windowsclient.net/blogs/sergeyzwezdin/TaskbarJumpLists_15F1C86E.zip


From: Tom Shelton on
On 2009-11-10, yxq <gayxq(a)163.net> wrote:
> There is a article about JumpLists for Windows 7.
>
> http://blogs.windowsclient.net/sergeyzwezdin/archive/2009/06/01/windows-7-programming-taskbar-part-10-final-part-jumplists.aspx
>
> What meaning about the C# code below, how to convert to VB.NET? Thank you.
> ////////////////////////////////////////////////////////////////////////////
> _jumpListManager.UserRemovedItems += (o, e) =>
> {
> e.CancelCurrentOperation = false;
> };
> /////////////////////////////////////////////////////////////////////////////
>
> The source code link is below
> http://blogs.windowsclient.net/blogs/sergeyzwezdin/TaskbarJumpLists_15F1C86E.zip
>
>

The code above is using assigning a lambda function to an event. There is no
direct equivalent in the current VB. You would have to write the code like
this:

AddHandler _jumpListManager.UserRemoveItems, AddressOf RemoveItems


Private Sub RemoveItems (ByVal sender As Object, ByVal e As WhatEverEventArgType)
e.CancelCurrentOperation = False
End Sub

--
Tom Shelton
From: yxq on
Thank you for your help, you are right!!!

"Tom Shelton" <tom_shelton(a)comcastXXXXXXX.net> д����Ϣ����:uffLuhgYKHA.2172(a)TK2MSFTNGP06.phx.gbl...
> On 2009-11-10, yxq <gayxq(a)163.net> wrote:
>> There is a article about JumpLists for Windows 7.
>>
>> http://blogs.windowsclient.net/sergeyzwezdin/archive/2009/06/01/windows-7-programming-taskbar-part-10-final-part-jumplists.aspx
>>
>> What meaning about the C# code below, how to convert to VB.NET? Thank
>> you.
>> ////////////////////////////////////////////////////////////////////////////
>> _jumpListManager.UserRemovedItems += (o, e) =>
>> {
>> e.CancelCurrentOperation = false;
>> };
>> /////////////////////////////////////////////////////////////////////////////
>>
>> The source code link is below
>> http://blogs.windowsclient.net/blogs/sergeyzwezdin/TaskbarJumpLists_15F1C86E.zip
>>
>>
>
> The code above is using assigning a lambda function to an event. There is
> no
> direct equivalent in the current VB. You would have to write the code
> like
> this:
>
> AddHandler _jumpListManager.UserRemoveItems, AddressOf RemoveItems
>
>
> Private Sub RemoveItems (ByVal sender As Object, ByVal e As
> WhatEverEventArgType)
> e.CancelCurrentOperation = False
> End Sub
>
> --
> Tom Shelton