rifter1818 Posted October 28, 2003 Posted October 28, 2003 Why doesnt this work? all the variables are set to default however ive tried adjusting the windowed variable neither work can anyone please help me... using managed dx public class dx9 Imports Microsoft.DirectX Imports Microsoft.DirectX.Direct3D Imports System.Windows.Forms public d3ddevice as device Private TargetForm As Form Private sWidth As Long Private sHeight As Long Public Sub Initialize(Optional ByVal windowed As Boolean = False, Optional ByVal ScreenWidth As Long = 1280, Optional ByVal ScreenHeight As Long = 1024, Optional ByVal ColorFormat As Long = 33) Dim d3dpp As New PresentParameters TargetForm = New Form TargetForm.Show() TargetForm.Focus() d3dpp.Windowed = windowed sWidth = ScreenWidth sHeight = ScreenHeight d3dpp.BackBufferCount = 1 d3dpp.BackBufferFormat = ColorFormat d3dpp.BackBufferHeight = ScreenHeight d3dpp.BackBufferWidth = ScreenWidth d3dpp.SwapEffect = SwapEffect.Copy D3DDevice = New Device(0, DeviceType.Hardware, TargetForm, CreateFlags.SoftwareVertexProcessing, d3dpp) End Sub end class note that when it errors is allways the last line = new device ..... with the following error: An unhandled exception of type 'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in microsoft.directx.direct3d.dll Additional information: Error in the application. Quote
rifter1818 Posted October 28, 2003 Author Posted October 28, 2003 k Stupid me Fixed it for windowed mode If Not windowed Then d3dpp.BackBufferCount = 1 d3dpp.BackBufferFormat = ColorFormat d3dpp.BackBufferHeight = ScreenHeight d3dpp.BackBufferWidth = ScreenWidth End If But i dont really want windowed mode,... how do i get full screen to work? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.