o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

[DirectX 8] Error -

My error: Something about variable block set.
My error line: the line that has " 'error " on it.
My Code:
vb Code:
  1. Dim Dx As DirectX8
  2. Dim D3d As Direct3D8
  3. Dim D As D3DX8
  4. Dim D3DDevice As Direct3DDevice8
  5. Dim MainFont As D3DXFont
  6. Dim MainFontDesc As IFont
  7. Dim TextRect As RECT
  8. Dim fnt As New StdFont
  9. Dim TextToDraw As String
  10.  
  11. Public Sub DrawText(Text As String, X As Long, Y As Long)
  12.     fnt.Name = "Verdana"
  13.     fnt.Size = 18
  14.     fnt.Bold = True
  15.     Set MainFontDesc = fnt
  16.     'Error Set MainFont = D.CreateFont(D3DDevice, MainFontDesc.hFont)
  17.     TextRect.Top = 1
  18.     TextRect.Left = 1
  19.     TextRect.Bottom = Y
  20.     TextRect.Right = X
  21.     D3DDevice.BeginScene
  22.     D.DrawText MainFont, &HFFCCCCFF, Text, TextRect, DT_TOP Or DT_CENTER
  23.     D3DDevice.EndScene
  24.     D3DDevice.Present ByVal 0, ByVal 0, 0, ByVal 0
  25. End Sub
  26.  
  27. Public Sub Init()
  28.     Dim DispMode As D3DDISPLAYMODE
  29.     Dim D3DWindow As D3DPRESENT_PARAMETERS
  30.     Set Dx = New DirectX8
  31.     Set D3d = Dx.Direct3DCreate()
  32.     D3d.GetAdapterDisplayMode D3DADAPTER_DEFAULT, DispMode
  33.     D3DWindow.Windowed = 1
  34.     D3DWindow.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
  35.     D3DWindow.BackBufferFormat = DispMode.Format
  36.     Set D3DDevice = D3d.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, Client.hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DWindow)
  37. End Sub

 

Help on compile. -
I have made a simple program in VB.net that uses very little directx. When I compile the program it will not run any of the directx code and will give an error on it not being a ble to find microsoft.directx, only if the computer you run it on does not have a directx sdk installed. So


