Post by Prezence on May 23, 2014 10:13:17 GMT 10
I am getting this when I run the glass effects with supertabcontrol. What else do I need to change? Code: Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ShowGlass()
End Sub
Private Sub MainForm_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
e.Graphics.Clear(Color.Black)
End Sub
#Region "Glass"
Public Sub ShowGlass()
mExtendedFrameMargins = New MARGINS
mExtendedFrameMargins.cyTopHeight = 30
mExtendedFrameMargins.cxLeftWidth = 0
mExtendedFrameMargins.cxRightWidth = 0
mExtendedFrameMargins.cyBottomHeight = 30
DwmExtendFrameIntoClientArea(Me.Handle, mExtendedFrameMargins)
End Sub
Private mExtendedFrameMargins As MARGINS
<DllImport("dwmapi.dll")> _
Private Shared Function DwmIsCompositionEnabled(<MarshalAs(UnmanagedType.Bool)> ByRef pfEnabled As Boolean) As Integer
End Function
<DllImport("dwmapi.dll")> _
Private Shared Function DwmExtendFrameIntoClientArea(ByVal hwnd As IntPtr, ByRef pMarInset As MARGINS) As Integer
End Function
<StructLayout(LayoutKind.Sequential)> _
Private Structure MARGINS
Public cxLeftWidth As Integer
Public cxRightWidth As Integer
Public cyTopHeight As Integer
Public cyBottomHeight As Integer
End Structure
#End Region
Private Sub SuperTabControl1_Paint(sender As Object, e As PaintEventArgs)
e.Graphics.Clear(Color.Transparent)
End Sub
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
Last Edit: May 24, 2014 7:29:33 GMT 10 by Prezence
|
|
Post by Nathan Lecompte on May 23, 2014 10:58:50 GMT 10
Did you set the SuperTabControl Background to transparent?
|
|
Post by Prezence on May 23, 2014 11:24:14 GMT 10
yes
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
|
|
Post by Nathan Lecompte on May 23, 2014 11:34:05 GMT 10
Try this instead: Imports System.Runtime.InteropServices 'Public Class blablablabla <StructLayout(LayoutKind.Sequential)> _ Public Structure MARGINS Public cxLeftWidth As Integer Public cxRightWidth As Integer Public cyTopHeight As Integer Public cyBottomHeight As Integer End Structure
<DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer End Function
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim margins As MARGINS = New MARGINS margins.cxLeftWidth = 0 margins.cxRightWidth = 0 margins.cyTopHeight = 30 margins.cyBottomHeight = 30 Dim hwnd As IntPtr = Handle Dim result As Integer = DwmExtendFrameIntoClientArea(hwnd, margins) End Sub
Hope this helps!
|
|
Post by Nathan Lecompte on May 23, 2014 11:37:02 GMT 10
Aha, Goto SuperTabControl Properties > Tabstripcolor > Background > Set to transparent. This should work!
|
|
Post by Nathan Lecompte on May 23, 2014 12:37:49 GMT 10
If your question has been answered please add "[SOLVED]" to your subject/title.
|
|
Post by Prezence on May 23, 2014 20:56:54 GMT 10
I did that too and it still doesnt work I had gotten it to work in another app, but when I tried this time, it doesn't show the glass. Also, when I add a new-tab button, and say bringtofront(), the supertabcontrol blanks out.
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
|
|
Post by Prezence on May 24, 2014 7:32:11 GMT 10
thanks! I did that and took the e.graphics.clear(color.black) out of the Form.Paint event! It works now! Btw, I have a very good browser, but decided it was time to change the GUI and move to Awesomium. This has helped a lot.
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
|
|
Post by Nathan Lecompte on May 24, 2014 9:37:09 GMT 10
Thanks, sorry if I didn't answer your question. It's good that you solved it though! Awesomium is a good choice Feel free to share your browser in the projects page when you're done Have great day!
|
|