[求助]关于pb的一些程序
<p>想请问pb程序中如果想实现菜单里有剪切、复制、粘贴,代码是什么?</p><p>还有如何能实现用户的权限控制,就是指怎样使不同的用户登录,能使用的功能做到不同呢?</p> <p>剪切、复制、粘贴就是对剪贴板的操作</p>
<p>剪切就是复制后删除</p>
<p>PB的函数</p>
<p>ClipBorad</p>
<p>功能:提取或替换Windows系统剪贴板的文件内容</p>
<p>语法:Clipborad({string})</p>
<p>参数:string类型,可选项,指定要复制到系统剪贴板上的文本。如果剪贴板上已有内容的话,该文本将取代剪贴板的当前内容</p>
<p>返回值:string,函数执行成功的话,如果 剪贴板上包含文本数据,那么函数返回剪贴板的当前内容;如果剪贴板上包含非文件数据(比如位图)或不包含任何数据,那么函数返回空字符串("")</p> <p>这是PB里的原文件:</p>
<p> </p>
<p><font face="Verdana">Description <br/>Retrieves or replaces the contents of the system clipboard with text.<br/>Syntax </font></p>
<p><font face="Verdana">Clipboard ( { string } )<br/>Argument Description<br/>string (optional) A string whose value is the text you want to place in the clipboard. The string replaces the current contents of the clipboard, if any<br/>Return value <br/>String. Returns the current contents of the clipboard if the clipboard contains text. If string is specified, Clipboard returns the current contents and replaces it with string.<br/>Returns the empty string ("") if the clipboard is empty or it contains nontext data, such as a bitmap. If string is specified, the nontext data is replaced with string. If string is NULL, Clipboard returns NULL.<br/>Usage <br/>You can use Syntax 1 with the Paste, Replace, or ReplaceText function to insert the clipboard contents in an editable control or StaticText control.</font></p>
<p><font face="Verdana">Calling Clipboard in a DataWIndow control or DataStore object <br/>To retrieve or replace the contents of the system clipboard with text from a DataWindow column, you must call Clipboard using the pronoun Super:: as follows:</font></p>
<p><font face="Verdana">Super::Clipboard("Employee Data")</font></p>
<p><font face="Verdana">The Super pronoun points to the system function version of the Clipboard function instead of using the DataWindow version. The DataWindow version of Clipboard, documented in Syntax 2, is only applicable to graphs. </font></p> <p>这是PB里的示例代码:</p>
<p> </p>
<p><font face="Verdana">These statements put the contents of the clipboard in the variable ls_CoName:</font></p>
<p><font face="Verdana">string ls_CoName</font></p>
<p><font face="Verdana">ls_CoName = Clipboard()</font></p>
<p><font face="Verdana">The following statements place the contents of the clipboard in Heading, and then replace the contents of the clipboard with the string Employee Data:</font></p>
<p><font face="Verdana">string Heading</font></p>
<p><font face="Verdana">Heading = Clipboard("Employee Data")</font></p>
<p><font face="Verdana">The following statement replaces the selected text in the MultiLineEdit mle_terms with the contents of the clipboard:</font></p>
<p><font face="Verdana">mle_terms.ReplaceText(Clipboard())</font></p>
<p><font face="Verdana">The following statement exchanges the contents of the StaticText st_welcome with the contents of the clipboard:</font></p>
<p><font face="Verdana">st_welcome.Text = Clipboard(st_welcome.Text)</font></p>
页:
[1]