-
Dec 10th, 2014, 08:11 PM
#1
Thread Starter
Hyperactive Member
Windows 8.1 Aero Question
So I was doing some research into API calls, and discovered the Microsoft Windows API Index. Just browsing around looking for something (not dangerous) to play around with and learn from, I came across DwmExtendFrameIntoClientArea. Now this caught my interest for a couple of reasons.
1. I had played around with this a bit in vista/7 for the glass effect, but I didn't really know what I was doing,
2. I KNEW there would be a few tutorials out there. and finally,
3. I was curious how it looked in windows 8.
Looking around I came across this tutorial on beta archive, threw it onto a black form and VOILA:
The question I have is, how can I remove the one pixel wide light border around the client area. It seems to me that it shouldn't be there due to the fact that if you resize this form at all this happens:
Note: My wallpapers change on a timer, color change is not relevant.
Notice that the light border is missing on the right side of the window. I had resized the right half of the window down and back up. I attempted invalidating the form, but it seemed to have no effect.
Any recommendations?
Also, if anyone has any links to useful API calls to learn from, that would be great. This one is cool, but it doesn't let me test anything functional. Right now I'm interested in finding out what sort of functions become available to me through API interfaces, that may not be available through native VB, and learning how to work them into VB.Net projects. Even if I can't find any need or use for them in a current project, it will broaden my programming skill set.
Thanks!
Majority of code used:
vb.net Code:
Imports System.Drawing.Printing Public Class Form1 Private Declare Auto Function DwmExtendFrameIntoClientArea Lib "dwmapi.dll" (ByVal hWnd As IntPtr, ByRef pMarInset As MARGINS) As Integer Private Declare Auto Function DwmIsCompositionEnabled Lib "dwmapi.dll" (ByRef en As Integer) As Integer Structure MARGINS Public LeftWidth As Integer Public RightWidth As Integer Public TopHeight As Integer Public BottomHeight As Integer End Structure Dim int As Integer = 0 'Replace "50" by the size of the panels from the top, bottom, left and right Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dwmEnabled As Integer DwmIsCompositionEnabled(dwmEnabled) Dim margins As MARGINS = New MARGINS margins.LeftWidth = 50 margins.RightWidth = 50 margins.TopHeight = 50 margins.BottomHeight = 50 Dim hwnd As IntPtr = Me.Handle Dim result As Integer = DwmExtendFrameIntoClientArea(hwnd, margins) End Sub End Class
Last edited by stepdragon; Dec 10th, 2014 at 08:18 PM.
Reason: Posted the link, but no code. Fix'd
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
|