I've finished the sounds & hardware finding tutorials fo DirectX (8.1), now I'm trying my hand at the graphics side (which I left 'till last on purpose)!

I've tried "lesson 1" of the graphics tutorials on directx4vb.com, & the first routine (which I need for more or less everything I do in DX) doesn't work!!! I've tried this on 2 pc's now & can't see why this screws up. Any help'll be majorly appriciated! Cheers!
VB Code:
  1. Public Function Initialise() As Boolean
  2.     Dim DispMode As D3DDISPLAYMODE
  3.     Dim D3DWindow As D3DPRESENT_PARAMETERS
  4.    
  5.     Set Dx = New DirectX8
  6.     Set D3D = Dx.Direct3DCreate()
  7.  
  8.     ' Windowed Mode
  9.     D3D.GetAdapterDisplayMode CONST_D3DCONST.D3DADAPTER_DEFAULT, DispMode
  10.    
  11.     With D3DWindow
  12.         .Windowed = 1
  13.         .SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
  14.         .BackBufferFormat = DispMode.Format
  15.     End With
  16.    
  17.     Set D3DDevice = D3D.CreateDevice(0, D3DDEVTYPE_REF, frmMain.hWnd, _
  18.     D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DWindow)
  19. End Function