PDA

View Full Version : Microsoft Visual Basic 6.0



D-man
05-09-2007, 06:44 PM
well i am wanting to see how many people here use this and are good with codeing in it. i could use some help on some program i am making in it.

Gr1mmy
05-09-2007, 07:30 PM
You shouldn't post a request like this on an anime forum. Even if this is miscellaneous. Find a geek forum and post stuff like this. There will be people who would gladly help you there.

Manhattan_Project_2000
05-09-2007, 09:02 PM
I know some VB.net, so there is an off-chance I might be able to help.


You shouldn't post a request like this on an anime forum. Even if this is miscellaneous. Find a geek forum and post stuff like this. There will be people who would gladly help you there. While it isn't the main focus, there are a number of programmers on here. And this is a geek forum. Any forum where discussions over who the best Sailor Scout take place is a geek forum by default.

Eris
05-10-2007, 08:37 AM
It's really sort of antiquated. You should try to obtain a new version, or maybe find an alternative. Either get VB.Net (which will cost an arm and a leg), or find some open source alternative, or even better, scrap basic all together and go with python (http://en.wikipedia.org/wiki/Python_%28programming_language%29) (which is just as easy to learn, and just as capable of creating powerful applications.)

Anime is poison
05-10-2007, 11:16 AM
You shouldn't post a request like this on an anime forum. Even if this is miscellaneous. Find a geek forum and post stuff like this. There will be people who would gladly help you there.

If it fits the topic, let it go. Thats not to say he'll get endless replies, but it certaintly can't hurt to give it a shot.

I had a 15 week course on Visual Basic and have a book that could help ya a lot. If you have any questions on it you can PM me if you want and I can reply a lil later when I get home (I don't have the book on me, I'm in a different class, lol). If you have worked with QBASIC you should have no problem getting started. If you haven't, I can help you out with that as well.

氷の動物
05-10-2007, 01:26 PM
I agree with Eris you are using a fairly out of date version of VB, but if your questions are in regards to just basic programming fundamentals, data structures, etc. I could probably help; if your questions are more geared towards the VB language itself the MSDN help library (which you can access online: www.msdn.com (http://www.msdn.com)) is always a helpful resource. Also similar to what Eris said very few people actually use VB because it isn't a very fast language... its easy to learn which is why it is usually used as an introduction to programming, but if you go further into programming you will almost indefinitely use some other language.

D-man
05-10-2007, 07:52 PM
If it fits the topic, let it go. Thats not to say he'll get endless replies, but it certaintly can't hurt to give it a shot.

I had a 15 week course on Visual Basic and have a book that could help ya a lot. If you have any questions on it you can PM me if you want and I can reply a lil later when I get home (I don't have the book on me, I'm in a different class, lol). If you have worked with QBASIC you should have no problem getting started. If you haven't, I can help you out with that as well.

i have not taken QBASIC but i have a book on it. (have not read it) but i have taken a class on this vb. and i have a book but it does not help me a lot.

i know VB is not the best. but it is one i know a little in. and i have it. i have been thinking about going in to C++ and/or python but that will cost me some money. and i dont have that right now.

ok well im looking for some code that will move code from one button to another randomle. like i have 3 exit buttons one with the right exit code and the other 2 will not let you out. after each button is click the code moves to a diffrent button. that is what im looking for.

Manhattan_Project_2000
05-10-2007, 08:53 PM
I'm not even gonna ask why you need this...

How about... [in semi-psudocode]
500
Define exitFlag0, exitFlag1, exitFlag2 as Boolean [These should actually be defined to be used anywhere in the form (Do they use forms in VB6?) and not just in a particular event]

[Then, in the code that executes when the form[?] loads]
Define randomNumber as Integer

randomNumber = [Random whole number between 1 and 3]

If randomNumber = 0
exitFlag0 = True

If randomNumber = 1
exitFlag1 = True

If randomNumber = 2
exitFlag2 = True

[Then, in the exit buttons code write something like...]
[For exitButton0]
If exitFlag0 = True then
exit.sucka.4real
else
laugh.manically [Or whatever else you plan to do]
500

This seems better then what it sounded like you were asking.

D-man
05-10-2007, 09:45 PM
do you know of one that is a little smaller. i have like over 190 buttons

Manhattan_Project_2000
05-10-2007, 10:18 PM
Umm. No. That's about as few lines as you possibly could use, or at least not far off.

And... Why the heck do you have 190 buttons?

Eris
05-11-2007, 02:23 AM
i know VB is not the best. but it is one i know a little in. and i have it. i have been thinking about going in to C++ and/or python but that will cost me some money. and i dont have that right now.


Uh? Both c++ (through gcc) and python are free, and there is plenty of learning materials (http://wiki.python.org/moin/BeginnersGuide) for the latter.

D-man
05-12-2007, 09:16 AM
Umm. No. That's about as few lines as you possibly could use, or at least not far off.

And... Why the heck do you have 190 buttons?

its a big funny game i made. you have to find the right exit.

D-man
05-22-2007, 10:30 PM
I'm not even gonna ask why you need this...

How about... [in semi-psudocode]
500
Define exitFlag0, exitFlag1, exitFlag2 as Boolean [These should actually be defined to be used anywhere in the form (Do they use forms in VB6?) and not just in a particular event]

[Then, in the code that executes when the form[?] loads]
Define randomNumber as Integer

randomNumber = [Random whole number between 1 and 3]

If randomNumber = 0
exitFlag0 = True

If randomNumber = 1
exitFlag1 = True

If randomNumber = 2
exitFlag2 = True

[Then, in the exit buttons code write something like...]
[For exitButton0]
If exitFlag0 = True then
exit.sucka.4real
else
laugh.manically [Or whatever else you plan to do]
500

This seems better then what it sounded like you were asking.

i tryed what you said and this is the code i came up with.

Option Explicit
Private exitflag01 As Boolean
Private exitflag02 As Boolean
Private exitflag03 As Boolean

Private Sub exit1_Click()
If exitflag02 = True Then
Unload Me
End If
End Sub
Private Sub exit2_Click()
If exitflag01 = True Then
Unload Me
End If
End Sub
Private Sub exit3_Click()
If exitflag03 = True Then
Unload Me
End If

End Sub
Private Sub Form_Load()
Dim intrandomNumber As Integer
intrandomNumber = Int(1 + 2 * Rnd)
If intrandomNumber = 0 Then
exitflag03 = True
ElseIf intrandomNumber = 1 Then
exitflag01 = True
ElseIf intrandomNumber = 2 Then
exitflag02 = True
End If


and it would not work. would you look at it and tell me if i mest up somewhere? the exit button is always the same one.

Manhattan_Project_2000
05-22-2007, 11:08 PM
Well, I just sent you a solution via PM... don't PM me if your going to bump the thread anyway.

D-man
05-24-2007, 08:46 PM
sorry but i did that so that other people might see it and might give me a reply. i did not know if you would get back to me or not.


ok well does anyone know where people upload there VB programs so that other people can look at them

Manhattan_Project_2000
05-24-2007, 09:25 PM
Well, SourceForge if you have anything serious. Otherwise, I'd start with these links (http://en.wikipedia.org/wiki/Visual_Basic_6#Tutorials).

D-man
05-24-2007, 10:18 PM
i was thinking about a timer. anyone have an ideal how i can make it run of a timer. maybe.