|
-
Jul 25th, 2023, 11:31 AM
#1
Thread Starter
Lively Member
Using Clipboard in .NET 7.0
As a very occasional and self-taught programmer, I've written apps under .NET Framework 4.7.2. To use the statement
Dim text as String = Clipboard.GetText()
under that framework it's necessary to include the statement: Imports System.Windows.Forms
When I try to write an app under .NET 7.0 with the same Clipboard statement as above I get an error message saying Clipboard is not declared, with a potential fix being
Imports System.Windows.Forms (from System.Windows.Forms)
When I try to apply the recommended fix, nothing happens. If I manually insert Imports System.Windows.Forms I get a message saying the statement is unnecessary. And in any case it doesn't fix the problem. Unlike with .NET 4.7.2, System.Windows.Forms is not listed under References/General.
I'm obviously missing something fundamental. How can I use the Clipboard under 7.0? Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|