?? 顏色控制.htm
字號:
style="FONT-FAMILY: 楷體">圖形</SPAN>中用頂層<B
style="mso-bidi-font-weight: normal"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">Line</SPAN></B>菜單建立菜單條,該菜單分別含有三個子菜單:<B
style="mso-bidi-font-weight: normal"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">Line Style</SPAN>,</B><B
style="mso-bidi-font-weight: normal"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">Line Width</SPAN>,</B><B
style="mso-bidi-font-weight: normal"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">Line Color</SPAN></B>。<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="VERTICAL-ALIGN: bottom"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">function
mmenus()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">%<SPAN
style="mso-spacerun: yes"> </SPAN>MMENUS Simple menu
example.<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">%<SPAN
style="mso-spacerun: yes"> </SPAN>MMENUS uses waitforbuttonpress and gco
in callback strings<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">%<SPAN
style="mso-spacerun: yes"> </SPAN>to let the user make a menu selection
and then select an object<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">%<SPAN
style="mso-spacerun: yes"> </SPAN>by clicking on it with the mouse. The
callback strings then use<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">%<SPAN
style="mso-spacerun: yes"> </SPAN>the set function to apply the property
value to the selected<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">%<SPAN
style="mso-spacerun: yes"> </SPAN>object.<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">%<SPAN
style="mso-spacerun: yes"> </SPAN>Copyright (c) 1996 by
Prentice-Hall</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">Inc.<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">Hm_line<SPAN
style="mso-spacerun: yes"> </SPAN>=<SPAN style="mso-spacerun: yes">
</SPAN>uimenu(gcf</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' label ' . ' Line ' )</SPAN>;<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">Hm_lstyle<SPAN
style="mso-spacerun: yes"> </SPAN>=<SPAN style="mso-spacerun: yes">
</SPAN>uimenu(Hm_line</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' label ' </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' Line Style ' )</SPAN>;<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">Hm_lwidth<SPAN
style="mso-spacerun: yes"> </SPAN>=<SPAN style="mso-spacerun: yes">
</SPAN>uimenu(Hm_line</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' label ' </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' Line width ' )</SPAN>;<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">Hm_lcolor<SPAN
style="mso-spacerun: yes"> </SPAN>=<SPAN style="mso-spacerun: yes">
</SPAN>uimenu(Hm_ ' label</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' Line Color ' )</SPAN>;<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="VERTICAL-ALIGN: bottom"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="VERTICAL-ALIGN: bottom">其次,使用<B
style="mso-bidi-font-weight: normal"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">waitforbuttonpress</SPAN></B>和<B
style="mso-bidi-font-weight: normal"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">gco</SPAN></B>得到當前對象的句柄,確認它為一個<SPAN
style="FONT-FAMILY: 楷體">線</SPAN>對象,并采用適當的<B
style="mso-bidi-font-weight: normal"><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' Linestyle '
</SPAN></B>值。注意這些菜單項句柄以后不再使用,所以它們不必保存。<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">uimenu(Hm_lstyle</SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"> ' Label ' </SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">Solid ' </SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' CallBack ' </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">( ' waitforbuttonpress</SPAN>;<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"> ' </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' if get(gco</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">''type'')==''line''</SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"> ' ...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' set(gco</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">''LineStyle''</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">''-'')</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' ...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' end ' ])</SPAN>;<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">uimenu(Hm_lstyle</SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"> ' Label ' </SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">Dotted ' </SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' Callback ' </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">[ ' waitforbuttonpress</SPAN>;<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"> ' </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' if get(gco</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">''Type'')==''line''</SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"> ' </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' set(gco </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">''LineStyle''</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">''</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">''</SPAN>:<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">'')</SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"> ' ...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' end ' ])</SPAN>;<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">uimenu(Hm_lstyle</SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"> ' Label ' </SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">Dashed ' </SPAN>,<SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'">...<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 42.55pt; VERTICAL-ALIGN: bottom; tab-stops: 35.45pt"><SPAN
lang=EN-US style="FONT-FAMILY: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>' Callback ' </SPAN>,<SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'">[ ' waitforbuttonpress</SPAN>;<SPAN
lang=EN-US style="FONT-FAMILY: 'Times N
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -