   Switching between windowed and full screen mode
  I have been tring to switch between the two modes.It is ok when I start in windowed mode and then release the D3DDevice and then create a new full screen device.However when I try to do the same by releasing the full screen device and recreate the windowed device, it stays as full screen mode....Any idea on what might be causing this? 
  When you attempt to re-created a windowed device, is the ''Windowed'' member of your D3DPRESENT_PARAMETERS structure ''true''? ;  Yep it is.My presentation and creation parameters for fullscreen modem_PresentParameters.Windowed = FALSE;m_PresentParameters.SwapEffect = D3DSWAPEFFECT_DISCARD;m_PresentParameters.BackBufferWidth = pMode->Width;m_PresentParameters.BackBufferHeight = pMode->Height;m_PresentParameters.BackBufferFormat = pMode->Format;m_PresentParameters.FullScreen_RefreshRateInHz = pMode->RefreshRate;m_CreationParameters.AdapterOrdinal = D3DADAPTER_DEFAULT;m_CreationParameters.DeviceType= DeviceType;m_CreationParameters.BehaviorFlags  = Behavior;m_CreationParameters.hFocusWindow   = m_hWnd;  My presentation and creation parameters for windowed modem_PresentParameters.Windowed = TRUE;m_PresentParameters.SwapEffect = D3DSWAPEFFECT_DISCARD;m_PresentParameters.BackBufferFormat = CurrentMode.Format;m_CreationParameters.AdapterOrdinal = D3DADAPTER_DEFAULT;m_CreationParameters.DeviceType= DeviceType;m_CreationParameters.hFocusWindow   = WindowHandle;m_CreationParameters.BehaviorFlags  = Behavior; ;  I''m not sure if you''re using an old version of Direct3D, but why don''t you use the Reset() method instead of releasing the device and recreating it?Try memset()ing your presentation parameters struct before reusing it; maybe some members aren''t getting overwritten, and so the device is created with the wrong parameters (and maybe creation fails). 