vb.net - Handling TreeView MouseMove event in separate thread -


{vb.net} trying handle mousemove event of treeview element in separate thread, don't know how , searching net did not lot.

 private sub tv_serverlist_mousemove(sender object, e mouseeventargs) handles tv_serverlist.mousemove     try          selnode = directcast(tv_serverlist.getnodeat(tv_serverlist.pointtoclient(cursor.position)), treenode)          dim screenheight integer = screen.primaryscreen.bounds.height - 220          if not oldnode.name = selnode.name             frm.startposition = formstartposition.manual             dim cursor_x = system.windows.forms.cursor.position.x - 800             dim cursor_y = system.windows.forms.cursor.position.y - 10             if cursor_y > screenheight                 cursor_y = screenheight             end if             frm.location = new point(cursor_x, cursor_y)             try                   frm.change()              catch ex exception              end try             frm.show()             oldnode = selnode          elseif oldnode.name = ""             frm.startposition = formstartposition.manual             dim cursor_x = system.windows.forms.cursor.position.x - 800             dim cursor_y = system.windows.forms.cursor.position.y - 10             frm.location = new point(cursor_x, cursor_y)             try                  frm.change()              catch ex exception              end try             frm.show()             oldnode = selnode         else             frm.startposition = formstartposition.manual             dim cursor_x = system.windows.forms.cursor.position.x - 800             dim cursor_y = system.windows.forms.cursor.position.y - 10             frm.location = new point(cursor_x, cursor_y)              oldnode = selnode         end if      catch ex exception         frm.hide()     end try   end sub 

i wish put code separate thread execution. starting new thread inside private sub tv_serverlist_mousemove(sender object, e mouseeventargs) handles tv_serverlist.mousemove not option. wish start @ beginning when form1 loaded.

thx help.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -