Computing.Net > Forums > Programming > Direct X7 and VB

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Direct X7 and VB

Reply to Message Icon

Name: Danlo
Date: April 2, 2003 at 17:50:52 Pacific
OS: Windows 2000 Pro.
CPU/Ram: -
Comment:

Oka.. here is the section of my code thats not working..

Sub Loader()
Dim I As Integer

'From here we will display the Loading screen...
LoadObject ddsdBG, BG, BGRect, App.Path & "\bmpmaps\main.bmp", 600, 800, False, 0, 0

BackBuffer.BltFast 0, 0, BG, BGRect, DDBLTFAST_WAIT
BackBuffer.SetForeColor RGB(0, 128, 255)
BackBuffer.DrawText 320, 250, "Loading...", False

Primary.Flip Nothing, DDFLIP_WAIT

For I = 1 To UBound(Maps)
LoadObject ddsdMaps(I), Maps(I), MapsRect(I), App.Path & "\bmpmaps\m" & I & ".bmp", 600, 800, False, 0, 0
LoadObject ddsdMiniMaps(I), MiniMaps(I), MiniMapsRect(I), App.Path & "\bmpmaps\m" & I & "i.bmp", 198, 198, False, 0, 0
Next

For I = 1 To 2
LoadObject ddsdTanks(I), Tanks(I), TanksRect(I), App.Path & "\bmpmaps\tank" & I + 1 & ".bmp", 16, 32, True, vbRed, vbRed
Next

LoadObject ddsdSButton(1), Sbutton(1), SbuttonRect(1), App.Path & "\bmpmaps\s_n.bmp", 100, 200, True, vbBlack, vbBlack
LoadObject ddsdSButton(2), Sbutton(2), SbuttonRect(2), App.Path & "\bmpmaps\s_o.bmp", 100, 200, True, vbBlack, vbBlack

LoadObject ddsdArrow(1), Arrow(1), ArrowRect(1), App.Path & "\bmpmaps\ss.bmp", 32, 32, True, vbBlack, vbBlack
LoadObject ddsdArrow(2), Arrow(2), ArrowRect(2), App.Path & "\bmpmaps\ma.bmp", 32, 32, True, vbBlack, vbBlack
LoadObject ddsdArrow(3), Arrow(3), ArrowRect(3), App.Path & "\bmpmaps\up.bmp", 16, 16, True, vbBlack, vbBlack
LoadObject ddsdArrow(4), Arrow(4), ArrowRect(4), App.Path & "\bmpmaps\down.bmp", 16, 16, True, vbBlack, vbBlack

BackBuffer.BltFast 0, 0, BG, BGRect, DDBLTFAST_WAIT
BackBuffer.SetForeColor RGB(255, 255, 255)
BackBuffer.DrawText 320, 250, "Done...", False

Primary.Flip Nothing, DDFLIP_WAIT

End Sub

Now Im getting an automation error on the part:
Backbuffer.DrawText 320, 250, "Done...", False

How come? Any remedies?



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Direct X7 and VB

what differs between c++ and vb? www.computing.net/answers/programming/what-differs-between-c-and-vb/10808.html

VB6.0 and VB.Net www.computing.net/answers/programming/vb60-and-vbnet/573.html

vb and vb.net www.computing.net/answers/programming/vb-and-vbnet/1318.html