Windows Aero问题 [英] Windows Aero Problem

查看:87
本文介绍了Windows Aero问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VB.NET的表单上使用Windows Aero时遇到问题.
如果任何东西(文本,图片,控件)中有黑色,则它们看起来不可见.有人知道如何解决问题吗?

代码:

I have a problem using Windows Aero on a form in VB.NET.
If anything (text, pictures, controls) have black in them, then they appear invisible. Does anyone know how to solve the problem?

Code:

Imports System.Runtime.InteropServices


Public Class Form1

    '***********************************
    'Windows Aero Code
    <Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> Public Structure MARGINS
        Public LeftWidth As Integer
        Public RightWidth As Integer
        Public TopHeight As Integer
        Public Buttomheight As Integer
    End Structure
    <Runtime.InteropServices.DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer
    End Function
    '***********************************


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Try
        Me.BackColor = Color.Black
        Dim margins As MARGINS = New MARGINS
        margins.LeftWidth = -1
        margins.RightWidth = -1
        margins.TopHeight = -1
        margins.Buttomheight = -1
        Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, margins)
    Catch ex As Exception
    End Try


End Sub


End Class



谢谢!


--------------------------------

我知道它会使所有内容都变成黑色不可见,只是想知道是否有人知道如何解决该问题.



Thank-You!


--------------------------------

I know it turns everything black invisible, just wondering if anybody knows how to solve the problem.

推荐答案

它们看起来不可见,因为您将表单的BackColor设置为黑色.因为它们是相同的颜色,所以它们看起来是不可见的.
They appear invisible because you set the BackColor of your form to black. Because they are the same color, they appear invisible.


这篇关于Windows Aero问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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