📄 cwp1023.htm
字号:
<!-- saved from url=(0007)http:// -->
<HTML><HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>WJ.MPR.Util.ControlInvoker</TITLE><LINK REL=STYLESHEET HREF="../CommentReport.css" TYPE="text/css"></HEAD><BODY topmargin=0 rightmargin=0 leftmargin=0 style="background-image: url(../titletile.jpg); background-repeat:repeat-x; background-position: 0 0;" ><DIV CLASS="PageHeading">WJ.MPR.Util.ControlInvoker Class</DIV><DIV CLASS="Description">
Control.Invoke allows a method to be invoked on the same thread as the one
the control was created on. Unlike in the full .NET Framework, the .NET
Compact Framework does not support the Control.Invoke overload for passing an
array of objects to pass as arguments. This ControlInvoker class overcomes
this limitation.
<P></DIV><IMG src="../GradLeft.jpg" width=7 height=378 alt="" border="0" style="position:absolute; left:10; top:18;z-Index:2"><IMG src="../GradTop.jpg" width=352 height=7 alt="" border="0" align="top" style="position:absolute; left:10; top:18; z-index:1"><DIV CLASS="Remarks"><SPAN CLASS="RemarkHdrX">Access: </SPAN>Public</DIV><DIV CLASS="Remarks"><SPAN CLASS="RemarkHdrX">Base Classes: </SPAN>Object</DIV><TABLE CLASS="InfoTable" cellpadding=0 cellspacing=0><TR height=20><TD width=20> </TD><TD valign=top align=left width=9 bgcolor="#cccc66"><IMG SRC="../graycorner.jpg" align=top></TD><TD CLASS="TableLightLabel" WIDTH=206>Members</TD><TD CLASS="TableLightLabel" >Description</TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1024.HTM" TARGET="CNTFRAME">MethodCaller</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1026.HTM" TARGET="CNTFRAME">MethodCall</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1031.HTM" TARGET="CNTFRAME">MethodCallNoArgs</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1035.HTM" TARGET="CNTFRAME">control</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1036.HTM" TARGET="CNTFRAME">argumentInvokeList</A></TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1037.HTM" TARGET="CNTFRAME">ControlInvoker</A></TD><TD CLASS="TableLightDesc">
The constructor typically takes a form
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1038.HTM" TARGET="CNTFRAME">Invoke</A></TD><TD CLASS="TableLightDesc">
The delegate wrapping the method and its arguments
to be called on the same thread as the control.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1039.HTM" TARGET="CNTFRAME">Invoke</A></TD><TD CLASS="TableLightDesc">
The delegate wrapping a method that takes no arguments
to be called on the same thread as the control.
<P></TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP1040.HTM" TARGET="CNTFRAME">ControlInvoke</A></TD><TD CLASS="TableLightDesc">
CF Invoke only works with EventHandler delegates, so this is the method
that actually will be Invoked on the UI Thread.
<P></TD><TD width=20> </TD></TR></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -