Results 1 to 3 of 3

Thread: [Error] "Runtime Error 424 Object required"

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    1

    [Error] "Runtime Error 424 Object required"

    Wrote this code with help of an ebook testing directx functions and all over sudden I get "Runtime Error 424 Object required", can someone tell me where am going wrong ill truly appreciate it.

    Code:
    Private Sub Form_Load()
    'create the DirectX object
    Set dx = New DirectX8
    'create the Direct3D object
    Set d3d = dx.Direct3DCreate()
    
    d3dpp.hDeviceWindow = Me.hWnd
    d3dpp.BackBufferCount = 1
    d3dpp.BackBufferWidth = 640
    d3dpp.BackBufferHeight = 480
    d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD
    d3dpp.Windowed = 1
    d3d.GetAdapterDisplayMode D3DADAPTER_DEFAULT, dispmode
    d3dpp.BackBufferFormat = dispmode.Format
    
    Set d3ddev = d3d.CreateDevice( _
    D3DADAPTER_DEFAULT, _
    D3DDEVTYPE_HAL, _
    hWnd, _
    D3DCREATE_SOFTWARE_VERTEXPROCESSING, _
    d3dpp)
    
    End Sub

  2. #2

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [Error] "Runtime Error 424 Object required"

    Welcome to the forums.

    You should put Option Explicit On in your programs to prevent the use of undeclared variables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width