In this example, a lot of mistakes. For example:
wrong:
Code:
Direct3D_Device.SetRenderState D3DRS_ALPHABLENDENABLE, True
right:
Code:
Direct3D_Device.SetRenderState D3DRS_ALPHABLENDENABLE, 1
Because in VB6 True = -1
On some video drivers can be buggy.
Also, there are many superfluous:
Specular, Color are not used,
Texture Size - 20 * 400, but it creates a 256 * 256 with an unknown purpose.
It was necessary to unite in Enum:
Code:
Private Const COLOR_DEPTH_16_BIT As Long = D3DFMT_R5G6B5
Private Const COLOR_DEPTH_24_BIT As Long = D3DFMT_A8R8G8B8
Private Const COLOR_DEPTH_32_BIT As Long = D3DFMT_X8R8G8B8
Create_Polygon not needed inside the Render loop.
If "Although the Unload statement located above exits the program, you will end up with an Automation error after doing so" then the program has a bug, use End - an attempt to hide it.
On such programs should not be learn.
I understand very little in English, tell me what is in the program, then you are missing.