Funding for 'IT Lab' Project, Phase 1: Progress of sticker sales. Purchase a sticker to help us reach our target.Updated: 2010-02-28 11:53
විෂුවල් බේසික් මගින් DirectX8 භාවිතා කර වීඩියෝ ක්රීඩා නිපදවීම
මා ඔබව දැන් මුණගැසෙන්නේ ඩිජිට් හරහා තෙවන වතාවටයි. මේ වන විටත් ඩිජිට් සඟරාව හරහා ලක්දිව තොරතුරු තාක්ෂණය අස්වැද්දීමට කරන ප්රයත්නය ඔබට මොනවට පැහැදිලි වී ඇති බව මම දනිමි. ඩිජිට් සඟරාව මඟින් නව පුනරුදයක් වන බව දැනටමත් සත්යාපනය වී ඇත. එහිදී සෑම විෂයය ක්ෂේත්රයක් අළලාම කරුණු ගොනු කිරීමට ලිපි රචකයන් සමත්වීම පැසසිය යුතු කරුණක් වෙයි.
Private Const
COLOR_DEPTH_24_BIT As Long = D3DFMT_A8R8G8B8
Private Const
COLOR_DEPTH_32_BIT As Long = D3DFMT_X8R8G8B8
Private DirectX8
As DirectX8
private Direct3D
As Direct3D8
Private Direct3DX
As D3DX8
Private
Direct3D_Device As Direct3DDevice8
Private Main_Font
As D3DXFont
Private
Main_Font_Description As IFont
Private Text_Rect
As RECT
Private
Fullscreen_Enabled As Boolean
Private Running
As Boolean
Private Sub
Form_Activate()
Dim Direct3D_Window As
D3DPRESENT_PARAMETERS
frmMain.Caption = "Digit E MagaZine"
Set DirectX8 = New DirectX8
Set Direct3D = DirectX8.Direct3DCreate()
Set Direct3DX = New D3DX8
If Fullscreen_Enabled = True Then
Display_Mode.Width = 800
Display_Mode.Height = 600
Display_Mode.Format =
COLOR_DEPTH_16_BIT
Direct3D_Window.Windowed = False
Direct3D_Window.BackBufferCount = 1
Direct3D_Window.BackBufferWidth =
Display_Mode.Width
Direct3D_Window.BackBufferHeight =
Display_Mode.Height
Direct3D_Window.hDeviceWindow =
frmMain.hWnd
Else
Direct3D.GetAdapterDisplayMode
D3DADAPTER_DEFAULT, Display_Mode
Direct3D_Window.Windowed = True
End If
Direct3D_Window.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
Direct3D_Window.BackBufferFormat =
Display_Mode.Format
Set Direct3D_Device =
Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, Direct3D_Window)
Font.Name = "Arial"
Font.Size = 14
Set Main_Font_Description = Font
Set Main_Font =
Direct3DX.CreateFont(Direct3D_Device, Main_Font_Description.hFont)
Text_Rect.Left = 30
Text_Rect.Top = 30
Text_Rect.Right = Text_Rect.Left + 100
Text_Rect.bottom = Text_Rect.Top + 20
Running = True
Do While Running = True
DoEvents
Direct3D_Device.Clear 0, ByVal 0,
D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 0), 1#, 0
Direct3DX.DrawText Main_Font,
D3DColorRGBA(255, 255, 255, 255), "DiGit", Text_Rect, DT_TOP Or
DT_LEFT
Direct3D_Device.Present ByVal 0, ByVal
0, 0, ByVal 0
Loop
end Sub
Private Sub
Form_Load()
If MsgBox("Click Yes to go to full
screen (Recommended)", vbQuestion Or vbYesNo, "Options") = vbYes
Then Fullscreen_Enabled = True
Private Sub
Form_Unload(Cancel As Integer)
Running = False
Set Direct3D_Device = Nothing
Set Direct3D = Nothing
Set DirectX8 = Nothing
Unload Me
End
End Sub
මා එම කේතනය මෙම ලිපියේ දී සඳහන් නොකළේ ඔබ විසින්ම එය කිරීමට අවශ්ය වූ නිසාය. මෙම සතියේ ඔබ කළයුතු අභ්යාසය වන්නේ එයයි.
ලබන සතියේ ඉතාම ආශ්වාදයක් ගෙන දෙන ලිපියක් සමඟ හමු වෙමු.
Post new comment