I'm having a strange problem. My windows form won't redisplay after minimizing it. When I try to redisplay the window from the taskbar all i get is a "ding" sound.
It's reproducible on my Windows 8.1 system, using VS 2010 and .Net 4.0. and have narrowed it down to a call to My.Computer.Clipboard.ContainsText during Application.Idle event. I've used this code in many projects on WinXP and it always worked fine.
I've tried adding the attribute
to the top of the form and to the App_Idle method but it doesn't help so I assume I'm doing it wrong or using the wrong parameters.
It's reproducible on my Windows 8.1 system, using VS 2010 and .Net 4.0. and have narrowed it down to a call to My.Computer.Clipboard.ContainsText during Application.Idle event. I've used this code in many projects on WinXP and it always worked fine.
I've tried adding the attribute
Code:
<UIPermission(SecurityAction.Assert, Clipboard:=UIPermissionClipboard.AllClipboard)>
VB.Net Code:
' Add a toolbar with 1 button to a form. Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load AddHandler Application.Idle, AddressOf App_Idle End Sub Private Sub App_Idle(sender As Object, e As EventArgs) ' Windows 8.1 makes a ding sound and prevents the window from redisplaying when minimized. Me.ToolStripButton1.Enabled = My.Computer.Clipboard.ContainsText End Sub End Class