Need Help Making Maze Program
Hi, I'm new to this forum, and mostly a novice programmer when it comes to VB. I've been looking for a way to build a mouse maze using 255 labels, but things I've tried haven't really worked. I have the "mouse" position indicated by a red label, and I've been using a for next loop with random number to generate a maze, like this:
For i = 0 To 255 'Reset all cells to white Label(id).BackColor = &HFFFFFF num = Int(Rnd * 100) If num > 70 Then Label(id).BackColor = &H0& 'Black End If Next i
It works, but then the problem is actually getting the mouse to move through the maze I've generated. The code I have is below, but I can't seem to figure out why it won't work.
Do Until position = 223 'Finish point is on Label(223) DoEvents position = 48 'Mouse starts on Label(48) If Label(position + 1).BackColor = &HFFFFFF Then position = position + 1 Label(position).BackColor = &HFF& ElseIf Label(position - 1).BackColor = &HFFFFFF Then position = position - 1 Label(position).BackColor = &HFF& ElseIf Label(position - 16).BackColor = &HFFFFFF Then position = position - 16 Label(position).BackColor = &HFF& ElseIf Label(position + 16).BackColor = &HFFFFFF Then position = position + 16 Label(position).BackColor = &HFF& End If Loop
I'm using VB 6.0 Professional Edition, and I'd like to have this done ASAP... can anyone help? Thanks!
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Making Restrictions For A Maze
Does anyone know of an efficient and easy way to restrict where you can move a character for a maze?? It would be well appreciated. Thanks a bunch.
Making A Maze - Help Needed!
I'm doing a VB6 project, basically anything I want, so I decided a maze might be a cool idea. I have a rectangle border and lines for obstacles in the middle. I have the outside lines working (you can't get past them) but I'm having trouble with the obstacles. I've made them into a control array (i), but quite honestly, I don't really know where to go from here. Could anyone give any suggestions? Thanks
VB Code:
Option Explicit Private Sub Form_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 87, 119 'w If Line1.Y1 - imgSnail.Top < 130 Then imgSnail.Top = imgSnail.Top - 300 End If Case 83, 115 's If Line3.Y1 - imgSnail.Top > 1440 Then imgSnail.Top = imgSnail.Top + 300 End If Case 65, 97 'a If Line4.X1 - imgSnail.Left < 150 Then imgSnail.Left = imgSnail.Left - 300 End If Case 68, 100 'd If Line2.X1 - imgSnail.Left > 1800 Then imgSnail.Left = imgSnail.Left + 300 End If Dim i For i = 0 To 9 If Line(i).Left - imgSnail.Left < 1680 Then imgSnail.Left = imgSnail.Left Else: imgSnail(i).Left -imgSnail(i) + 50 End If Next i End Select KeyAscii = 0 End Sub
Maze Program
I worte a maze program and i need the code so my image when it is moved it won't go through the lines.
Here is my code
Private Sub Form_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case ("w")
image1.move image1.left, image1.top - 100
Case ("s")
image1.move image1.left, image1.top +100
Case ("a")
image1.move image1.left -100, image1.top
Case ("d")
image1.move image1.left +100, image1.top
End Select
End Sub
Maze Program And Auto Mouse Clicker
I have 2 questions:
1. This should be easy to answer: i want to have the user's mouse go to an XY ordinate and click. does anyone no the function or code?
2. This should also be easy: I want to write a maze solver program. I need the code to be able to capture an img, find the starting point, and have an algorithm to solve it.
If anyone can help me with either of these, please reply or PM me!
If you haven't heard about the Amish computer virus, then i'll for sure not be the one to tell u...!
Larry's Maze Program (free Download)
Hi there.
In case you've ever wondered, there isn't a lot of money to be made in shareware. (At least, I haven't made much.) So the attached program is now free. It's not a virus, or spyware or anything like that. It generates several different kinds of mazes for you to solve.
http://pages.prodigy.net/lmmblake/larry.html
Please enjoy it, and say nice things. Sorry, but I won't post the source. I'm happy to answer concept questions, though.
LB
Making Program With Another Program Activex ??
Hi,
I have this viewing picture files program that beside the viewer when you install it, you install an activex (ocx)named by this program , and you are able to use it in vb6.
My problem is that I made a vb program containing this viewer activex , but the problem is when I want to make a package (setup file of my program) - I get problems with this activex when I try to install my program in other computers.
I think that it regard to the dependency of this ocx (activeX) I think that f I want to use my vb program in other computer I need to install this viewer program too, can you help me ?
Thanks , moyalt .
p.s I don't want to install the viewer in other computers , only my vb program (that contain the viewer activex).
Need Help With Maze
I am having trouble with a maze program i am creating... how do you make it so an image that can be moved around the form with the users keyboard stay within the walls of the maze.
Thanks for any help
Maze
Dazz, Here is my code and program.
2d Maze
ummm... i wondering if someone could give me the code to make a 2d maze where you cant go through the lines , and that you use an image that youmove through it.
Maze
Ok, my tutor has set me a maze program where I have write the pathfinding code. There are four functions (Up,Down,Left,Right) that check whether the next square is passable or not and four functions for moving the bot and one varaible that holds the last postion moved.. But every solution I've given him he says is wrong.
Here is what I tried.
1. Move randomly around the maze till the end. (Wrong)
2. Moves back at dead ends, Goes the right way round corners(not back again.), Moves randomly on T-Junctions. (Wrong)
3. Same as above but uses the X, Y variables of the end position to pick which way on t-junctions. e.g. If the end is five squares right and 2 squares up and it can move right, it will. (Wrong)
4. Same as above but uses arrays to remember what T-Junctions its been to and the routes of off the T-Junctions it has already taken. (Wrong)
Another thing is that i'm not allowed to create or use any variables apart from the "lastmove" one which is why 3 and 4 are wrong and all my code must be in the timer only.
He says that i'm supposed to not go the same way as before on t-junctions but if the bot has chosen a route gone a few squares, got to a dead end and gone back again. how am i supposed to know which way its been without variables?
I've attached one of my solutions.
If any one can help, please do. I'm not looking for someone to tell me the answer or do it for me, just a nudge in the right direction.
(By the way, my tutor won't help at all so please don't say ask him)
Thanks Alot, Ross
Maze
What i need is some code for a maze program so when i move my picture using the keyboard the picture wont go through the lines.
Maze
I am writing a maze game and i need to know how to code the lines so the picture can not move through them.
Maze
i am doing this project where we have to create a maze in 2d form. First i need to draw lines for maze then to make it. Can anyone tell me how to go about with this. Can I use depth first search algorithm to generate the maze??
Making A Program
Im starting a new program, its kinda like a popup and im just messing around with new code and stuff. Im trying to click a button and have a new window pop up in its place while the old one closes. Im also trying to add sound when the new window pops up. I was also trying to get something like confetti falling from the top of the screen or somthing. SO if someone could help itd be great. THanks
Need Help With Making Program..:)
First of all I would like to make somthing like: http://www25.brinkster.com/habbohavo...amacrotool.zip (not mine). How it works you open http://www.habbohotel.com/popupframe.html?123 (a chat based program in shockwave) and when you type somthing in the hobbamacrotool it says it on habbo... you will get my drift when you use it . Anyway i was wondring were I start making somthing a bit like that of my own......
I can make only small programs in visual 6.0 that why I need a little help
Thanks, SW5
edit:
http://www.xtremevbtalk.com/show...threadid=55113
This One Program I Am Making
Im making this one program for quake 3. It’s to add colors to your name. In quake the code to make your names into color is basically a "^" sign with the numbers 1 through 6 for different colors. for example "^1" makes your name red, and “^1Hello ^2Bob” would make Hello red and Bob green. In the program I want it to do this. I have a rich text box linked with command buttons that tell it to change the selected text in the textbox the color of the button you click on. How would I do the coding? I am thinking it would be a lot of If and Then statements. I have a text box at the bottom that when you press create it should write the code into the txtCode textbox. Any ideas?
Making A New Program...
hi
i'm currently starting to create (another) program but this time i would just like to find out whether visual basic is the best choice:
basically i am designing a program which i would like to store on CD and to automatically load up when the disc is inserted. the actual content will include flash files and information from a database...
i know some VB, C/C++ and am prepared to learn what i have to, so can anybody offer any advice on whether choosing VB ideal.
thanks alot
also if there is anybody out there who would like to keep in touch and help develop the program then plz contact me
®
Making An .exe Program
I was just wondering how would I go about making my program an exe so I can install and run it on other systems that may not have visual c++. I've got this program but I can only run it with visual c++ I know visual basic has where you can make your program an exe but does visual c++? if so where and how?
I Am Making A Program And...
hi
i am in the process of designing my program and now am ready to begin contstructing it on VB.
what i am working on at the moment is adding a button using the HoverCommand UserControl which i obtained from a link provided to me on this site.
i only have 2 questions - firstly i intend to use my program for commercial purposes (if possible) and i understand that i need to display some information about the original coders of the HoverCommand control >>> can anybody tell me what i should include in code or maybe within the program itself (like in help section...maybe?)
secondly i am actually not sure how to add the user control to my new project - is it a case of putting the control file into the same folder as my project and then copying the code over or what? i've never done this before and would like to know how i can begin putting it on my app immediately.
otherwise thx,
Need Help Making A Program
i have been trying 2 make a exe that when some one clicks on it will open a certin web page and have it start up every time the person starts there computer. here is the code that i have been puting in:
Private Sub Form_Load()
Shell "C:Program FilesInternet Exploreriexplorer.exe http://www. * * * * * * * * * * */page.php?x=1731571"
End Sub
when i do that it gives me an error " Run-time error 53 file can not be found" can some help me fix this problem or give me another code.
Making An AIM Program
I want to make a simple program with 2 textboxes and a button on a form. When you hit the button, it sends a message(designated by Text1) to a user on AIM(Designated by text2).
How would I do this? Would I need to learn how to Hook or would I need to learn to subclass? Or is there an alternative method? (Whatever is easiest)
Thanks in advance,
-Vinx
Need Help Making A Program
I'm not asking anyone to give me the whole source code for the application (unless you want to) but I need some help on how to do something.
I want to put together a small application that can read all of the desktop icon's property boxes and change the Target: location and the Start In: location.
Can this be done in VB? If so, what do I need (like API's, for example) and the general algo for it?
Making Of A Program
ok i didn't know, in which topic to post, so i posted here, because here is the most posts .
im interested in making a problem, which could go to some internet site, and click on one button, and that it would repeat doing it all the time like at every half an hour... so im interested, if it is possible to make it, and if any of you can make it, or at least teach me to do it ( but i never programmed, so that would be the hardest part to do)
thx, pakec
Help Making A Program
this is my first post and it will makes me look like a lazy guy but im really desesperated i want to make a program in visual basic 6.0 that makes any geometrical figure i really dont find a way to do it the program needs to ask you for the measures of the geometrical figure of your choice i have looking for any documentation that helps me with no success i know some of you are vb gurus and visual 6.0 may be obsolete for you and oudated but im a begginer and i need this for my school class.
thanks in advanced
Help Making A Program
I am making a program using Visual Basic. This program is going to be an IQ test and i was wondering...what would the easiest way be? I am an amateur programmer so i wont know how to do advanced coding. I can do simple/medium difficulty things. I was thinking about makeing a question using a Label and then everytime they hit the next button to switch the question. I would also have choices using the option button. I dont really know how to make it keep switching the question. Please help me figure out a better method or how to solve this problem.
Making VB Run A Program
I need to have VB run a totally seperate program....this program is not a VB program.
Wht is the command to run another program
Help is appreciated..thanks
-Hacker
Making A Program Run On Another Pc
HI
I have reasently completed an hnc in computing and as part of the course we were taught VB. the only thing that our tutor didnt tell us was how to get our newly written program off of my computer and working on someone elses. I have just written a small database program for a friend and would apprieciate any assistance that anyone can give me inorder that i can pass the finnished program to my friend.
Alan
Making A Program That...
Hey all. I am a hardcore level editor for a game Drakan: Order of The Flame. I have recently found a way to do something with the character files that allows new vertecies to be added to them using an ASCII editor. This process takes a long time and I am fairly new to Visual Basic Programming. I want to know If anyone would have a general Idea of what I need to do to make a program that:
1) Allows you to enter the Vertecies of one file
2) Merges or allows you to copy+paste them into another file
3) Creates and Saves a new file.
As of now, It takes about 2 hours to just add and texture one of these modified files. I am the only one that currently knows this technique but If I can make this program It could allow all other PCL creators to make new characters. I don't know if this is enough information for you to help me but if you need more Info I can give it.
I posted one of the files that I would like to be a "Production" of this program. They are the REC files and can be opened with any text editor.
Thank You,
Mage150
Making Help For My Program
I'm trying to make a robust help system for my program. Although, I'm not satisfied with the .hlp help files. Can anyone help with .chm files. I have created help in .html, how can I link this to my program. Such that if help is chosen from the Help Menu, it opens this .html file. Please help!
Help With Making A 2 Second Program..
In text1.text, theres some text:
"Hello" "test" hi hi "hi"
How can I replace each '"' with Chr$(34)?
So, it would look like
Chr$(34)HelloChr$(34) Chr$(34)testChr$(34) hi hi Chr$(34)hiChr$(34)
Making A Program That Looks A Little Like VB
Hey all. I'm working on a program that looks a little like VB. I need help for two things:
1) How do you make a certain word turn a certain color [eg in VB "Else" -> blue]?
2) How do you make the "Auto-Complete" menus [eg when you type text1.te and vb suggests .text]
Thanks a lot, any code or links to pages about these topics would be great, i have been scouring the net for ages already!
Making A Program Just With Api
HEHE...... sorry but I still know so little about API, and still got much to learn.
Okay.... i know how to make buttons and forms with just API, but what I want to know.... is how can you make a command for it, like, if they click the button..... APIs doesn't have stuff like "Command1_Click", "Text1_Change" etc.. How would you make one in API?
If you can't explain, any codes would be good enough..... or both should be perfect..... If none of the above then, "WHERE ARE THE API GURUs!?!?! HELP ME OUT!"
Thank you.
Help Me...Program Making For IE
Hi, I need help that in my program that goes like this:
Private Sub Command1_Click()
A = shell("C:@IEie.exe", 1)
AppActivate A
MsgBox "Please go to the website and enter the details, tab to go to sent button!"
Check = True: Counter = 0
Do
SendKeys "~", True
Do While Counter < 101
SendKeys "~", True
PauseTime = 10
Start = Timer
Do While Timer < Start + PauseTime
Loop
Finish = Timer
SendKeys "%{LEFT}", True
Counter = Counter + 1
If Counter = 100 Then
Check = False
Exit Do
End If
Loop
Loop Until Check = False
MsgBox "Done 100x"
End Sub
There is a problem in thius program as this is my first time using vb4 and my vb6 can't work as there say that I need to reinstall MSDN eventhough I fully installed it! (This is the 2nd problem I hope people can help me too...)
Firsty of all, this program has a click button, when clicked, will first activate the internet explorer, then stop to alert me and allow me to go to the website i want and go to the "submit" button on the website, then i can fill in what i want, then i press "ok" from the msgbox to continue the program and let it send "enter" to the "submit" button in the IE5.5 and then wait 10secs for the website to submit the details and then autorefers to another page in IE, after my vb wait 10sec, it will then SendKeys "%{LEFT}", True and so IE would go back to the "submit" page again. and the process repeats again for 100 times.
the problem i met in win98 is that IE keeps opening and opening and doesn't give me time to input the info on the website and i'm not sure if the keystrokes is working.
hope that someone can help me correct the thing above or at least suggest an alternatives...
this program which i want to create, main objective is to submit information on a website 100x. hope that someone can help me on that.
thanks alot
Making Your Program The....
How would I put the correct information to the registry that would make any files with a certain extension (.tov for example) open up in my program each time they are click on...
Need Help With A Program Im Making.
Hi im wondering if someone can help me with this program i m makeing and i need to find the fastest drive. im not really sure how to do it.
plz help.
thnx in advance
Way Of Making A Program
Hello to everybody, I am making a program which would keep track of my Cross Country training. I have made one but I am not fully satisfied with the way it works. Currently it saves the data into a text file, but i do not know how to load it back into the program witout the "" around my data. I am considering making another version which would save the data into some kinda of a database, maby an exel spreadsheet. Does anybody have any suggestings, ideas?
Help Making Program
i need help making a vb program that enables me to take a picture with my web cam save it and then close the program. i can close the program just fine but i dont have the code for accesing the video codec or saving a picture. in device manager the name of the video controller is "legacy video capture devices" the name of the th ecapture device is "WDM for windows capture driver (win32) any help would be nice email me at dcs115@hotpop.com thank you
Making The Program Pop Up
Hi again, does anyone know how to make the vb program pop up the moment i click on the powerpoint slide? As in clicking on my powerpoint file icon, then it immediately starts the vb program..
Maze Game
this is a maze game that i'm working for my sister who is near death. i would really like you to help me with the coding for the points. this game is very similar to pacman. but instead it has math questions where the user answers a math question. i would also like to have the character collect special bonuses..like food on the maze..to gain points. Can you help me with the coding. please see attached code
http://www.geocities.com/vbmaze/
Maze Tracer
I'd like to know is there a way or methods to race a maze for blockade. Thanks.
Maze Game
ok cool, finaly i start programming another game but this game is quite different,
Has anybody played that maze game in the Siemens Handphone (or should i say handset or mobile phone), it has this maze game that gives u a 3d effect giving u a feeling that ur looking for a way through mazes, well iam making a game similar to that, now comes in the decision time, what language or tool should i use, i have four options, 3DStudioMax, VB, Blender, or flash (which i dun think ill use as this game uses heavy graphics), can someone please advise me on what to use
secondly, has anybody created a game similar to this or anything that involves mazes
if iam using VB, will i be able to use 3D effects (maybe using DirectX?) or should i import graphics from 3DStudioMax or Blender
this is just the begining, lets hope the ending is more fun
Maze Generator
I would like to generate mazes with only one exit. I would like the hallways to be the same width as the walls.
I would like it to be in some kind of an array, such as in integer array something like this:
2101010 '2 is start
0101010
0100010
0111000
0000011
1111011
3000011 '3 is exit
Maze Thing...
I wanted to write a maze solver for a computer game. It would involve capturing a maze, finding the user's starting point, and then figuring out the shortest path and solve it. If anyone has any suggestions on useful code that would help, pls reply or PM me!
|