Hey,
i have a Problem to make a Overlay for csgo that works in fullscreen...
Right now the overlay show my draw things on the screen but the background is black and flicker over csgo..
I dont know how to fix it, maybe someone can help me?
I use the Handle of the csgo window for the directx device.
If i change the Handle from the device to the handle from my form it works nice, but not in fullscreen than ^^
Here is my Code:
Code:
:onload:
_initalStyle = GetWindowLong(Me.Handle, GWL.ExStyle)
SetWindowLong(Me.Handle, GWL.ExStyle, _initalStyle Or WS_EX.Layered Or WS_EX.Transparent)
SetLayeredWindowAttributes(Me.Handle, 0, 255, LWA.Alpha)
:onload:
:init:
present.BackBufferWidth = 1024 'Me.Width CSGO Resolution
present.BackBufferHeight = 768 'Me.Height CSGO Resolution
present.MultisampleQuality = SlimDX.Direct3D9.MultisampleType.None
present.PresentFlags = SlimDX.Direct3D9.PresentFlags.None
present.BackBufferCount = 1
present.PresentationInterval = SlimDX.Direct3D9.PresentInterval.Immediate
present.SwapEffect = SlimDX.Direct3D9.SwapEffect.Discard
present.BackBufferFormat = SlimDX.Direct3D9.Format.A8R8G8B8
present.AutoDepthStencilFormat = Format.D16
present.Windowed = True
present.DeviceWindowHandle = CSGOhWnd
device = New Device(d3d9, 0, DeviceType.Hardware, CSGOhWnd, CreateFlags.HardwareVertexProcessing, present)
device.SetRenderState(RenderState.Lighting, True)
device.SetRenderState(RenderState.CullMode, Cull.None)
:init
:draw:
:loop:
device.Clear(ClearFlags.Target Or ClearFlags.ZBuffer, Color.FromArgb(0, 0, 0, 0), 1.0F, 0)
device.BeginScene()
//drawthings
device.EndScene()
device.Present()
:loop:
:draw: