Jump to content


Photo

Attention All Visual Basic Programmers


  • Please log in to reply
26 replies to this topic

#1 Pandora Pacifist

Pandora Pacifist
  • Members
  • 10 posts

Posted 26 March 2005 - 03:01 AM

Hey everybody. I just completed a course in Visual Basic (Not actually a course, it was the Visual Basic for Dummies book. ^_^ ) and I do have a few questions. Note that all of these questions hopefully are answered as if using a client such as Nightmist, with the exception of it being offline:

A ) This is really basic, but how do you use code to display another form? This is irking me so much!

B ) What would be the best way to make a save file. Back when I was using Liberty Basic, I would just use a Random-Access File. I believe a Microsoft Access Database would do good, but I'm having some trouble figuring that one out.

Basically, that is all. If I run into any other problems, I'll be sure to post them. Thanks to everyone who responds.

(Note: JLH, if you will, I would like to know how the save system in Nightmist goes. I don't mean to pry, but I want to give the user the ability to just exit like you can in Nightmist while still saving all data.)

Append: How do you make a screen where text continuously flows, just like in nightmist? Also, how do you make a command box, like the one in Nightmist, accept inout and stor it in a variable?

Edited by Pandora Pacifist, 26 March 2005 - 03:20 AM.

"George Bush should say The End when hes finished cause he tends to ramble on."

Frank Calliendo

#2 Penguin

Penguin

    cummins powaaah

  • Members
  • 982 posts

Posted 26 March 2005 - 04:12 AM

What version of VB are you using?

#3 Sean

Sean
  • Members
  • 976 posts

Posted 26 March 2005 - 02:02 PM

Assuming its VB6

A- Form1(or whichever number).Show

B- Don't have a clue what your talking about. Il post if I figure it out.

Edited by Sean, 26 March 2005 - 06:22 PM.

Stadic Ingame...

#4 Prophet

Prophet
  • Members
  • 1772 posts

Posted 26 March 2005 - 03:47 PM

Sean for Form1.show to work you need to have form1 already in place I think he means creating one with code, if he doesn't then I advise he rereads his book ^_^

Edited by Prophet, 26 March 2005 - 03:48 PM.

Si Senior!

#5 Sean

Sean
  • Members
  • 976 posts

Posted 26 March 2005 - 04:13 PM

He said to display another form. But yeh you should read the book again. If it dosen't explain that, buy a better book. ^_^
Stadic Ingame...

#6 Xlithan

Xlithan

    Discord Moderator

  • Members
  • 1050 posts

Posted 26 March 2005 - 04:33 PM

Visual Basic for Dummies doesn't cover VB6, unless there is a later one i'm not aware of.

The way nightmist works, is that all data is saved server side, not client side. So if you exit nightmist, things are still running on the server. The client on retrieves information, it does not store it.

The most nightmist client stores is macros, skin data, and chat logs (if saved).

Really horrible book though, i wouldn't recommend it.

#7 Crane

Crane

    "Teh Gareth!"

  • Members
  • 4091 posts

Posted 26 March 2005 - 05:04 PM

The Show method displays a form, and putting ", 1" after it, I believe, makes the form show modally, like a message box, meaning you cannot move the focus to another form while that form is visible.

Databases are a bit trickier in VB, especially if done with pure code instead of a data control. Best bet is to read the help file on the OpenDatabase command and everything listed in the "See Also", and experiment!

The other option is the "Open" statement - if you are creating a brand new file, it is best top open it for Output.

P.S. I'm a bit rusty with Visual Basic these days; I tend to program in Object Pascal (Borland Delphi) nowadays.
The Crane Temple Chairman

Main crits:
Crane
Europa


Don't kill the messenger mathematician!

#8 Pandilex

Pandilex

    Administrator

  • Admin
  • 568 posts

Posted 26 March 2005 - 05:30 PM

If you want to create forms and other objects in code you should use an object-oriented language like C#.
If you build it, they will come.

#9 Simulation

Simulation
  • Members
  • 467 posts

Posted 28 March 2005 - 01:33 AM

C++ For speed.
Or learn assembly, it's just as fast I think.
Binary is good.
PHP, very nice.
Perl, not very good but ok to know.
HTML, basic you should know it.
VB, not a very good language to learn, it's usually for beginners.

The list goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on x918293872348728378.8 1/2
«¤Mêad¤»*

#10 Xlithan

Xlithan

    Discord Moderator

  • Members
  • 1050 posts

Posted 28 March 2005 - 02:15 AM

The Show method displays a form, and putting ", 1" after it, I believe, makes the form show modally, like a message box, meaning you cannot move the focus to another form while that form is visible.

you can also use vbModal too.

#11 Pandilex

Pandilex

    Administrator

  • Admin
  • 568 posts

Posted 28 March 2005 - 04:25 PM

Don't ever use Modal it's evil...
If you build it, they will come.

#12 Xlithan

Xlithan

    Discord Moderator

  • Members
  • 1050 posts

Posted 28 March 2005 - 04:29 PM

Don't ever use Modal it's evil...

lol, it works fine.

#13 Stotic

Stotic
  • Members
  • 530 posts

Posted 29 March 2005 - 01:50 AM

While your at it, learn Cobol. Damn, you better have some spare time.
We'll douse ourselves in gasoline and hang our bodies from the lampposts.

#14 Pandora Pacifist

Pandora Pacifist
  • Members
  • 10 posts

Posted 29 March 2005 - 02:42 AM

Thanks for all the help guys. The Form1.show command never was explained in the book, but while reading through it, I saw it in code example and tried. I have purchased a book about C# programming, but now I have to buy the 300$ Visual C#.net. I would use a free compiler, but all the ones I've found net Netframe and Netframe SDK (I'm not sure if that is the exact name.). Unfortuanataly, when you're running a 56k modem connection off of the crappiest internet service in your area, a 100 mb download isn't to friendly. In fact, I hate to download updates to Nightmist as well.

The reason I'm using Visual Basic (Version 6, by the way) is because I don't have the 300$ yet. I still want to have as much programming experience as possible.

When I say save file, think of a standard Ps2 game. You can save any progress you've made in the game up to the point where you saved. Since my text-based game is offline, I need to figure out a way to save it. While reading the book, I found that you can store variables in a database file using a built in tool in Visual Basic. Then, I could pull information out of the file using Basic code. However, I am unsure of how to do this, for the book doesn't go into detail (Like yuo guys said, that books sucks. I plan on getting another, better one.).

If you all could recommend a good book on VB programming, I would deeply appreciate it. Please note I only have access to Barnes and Nobles and Bordors book stores. I am running on a limited budget, so I don'twant to spend to much on them.

Thanks for all your help guys. Nightmist truly has the greatest players on the online gaming world.
"George Bush should say The End when hes finished cause he tends to ramble on."

Frank Calliendo

#15 Bubba

Bubba
  • Members
  • 128 posts

Posted 29 March 2005 - 03:30 AM

Thanks for all your help guys. Nightmist truly has the greatest players on the online gaming world.

Im Fatter....Flattered..
Yeah Thats Right... Im Bubba... The Drunk Redneck... The Man You Meet In Prison... The Pimp On The Streets Of L.A.

#16 Xlithan

Xlithan

    Discord Moderator

  • Members
  • 1050 posts

Posted 29 March 2005 - 04:25 AM

Thanks for all your help guys. Nightmist truly has the greatest players on the online gaming world.

Im Fatter....Flattered..

nutty professor lol.

learn VB, it's easy and good for beginning programs. just don't try to make something advanced with it, like a game for example lol. Plus, if you learn VB, you'll find ASP easy to pick up too, since it practically uses the same syntax.

OMG I HAVE A PM!

#17 Steam

Steam
  • Members
  • 395 posts

Posted 30 March 2005 - 12:22 AM

OHHHH the so many hoorors of remaking the nightmist game without actualy implimenting any code, takes me back to last year of feb lol now i am sticking to the good ol;d fashioned Complete texted MUD games, with the help of Jaruzel MUD32 ^_^
Mckay: I passed out from manly hunger

http://www.youtube.com/steam56

#18 Pandora Pacifist

Pandora Pacifist
  • Members
  • 10 posts

Posted 30 March 2005 - 03:14 AM

Well, I figured out the whole database thing. It was actually pretty simple. (To Europa, I am using BASIC code to do it, by the way.) Just a little tedious to store data in each field.

Anyways, my friend has voluntered to let me use his Broadband to let me get Netframe and Netframe SDK, so I'm hoping by the end of the week that I'll be able ti begin programming in C#.

Also, I've heard of the function of a DLL file. Would it be useful to go ahead and try to link what I've done in VB, or should I just start from scrap?

Oh, and by the way, If anyone wants to help a newbie on a game project, just contact me!

Edit: Oh, and, besides machine (binary) code and ASM langauges, what would be the fastest runnign Language. I believe its C#, but then again, this is coming from the person who can't even display another form. ^_^

Also, another question about VB. You know how the monsters in Nighmist attack and you attack them back? How do you get them to do that in real time, not by initiating a turn-based combat (i.e. Final Fantasy). I'm trying to figure out how to do that, but once again, my book sucks. I really regret wasting that 35$ on that stupid book. Oh, well, now I know not to by More Visual Basic for Dummies

Edited by Pandora Pacifist, 30 March 2005 - 03:24 AM.

"George Bush should say The End when hes finished cause he tends to ramble on."

Frank Calliendo

#19 TheNobleOne

TheNobleOne
  • Members
  • 74 posts

Posted 30 March 2005 - 03:24 AM

Well, I figured out the whole database thing. It was actually pretty simple. (To Europa, I am using BASIC code to do it, by the way.) Just a little tedious to store data in each field.

Anyways, my friend has voluntered to let me use his Broadband to let me get Netframe and Netframe SDK, so I'm hoping by the end of the week that I'll be able ti begin programming in C#.

Also, I've heard of the function of a DLL file. Would it be useful to go ahead and try to link what I've done in VB, or should I just start from scrap?

Oh, and by the way, If anyone wants to help a newbie on a game project, just contact me!

Edit: Oh, and, besides machine (binary) code and ASM langauges, what would be the fastest runnign Language. I believe its C#, but then again, this is coming from the person who can't even display another form. ^_^

C# from Microsoft is free. Download the .Net Framework SDK from microsoft. then install sharpdevelop ide. tada microsofts C# for free. the only thing you are buying from microsoft .net is for visual studio the .net compilers are free.

#20 Steam

Steam
  • Members
  • 395 posts

Posted 30 March 2005 - 03:59 AM

Well, I figured out the whole database thing. It was actually pretty simple. (To Europa, I am using BASIC code to do it, by the way.)  Just a little tedious to store data in each field.

Anyways, my friend has voluntered to let me use his Broadband to let me get Netframe and Netframe SDK, so I'm hoping by the end of the week that I'll be able ti begin programming in C#.

Also, I've heard of the function of a DLL file. Would it be useful to go ahead and try to link what I've done in VB, or should I just start from scrap?

Oh, and by the way, If anyone wants to help a newbie on a game project, just contact me!

Edit: Oh, and, besides machine (binary) code and ASM langauges, what would be the fastest runnign Language. I believe its C#, but then again, this is coming from the person who can't even display another form. ^_^

C# from Microsoft is free. Download the .Net Framework SDK from microsoft. then install sharpdevelop ide. tada microsofts C# for free. the only thing you are buying from microsoft .net is for visual studio the .net compilers are free.

Pandora Pacifist said here internet is slow, she just wants to borrow her friends Broadband to download quicker
Mckay: I passed out from manly hunger

http://www.youtube.com/steam56

#21 TheNobleOne

TheNobleOne
  • Members
  • 74 posts

Posted 30 March 2005 - 04:04 AM

He said to get netframe. I just simply told him that you can get the original Microsoft version for free and use a free ide. that is all ^_^

#22 Simulation

Simulation
  • Members
  • 467 posts

Posted 02 April 2005 - 03:23 AM

Yea, C++ is fast.
«¤Mêad¤»*

#23 Xlithan

Xlithan

    Discord Moderator

  • Members
  • 1050 posts

Posted 02 April 2005 - 02:19 PM

Yea, C++ is fast.

depends what you want to make. I defiantely wouldn't recommend server programming in VB heh. You don't need to write clients and servers in the same language for them to send data to each other. Anyway, C# is good, and apparently simple. I've yet to fully try it out though.

#24 JLH

JLH

    Administrator

  • Admin
  • 1771 posts

Posted 02 April 2005 - 10:28 PM

I recently learnt that when you compile VB programs, they compile down to C code (the compiler for VB is called C2.exe), which explains the fact that there is little difference in speed between various little test apps i wrote and compiled in both C and VB.
However, the VB compiler is probably not as good at converting VB to C as someone who is proficient in C.
Anything i post on here is subject to change at any time without notification to the board.

#25 Pandora Pacifist

Pandora Pacifist
  • Members
  • 10 posts

Posted 03 April 2005 - 01:38 AM

So I should go ahead and learn C#. Sounds fun.
"George Bush should say The End when hes finished cause he tends to ramble on."

Frank Calliendo

#26 Pandilex

Pandilex

    Administrator

  • Admin
  • 568 posts

Posted 04 April 2005 - 03:35 PM

VB isn't object-oriented. OO languages such as C++ and C# give much greater power to the developer. Used correctly your code is clean, efficient, and very easy to read. Unfortunately, VB code is almost always unreadable (hence why OS died).
If you build it, they will come.

#27 Xlithan

Xlithan

    Discord Moderator

  • Members
  • 1050 posts

Posted 04 April 2005 - 09:41 PM

VB isn't object-oriented. OO languages such as C++ and C# give much greater power to the developer. Used correctly your code is clean, efficient, and very easy to read. Unfortunately, VB code is almost always unreadable (hence why OS died).

unless you COMMENT YOUR CODE. VB can be readable if you're not a lazy programmer. But yeah, C++ and C# would be better. I just prefer editing my forms visually, rather than using object-orientation. Im lazy like that ^_^




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users