Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27353

VS 2010 Window won't show after minimizing to taskbar on Win 8.1

$
0
0
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
Code:

<UIPermission(SecurityAction.Assert, Clipboard:=UIPermissionClipboard.AllClipboard)>
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.

VB.Net Code:
  1. ' Add a toolbar with 1 button to a form.
  2. Public Class Form1
  3.  
  4.     Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  5.         AddHandler Application.Idle, AddressOf App_Idle
  6.     End Sub
  7.  
  8.  
  9.     Private Sub App_Idle(sender As Object, e As EventArgs)
  10.         ' Windows 8.1 makes a ding sound and prevents the window from redisplaying when minimized.
  11.         Me.ToolStripButton1.Enabled = My.Computer.Clipboard.ContainsText
  12.     End Sub
  13.  
  14. End Class

Viewing all articles
Browse latest Browse all 27353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>