For future reference, here is what I sent EACam:
If D3DDevice.TestCooperativeLevel <> D3D_OK Then
If D3DDevice.TestCooperativeLevel = D3DERR_DEVICENOTRESET Then
MainFont.OnLostDevice
D3DDevice.Reset D3DWindow
MainFont.OnResetDevice
Engine_Init_Gfx
Else
Exit Sub
End If
End If
If frmMain.WindowState = vbMinimized Then Exit Sub
~D3DDevice is, well, the d3d device
~frmMain is whatever form you set the device to draw to
~MainFont is your D3DXFont(s) - make sure you list them all
~Engine_Init_Gfx is a sub that does the following:
1) Restore all device render states
2) Restore all textures