Create And Move A Circle In Maze?
Jun 25, 2012I'm a beginner in visual basic and i am working on a maze that that your are supposed to move a ball or circle using he arrow keys [code]...
View 6 RepliesI'm a beginner in visual basic and i am working on a maze that that your are supposed to move a ball or circle using he arrow keys [code]...
View 6 RepliesI'm doing a maze using VB10. its about moving a PictureBox between LineShape lines using buttons to move it. the problem is, can I make the picture not to move through the LineShape? if so how? or should I use something else other than the LineShape and another question can i save the progress of the maze and come back to it later? if so does it require using a database to save the location of the PictureBox?
View 3 RepliesI would like to be able to move mouse in a circle, given the height and width...
View 2 RepliesI have developed a program which continuously draws a circle using a timer. Now every time the circle gets displays it flickers and which is because i have used me.refresh. Is there any other way to avoid this flickering.
Here is my code
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
Me.sweepAngle += 1
If Me.sweepAngle = 360 Then
[CODE]....
i need a code the will draw a circle on a picturebox that will have the border color blue and the inside color black. i also need the same thing but for a square.
View 16 RepliesI want to create an image dot.png that is circle filled with white color.I used followin
Dim bmp As Bitmap = New Bitmap(64, 64)
Dim g As Graphics = Graphics.FromImage(bmp)
g.FillEllipse(Brushes.White, 8, 8, 48, 48)
bmp.Save("d:dot.png")
I would like to obtain following image:
[Code]...
I need to create an on-screen shape (circle) that has a fill color, which will blink every X seconds (go from fill color, to white, back to fill color). This is trivial to do...BUT... i want to do it in my own class, so that I can instantiate it numerous times passing it unique coordinates for each instantiation.
How do I do it? Can a class have its own "timer control" in it independent from the form? How would I draw a shape from a class?
I'm building a maze application in visual basic. The game relies on two variables, X and Y which are integers. There's a timer which basically invalidates the whole form for a redraw. Now my question is, that there are various squares and rectangles dotted around the form. How would I create a handler, or something as such to detect if the square that the form draws is touching these objects?[code]...
View 1 RepliesI'm currently making a very basic 2d maze in vb.net...How would I go about making the walls to navigate around? I had the movement code down for the most part I'm just having an issue wrapping my mind around randomly generating walls to navigate around. I'm looking to make a basic 2*2 grid.
Edit: I'm not sure if it is necessary for me to post the code I already have written...I just need very general help on how to go about making the 2d 2*2 grid that will be the playable area.
i wanta like is like a maze each time u click it exendese the line.the promblem is the walls and well i dont know how to draw line(+ a {} at each connecting point) and have the line not be able to pass the wall and if it pass it, it able to detect the shorts path of lines which u can set it on if off. for the training session.
View 3 RepliesI am making a maze game like the one shown in the how to, I recently discovered that if you hold the right mouse button a you can go through the wall. Is there a way to make the mouse lock and not move when the user trys to hold the button down
or
When the user releases the button it resets. Like in the web browser with
If e.KeyCode =
Keys.Enter
Then
e.SuppressKeyPress =
True
WebBrowser1.Navigate(ToolStripTextBox1.Text)
But with the mouse button when it releases send the cursor back to start.
i want to create program that rec mouse move and clicks.This is my code and when i debug my program without clicking she recs a lot of right and left clicks
[Code]...
I'm trying to work up a "Pacman" like game. I used multiple (Blue) RectangleShapes to draw a maze on Form1 and added a Timer and KeyPress event to show motion of the Picturebox ("PacmanImage"). The "Pacman" image changes depending on the direction it's travelling (also opens/closes mouth). Up/Down/Left/Right (and closed mouth) images are stored in imagelist1.
The maze has been set up with just enough clearance for the Pacman to fit between the walls. How can I check for any part of a Blue wall (RectangleShape) in the path of the Pacman? - I was thinking to take the position of the PacmanImage Picturebox and check (depending on the direction of travel) for the existence of a blue color in the appropriate rectangle on that leading edge. Ie: left travel would look at a rectangle defined as (x-1,y) to (x-1,y+25) and try to find the color blue where x/y are the top left of PacmanImage and it's image size is 25x25. Not sure how to do all this, but I think it's the right idea...
The ImageList has index/picture: 2/PacDown, 3/PacLeft, 4/PacMid, 5/PacRight, 6/PacUp (Indexes 0/1 are used for two additional pics not used for the motion of the Pac).
Code So Far:
Public Class Form1
Dim LeftRight As Integer = 180
Dim UpDown As Integer = 103
Dim Increment1 As Integer = 5
[code]....
i am try to create a game when i move a picture box around my form with a timer control i almost done every thing but the problem is avoiding the flikkering effect ?is there any way to avoid it?
View 6 RepliesI'm trying to create a zip file though vb.net and move files into it using the built in windows zip utlity. so far I can create the zip, but not able to move any files to it.Here's my code:
Dim emptyZip As Byte() = {80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}'Dim oApp As Object
File.WriteAllBytes("c:x.zip", emptyZip)
'The following code I found somewhere but doesn't work'oApp = CreateObject("Shell.Application")'oApp.Namespace("c:x.zip").CopyHere("c:Book1.xls")
I created a dataset.xsd and it contains two table adapters and these table adapters use stored procedure for select.in my vb form, i get value in text box and then fill table using tableadapter and pass parameter to sp. Till this point everything is working fine. Now these tables have relations and i want to create relationship and show the data from child table on basis of master table. How i can do it?
Example
Me.MasterTableAdapter.Fill(Me.dataset1.spMaster, 1) --1 is parameter which is passed to sp
Me. ChildTableAdapter.Fill(Me.dataset1.spChild,1) --same parameter is passed to child table.
Now i have the records in spMaster and spChild. how i create the relationship so that when i move thru Master the child have corresponding records?
how do i copy and move the entier contents of a directory to another ussing VB.net then also delete the files from there original directory?
View 1 RepliesI have three listboxes in an array and on form_load the listboxes initially select the fifth item in each listbox:
Private Sub frmSample_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For i As Integer = 1 To 3
Private Sub PictureBox1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
e.Graphics.DrawEllipse(Pens.AliceBlue, New Rectangle(New Point(0, 0), New Size(PictureBox1.Width, PictureBox1.Height)))
End Sub
I am trying to draw a circle in VB.Net, .Net version 4.Nothing shows up in the paintbox.
I creat audio video chat and when calling receivng video and client video is together...I want that client move his or her webcam video where want...as I know it name DROP&DRAP but I`m not know how to do it...
View 5 RepliesI have an assignment and I have to calculate the area of a circle. I have my textboxes and buttons but I don't know how to write the codes and I have followed the directions and the example in my book which is microsoft visualbasic 2008 step by step.
View 2 RepliesWhen I change the color of the circle it creates a new circle. How do I get it to change the color of the existing drawn circle?
View 6 RepliesI have created a program that Draw a circle and then you can move it around a picturebox. I have made code so that it changes colour but instead of changing the colour of the circle already been drawn it creates a new circle which when you overlap the original circle with the new circle it cuts part of it.So what I wanted it to do when I change the colour of the circle it changes the colour of the circle already been drawn instead of creating a new circle.
[Code]...
Also I can't use the X and Y coordinate input to move the circle to the entered coordinates.
I drew a filled circle using: pixFractal.CreateGraphics.FillEllipse(RedBrush, MyPoint.X, MyPoint.Y, 16, 16)
I expected the circle to be centered on MyPoint. Instead, it seemed to be drawn as though centered in a square whose upper left corner was at MyPoint.
I am making a whiteboard program. So far I managed to generate the ability to draw lines and other small things. The problem is that I want to make a circle that follows the cursor to display what a dot there would look like. I am aware of the creategraphics property of picture boxes, but when I do that the circle stays there and a new one is generated where the mouse is now (an expected result). My question is, is there a way to draw and delete circles as the mouse moves. Also, is there a more efficient way of doing this. I did try using the OvalShape found in the power pack, but I cannot figure out how to display that over the picture box, when I right click the oval nothing happens.
View 2 RepliesOkay, so I am making a whiteboard program. So far I managed to generate the ability to draw lines and other small things. The problem is that I want to make a circle that follows the cursor to display what a dot there would look like. I am aware of the creategraphics property of picture boxes, but when I do that the circle stays there and a new one is generated where the mouse is now (an expected result). My question is, is there a way to draw and delete circles as the mouse moves.
View 3 RepliesUsing Visual Basic 9 I want to draw a circle and gradientFill the circle using FillGradientStyle = Centraland a FillStyle = SolidWith the same results as can be achieved in The Power Packs 3.0 OvalShape.
View 1 RepliesI searched this forum for the answer before posting this and from what i have noticed there is no "simple" way ofcourse "simple" definition varies from one person to another
my definition of simple is something like this Line(x1,y1,x2,y2,color) or something like that.[code]...
How can I program a quarter portion of a circle, with points A and B ??
How can I code the red line on the image?
User launches the application, enters width of circle, then enters width and height of rectangle and presses the button. Then app draws the circle with rectangle inside of it (if it fits). App should output the coordinates x1;y1 , x1;y2 , x2;y1 , x2;y2 (corners of rectangle) somewhere on form and would be great if it could post those coordinates on x and y axes (optional).
View 23 Replies