'Microsoft.DirectX.Direct3D.Usage' -
hi i have Installed DirectX sdk2005 BUT WHILE RUNNING CODE Following error accured [The type 'Microsoft.DirectX.Direct3D.Usage' exists in both 'c:\WINDOWS\Microsoft.NET\DirectX for Managed Code\2.0.0.0_x86\Microsoft.DirectX.dll' and 'c:\WINDOWS\Microsoft.NET\DirectX for


VB and DirectX -
I am running on NT and would like to develop something in DirectX, but when I go to install DirectX it says that NT lacks some system stuff, and I will not have all the power of DirectX at my fingertips. Does anyone have idea what limitations I will have by being on NT?


learning DirectX -
Im wanna learn how to make DirectX programmes. Can anyone please tell me if there is any www site for teaching DirectX(I've never even seen a DirectX programme so I need something for total beginners). Thanx in advance


New to DirectX -
I'm very new to DirectX, and I'm looking for a good place to start learning. I have no trouble finding 3D engines or examples of how to use DirectX, I just can't find any that are commented. Can anybody point in me in the right direction. I'm interested in all of DirectX.


DirectX for VB -
I notice somewhere on website, it has some tutorial on implementing directX codes for VB, can remember what site address was anyone? What does directX give an effect to VB would that prevent shuttering? (especially redrawing a picture) what is good about directX with VB?


DirectX references -
So, using VB.NET and just downloaded the DirectX 9.0 SDK. After installing it (I'm not saying succesfully, but it didn't report an error) you should add a reference Microsoft.DirectX to your project. But, what is that, there is no Microsoft.DirectX in the whole list . Well, so, I've


Cant create direct3d device -
Hi all! I cant seem to create a d3ddevice, i get an undescriptive and apparently quite common error message: 'Microsoft.DirectX.Direct3D.InvalidCallException' Heres my code: Dim md3dadapter As Microsoft.DirectX.Direct3D.AdapterInformation Dim md3dpresent As N


DirectX 8 -
Has anyone heard if directX support for vb is going to be a little more robust(I mean as in the different calls and methods u can use and also documentation)? I was kind of dissapointed with directx 7 support. Also, are there any directx for vb books coming down the pipe?


DIRECTX version using DirectX SDK -
i have downloaded the DirectX SDK and have developed and applkication to discover my graphics cards info such as manufacturer, RAM and so on.... but the thing i'm really stuck on is discovering the DirectX version can anyone help here?


Directx in VB or C++ -
Hey everyone. I have been told by many people that directx for c++ has way more features than directx for VB. I am learning directx for VB but I was wondering if I was just waisting my time and should learn it for C++ instead. Are there more features for the C++ version?


Help me!!!!!!!! VB5 and DirectX again. -
On my last post I asked if I can use VB4 with DirectX. My bad, I meant to write VB5 on the message. I was wondering how you can "turn on" the DirectX within VB5? Everytime I put the following code: ----- Public DirectX As DirectX7 Public DD As DirectDraw7 Public D3D As Di


Why does the new DirectX SDK have only C++ examples -
I'm curious as to why there are no longer VB .Net examples with the DirectX SDK. Does Microsoft not want anyone using VB .Net for creating applications and/or games that use DirectX? In fact, the new DirectX SDK has eliminated all the examples for C# also.


Is DirectX Direct 3d -
I just downloaded DirectX 8.1 and Im gonna start playing around with it. What I want to know is Direct 3D the same thing as DirectX or a part of DirectX? How about DirectSound and DirectPlay, etc. for that matter? Also, What is the purpose of Direct3D, if you already have a 3D graphics


DirectX and VB -
How hard is it to learn DirectX 9 for VB? I am in Trig/Pre-Calc in high school..so the math shouldnt be too hard. I want to learn how to program directx in vb because i dont know any Win32 C++ yet..and i can get a feel for directx in VB before i program in C++. What tools would i nee


Microsof DirectX SDK -
Hello, I've been hearing that Microsoft DirectX SDK will help me learn DirectX programming. I don't want to go right ahead and download it because of its huge size. Please tell me, is it worth me downloading it to learn DirectX programming? Thanks


DirectX too hard! -
OK, here's what I was doing. I was having a look at all the components and references on my computer. I got to DirectX and I thought I will save that til last because it looks too hard. So I went on and on. When I got back to DirectX I discovered that it was in fact really hard bec


[DirectX] Moving individual object -
Hi, I'm programming something like this using VB 2005 with .X file (DirectX). After loading the files in VB, I want to move the pre-created object individually. For example, I got a cube and a sphere in the DirectX file, I would like to move cube towards sphere. I don't want do


Is this true -
DirectX gets closer to the hardware than VB does, hence it's much faster than any other API function. To integrate DirectX with VB, you need a type library (which can be downloaded from Microsoft's website). Go to http://www.microsoft.com/directx for more information.


Problem with DirectX 9 sdk -
Every one of the samples i run give me this error(see picture below) These samples are UNMODIFIED straight out of the sdk. Can anyone tell me how to fix this error? I run vc#express 2005 on windows xp64. I have no problems with my own programs, but i want this to work so i can conv


.NET and Direct X -
Anybody try programming any DirectX in VB .NET? Just started with DirectX. Downloaded some sample code in VB6 which works fine. .NET will try to translate it into something it can use if you let it. Unfortunately, some of the methods don't seem to exist in .NET. Does .NET ev


Downgrade DirectX -
I've installed DirectX 8 and i dont have ANY sound or i cant play ANY game that uses DirectX this is becource i installed DirectX 8 and my Hardware doesnt work with it When i still had DirectX 6 i didnt had ANY probleem. Now my Qeustion: How can I downgrade DirectX 8 to DirectX


General Questions about DirectX 7/8/9 and vb6 -
hi all. I have never used DirectX to write a game (since I don't usually write games!) but I was very interested after reading in another post here about how much better it is (faster) to use DirectDraw than using BitBlt for a scroller game. And of course the Direct3D and DirectPlay


general info on DirectX 7/8/9 and vb -
hi all. I have never used DirectX to write a game (since I don't usually write games!) but I was very interested after reading in another post here about how much better it is (faster) to use DirectDraw than using BitBlt for a scroller game. And of course the Direct3D and DirectPlay


DirectX in multiple windows!!! -
I am new to DirectX. Can anyone explain to me how to setup DirectX if I would like to use it in many windows. Should I set up the DirectX7 and DirectDraw7 vars as public vars in a module or should I declare individual DirectX vars to each of the windows (general declarations)? Right


DirectX run-times -
I just wondered if P&D or Inno automatically check to see if DirectX files need to be installed, and install them? Randem, are DirectX included with the Auto OS Updater? I think that would be cool if it was. I understand you have to do it yourself from the SDK.


DirectX in window -
How can I create a VB app that runs directx but does not switch the system in "directX" mode. I want one window in my application to run directx but I want standard menu bars and other standard VB windows thanks - kurt


Should I learn DirectX -
Well I'm a sophmore(10th grade) and in the middle of my geometry course. Should I attempt in learning DirectX? I have been programming in VB for 2 years and have done some isometric engines but just with windows api, and been programming in C++ for 8 months now. Should I wait till i ge


DirectX Shell Replacement -
Hi everyone, I have read that Vista uses Aero which renders the desktop in directx 10. I would like to write my own replacement shell for vista that also uses directx 10. Does anyone know how to render the contents of a window in directx?


DirectX for C# -
Is there a website that is similar to DirectX for VB, except for C#? Also what are the (dis-)advantages of XNA over DirectX in C#?


DirectX Namespace in .Net 2003 -
I am trying my first DirectX project and so I downloaded the SDK and it makes references to the Microsoft.DirectX namespace that I don’t seem to have access to in my framework. Anyone know where to get like a development copy or something?


Accessing DirectX 9 through VB -
How do I get the DirectX libraries to appear when I choose Add Reference for my project? I just installed DirectX using the file directx_9c_redist.exe downloaded from the Microsoft website and I still can't see the components in add/reference. Do I actually need the SDK or wha


[2005] Why can't I import directx -
I have this example that works using directx but for some reason I can't import Microsoft.DirectX. Do I have to refrence something in paticular or add something to visual studio I googled but could find an answer.


DirectX-Just Click On This -
Where can i go to learn some directx. I see all these sites that have examples that you can download, but that's it. There are sites that show you books that you could go buy, i don't want a book. I need a good site or tutorial that actually teaches you directx.


DirectX-JUST CLICK ON -
Where can i go to learn some directx. I see all these sites that have examples that you can download, but that's it. There are sites that show you books that you could go buy, i don't want a book. I need a good site or tutorial that actually teaches you directx.


2D Graphics in DirectX -
Can anyone help me as I am trying to either find a 2D DirectX Engine or some tutorials so I can make my own. I have a lot of experiance with VB but not a lot with using DirectX so a Engine would probably be best but if I can't get one I don't mind making my own. Thanx for anyone th


DirectX 9 has me stuck.. :( -
After attempt after attempt I've found that I can not get directx 9 functionallity through visual studio. I've installed the SDK and directX 9c, yet upon coding a simplistic project in VB .net the compiler can't find the namespaces I've specified. If anyone can offer me tips I'd be g


Which DirectX is best -
I have worked with DirectX 7, but want to start using C++ 7 with either DirectX 8 or 9. I have heard some rumor that 8 was much different from 7, but that 9 came closer to 7. With all that flopping around, I figure somebody here will have a preference between the three. So I have tw


Getting DirectX version -
I am creating a game that requires DirectX 7, how can I get the DirectX version(if lower than 7, DX setup will start)?


OpenGL & DirectX -
Anyone know how to create a DirectX window? I would skip DirectX all together, if i could find a OpenGL sdk for visual basic.. Anyone know of any?