将txtbox内容复制到剪贴板 [英] Copying txtbox contents to the clipboard

查看:110
本文介绍了将txtbox内容复制到剪贴板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Access97应用程序,其表单包含许多文本框。

我需要做些什么来复制其中一个文本的内容

框到剪贴板?我想这样做,然后我可以从

剪贴板粘贴到Word,记事本等。


我知道SetClipboardData函数,但我真的无法想象

如何运作。我认为它应该与

OpenClipboard功能一起使用。


如果有人知道,请告诉我。请尽可能具体说明

你的答案,提供代码样本。


谢谢。


* **通过开发人员指南 http://www.developersdex.com 发送***
不要只是参加USENET ......获得奖励!

I have an Access97 application whose form contains many text boxes.
What do I have to do in order to copy the contents of one of these text
boxes to the clipboard? I want to do this so I can then paste from the
clipboard to Word, Notepad, etc.

I know about the SetClipboardData function, but I really can''t figure
out how it works. It''s supposed to be used in conjunction with the
OpenClipboard function, I think.

If anybody knows, please let me know. Please be as specific as possible
in your answer, giving code samples.

Thank You.

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!

推荐答案

我还没有看到任何情况在代码控制下,你所描述的内容是必要的(尽管代码示例存在)。是否有某些原因

用户不能简单地选择控件中的文本并复制它?如果

控件不可编辑,只需将其锁定以防止编辑,并且

也许,使其Tab Stop = No,因此用户只能使用

鼠标,不要因为在Tab键顺序中使用它而感到困惑。


这里是一个代码示例的链接,如果你真的有需要的话对于它:
http://www.mvps.org /access/api/api0049.htm


2003年12月31日06:19:41 GMT,DataBard007< an ******* @ devdex.com> ;写道:
I have yet to see any situations where what you describe would be necessary to
do under code control (though code examples to exist). Is there some reason
the user cannot simply select the text in the control and copy it? If the
control is not editable, simply make it Locked to prevent editing, and
perhaps, make it Tab Stop = No, so the user can only select it using the
mouse, and not be confused by having it in the tab order.

Here''s a link to a code example if you truly do have a need for it:
http://www.mvps.org/access/api/api0049.htm

On 31 Dec 2003 06:19:41 GMT, DataBard007 <an*******@devdex.com> wrote:
我有一个Access97应用程序,其表单包含许多文本框。
我需要做什么才能复制其中一个文本的内容盒子到剪贴板?我想这样做,然后我可以从
剪贴板粘贴到Word,记事本等。

我知道SetClipboardData函数,但我真的无法想象
它是如何工作的。我认为它应该与
OpenClipboard功能结合使用。

如果有人知道,请告诉我。请在答案中尽可能具体,给出代码示例。

谢谢。

***通过Developersdex发送 http://www.developersdex.com ***
不要只参加USENET ......获得奖励!
I have an Access97 application whose form contains many text boxes.
What do I have to do in order to copy the contents of one of these text
boxes to the clipboard? I want to do this so I can then paste from the
clipboard to Word, Notepad, etc.

I know about the SetClipboardData function, but I really can''t figure
out how it works. It''s supposed to be used in conjunction with the
OpenClipboard function, I think.

If anybody knows, please let me know. Please be as specific as possible
in your answer, giving code samples.

Thank You.

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!






要复制一个控件的内容(例如Surname),请使用:

Me.Surname.SetFocus

RunCommand acCmdCopy


如果你想要更强大的东西,请参阅:
http://www.mvps.org/access/api/api0049.htm


-

Allen Browne - 微软MVP。西澳大利亚州珀斯。

访问用户提示 - http:// allenbrowne.com/tips.html

回复群组,而不是mvps dot org的allenbrowne。


" DataBard007" <一个******* @ devdex.com>在消息中写道

news:3f ********************* @ news.frii.net ...
To copy the contents of just one control (such as "Surname") use:
Me.Surname.SetFocus
RunCommand acCmdCopy

If you want something more powerful, see:
http://www.mvps.org/access/api/api0049.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"DataBard007" <an*******@devdex.com> wrote in message
news:3f*********************@news.frii.net...
我有一个Access97应用程序,其表单包含许多文本框。
我需要做什么才能将其中一个文本
框的内容复制到剪贴板?我想这样做,然后我可以从
剪贴板粘贴到Word,记事本等。

我知道SetClipboardData函数,但我真的无法想象
它是如何工作的。我认为它应该与
OpenClipboard功能结合使用。

如果有人知道,请告诉我。请在答案中尽可能具体,给出代码示例。
I have an Access97 application whose form contains many text boxes.
What do I have to do in order to copy the contents of one of these text
boxes to the clipboard? I want to do this so I can then paste from the
clipboard to Word, Notepad, etc.

I know about the SetClipboardData function, but I really can''t figure
out how it works. It''s supposed to be used in conjunction with the
OpenClipboard function, I think.

If anybody knows, please let me know. Please be as specific as possible
in your answer, giving code samples.



先生。 Jorgensen:


我希望能够通过点击

txtbox复制到剪贴板,而不必选择整个项目,然后按ctrl + c。

这是用户的简单问题,这就是全部。


***通过Developersdex http://www.developersdex.com ***

Don''只是参加USENET ......获得奖励!
Mr. Jorgensen:

I want to be able to copy to the clipboard simply by clicking on the
txtbox, rather than having to select the whole item, and press ctrl + c.
It''s a matter of simplicity for the user, that''s all.

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


这篇关于将txtbox内容复制到剪贴板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