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.

Its never actually said what language, it just said in Visual Basic. Thats the only program I'm using, and yeah..
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

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.

This article has been dead for over six months. Start a new discussion instead.