1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development problem with some DirectX7 VB code

Discussion in 'Software' started by Pliskin, 11 Mar 2004.

  1. Pliskin

    Pliskin What's a Dremel?

    Joined:
    23 Aug 2003
    Posts:
    47
    Likes Received:
    0
    Code:
    Private Sub Form_Load()
        InitDirectDraw
        
        Randomize GetTickCount
        
        lLeft = (ddsd.lWidth - TextWidth("Welcome to DirectX!")) / 2
        lTop = ddsd.lHeight / 2
        
        primary.BltColorFill rPrim, RGB(Rnd * 30, Rnd * 30, Rnd * 30)
        
        Do While True
            primary.SetForeColor RGB(Rnd * 255 + 1, Rnd * 255 + 1, Rnd * 255 + 1)
            primary.DrawText lLeft, lTop, "Welcome to DirectX!", False
            DoEvents
        Loop
    End Sub
    the screensize and color depth is pre defined in declared variables, when it runs, it resizes to 640x480x16 and showl my form and says a variable in the primary.SetForeColor code line is undefined.. I'm a bit angry by this, and if anyone coupd lend a n00b VBer a hand
     
  2. Pliskin

    Pliskin What's a Dremel?

    Joined:
    23 Aug 2003
    Posts:
    47
    Likes Received:
    0
    If no one sees any problems, could someone at least say so?!?!?!?
     

Share This Page