TGP
Imports Microsoft.DirectXPublic Class ConsoleWindow Declare Function AllocConsole Lib "kernel32" () As Boolean Declare Function FreeConsole Lib "kernel32" () As Integer Dim readline As String Dim stats As New ArrayList Dim t As New Threading.Thread(AddressOf OpenWindow) Sub Get3DInfo() stats.Add("Texture Memory: ") stats.Add(mdx9a.device.AvailableTextureMemory) stats.Add("Number of lights: ") stats.Add(mdx9a.device.Lights.Count + 1) stats.Add("Light details :") Dim i As Integer For i = 0 To mdx9a.device.Lights.Count stats.Add(vbNewLine & "Light #" & i + 1 & ":" & vbNewLine) stats.Add(mdx9a.device.Lights(i).ToString) Next End Sub Sub AddLine(ByVal line As String, Optional ByVal fgcolor As ConsoleColor = ConsoleColor.White) Dim tempcol As ConsoleColor = Console.ForegroundColor Console.ForegroundColor = fgcolor Console.Write(line) Console.ForegroundColor = tempcol End Sub Sub OpenWindow() If AllocConsole() = True Then Console.WindowLeft = 0