Hi! So, I'm new, and I had gotten this book on how to make an RPG.

Well, as I was typing the code, it underlined some words, but at that time I didn't think anything of them, and now its being a pain. DX

Here's my code that has some problems:
Dim device As Microsoft.DirectX.Direct3D.Device
Me.Size=New Size(800, 600)
Me.Text = ("DirectX Initialization Demo")
Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.Opague, True)

"Me" is being underlined in blue, and its saying its a Syntax error. How do I fix these?

I also have some other errors, such as "Declaration expected." errors, in which I have no idea what that even means. (: Please help me.

Are you developing in VB.NET project?? or C# project? please send us screenshot your code should work right!

Its never actually said what language, it just said in Visual Basic. Thats the only program I'm using, and yeah..
o-o
I'm just so confused. :/ Now I'm trying to re-write my code to see if its a code mistake somewhere but as soon as I typed the "Me.Size" ect, it was underlined in blue!

Okay, so, I decided to keep typing the code, and heres the code:

REM set up the presentation parameters
Dim params As New Direct3D.PresentParameters
params.Windowed=True
params.SwapEffect=Direct3D.SwapEffect.Discard
params.AutoDepthStencilFormat=Direct3D.DepthFormat.D16
params.EnabledAutoDepthStencil=True
params.BackBufferCount=1
params.BackBufferWidth=800
params.BackBufferHeight=600

all the "params", except for the very first one after Dim, is underlined in blue. It says "Declaration expected."
I don't know what that means..

Where you write this code?? I think you don't write them within method!! PLEASE SEND ME SNAP SHOT OF VS SCREEN SHOWS THE ERROR. It'd help me to help you!

You need to send him what he's asking for. Frankly, if all you're doing is copying code from a book to some software it's going to be VERY difficult for you to understand what's wrong.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.