- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to push text to the clipboard 2 times in a row. I know it's an unusual thing to do, but I like to use the clipboard history feature of windows (start+v). So as part of a larger "fast info" script, I want to push the part description onto the clipboard, then as a separate operation, push the part number.
Here is what I have now:
Imports System.Windows.Forms
Clipboard.SetText(ITEMPropertySet.Item("Description").Value)
Clipboard.SetText(ITEMPropertySet.Item("Part Number").Value)
The problem is that it only shows the part number in the clipboard history, which makes sense, since I set it then immediately over write it.
If I go like this:
Imports System.Windows.Forms
Clipboard.SetText(ITEMPropertySet.Item("Description").Value)
msgbox("this is a message box")
Clipboard.SetText(ITEMPropertySet.Item("Part Number").Value)
Then both properties show up in the history. I'm gathering from this that the message box causes some sort of "go" or "update" or "execute" operation to happen that commits the clipboard text setting. Is there a way that I can force this to happen?
I had high hopes for system.windows.forms.application.DoEvents(), but that doesn't seem to work as expected.
Solved! Go to Solution.