1

I seem to be having a few issues with the form on my project after I decided to extend the non client area by use of this code:

<Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> Public Structure Side
    Public Left As Integer
    Public Right As Integer
    Public Top As Integer
    Public Bottom As Integer

End Structure


<Runtime.InteropServices.DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As Side) As Integer

End Function


Try
        Me.BackColor = Color.Black
        Dim Side As Side = New Side
        Side.Left = -1
        Side.Right = -1
        Side.Top = -1
        Side.Bottom = -1
        Dim result As Integer = dwmExtendFrameIntoClientArea(Me.Handle, Side)

    Catch ex As Exception

    End Try

The code isn't exact, just hopefully it can serve to give a better understanding of what I attempted to accomplish. The issue I'm having now with the black color now being used as transparency with aero. Some text colors that are supposed to be black are now reflecting the color of the current aero color theme as you can see in the examples as well as other color issues elsewhere such as the text highlight color as well.

enter image description here enter image description here enter image description here

Having the non client area extended is an important part of the project, so I can't deviate from that too much. Anyway I can try to have a color set designated for other things like this or some other kind of solution to resolve this? I'm a little fuzzy on meddling around with form stuff having to do with aero. Thanks!

  • You cannot make this work. Lots of controls in the toolbox use legacy GDI 24bpp text rendering. Making the text transparent. – Hans Passant Sep 06 '14 at 21:48
  • @HansPassant I sort of figured that might be the case. I wonder if there is some kind of alternate way this effect can be achieved whilst still being able to render the text properly? – ultimatefloydian Sep 06 '14 at 23:00
  • You'll have to use another toolbox, like WPF's. Or create your own. All rather pointless, the glass effect was just Microsoft competing with Apple's glossy look for consumer eyeballs. They both moved on, as should you, glass was yesterday's gimmick. Abandoned in Windows 8. – Hans Passant Sep 06 '14 at 23:06
  • @HansPassant Well, it's not the glass effect that I'm pursuing nor is it for any kind of aesthetic purpose. I simply need every inch of screen space I can get in the project, so I'd like to take advantage of all that wasted space in the title bar however I still need the functionality of the control box. – ultimatefloydian Sep 08 '14 at 05:09

0 Answers0