Moving Balls To Moving Images??
Please take a look at this as it is related to my question Thread
is it possible for the create images to be an image type that is already drawn?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Moving Images
Example Code (moving up):
Code:
Private Sub cmdUp_Click()
imgImage.Top = imgImage.Top - 100
If imgImage.Top < 0 Then
imgImage.Top = 11520
End If
End Sub
Example Code 2 (moving left):
Code:
Private Sub cmdLeft_Click()
imgImage.Left = imgImage.Left - 100
If imgImage.Left < 0 Then
imgImage.Left = 15360
End If
End Sub
Question:
How would one move imgImage Up & Left
Moving Images
Hi, I'm somewhat new to Visual Basic 6.0, and I'm trying to move an image on a form. That I have done, and I am moving the image via the arrow keys (with the KeyDown procedure), but the problem is that when you press down one of the arrow keys, ya know how it always registers once, and then if you keep holding it down, it registers as a constant stream of input by that key. Umm.. for example, in Microsoft Word, if you hold down the "a" key for example, the program types one "a", then pauses for about a little less than a second, and then proceeds to output a constant stream of A's. Sorry if it is a little hard to understand, but that is what I want to get rid of. My program (which is basically a spin-off from Lunar Lander) moves the rocket image up on the form when the user holds the up arrow key. However, when the user holds the up key, I want it to move the image up at a constant speed, not go through the KeyDown procedure once, pause, and then go at a constant speed. Can anyone help me?
Moving Images
when i move a image around the form it blinks every so often, especialy if i move it fast or it is a big image, what is causeing this problem and how do i fix it.
could the reason be tha i have not compiled the program yet and i am still using the play feature to run it?
Moving Images
Hi,
In my application I need some images to move from one place to another. I did this with by changing the values of the top and left properties in intervalls. Like so:
Code:
Private Sub tim1_Timer()
If img1.Top < 6360 Then
img1.Left = img3.Left - 300
img1.Top = img3.Top + 300
Else
tim1.Enabled = False
Exit Sub
End If
End Sub
The problem is that the image keeps blinking while it moves over the from. I ain't surprised, this I know is one of the simplest way of getting controls to move.
DirectX and such things are too advanced for me, so do you know of any solution that is more simple?
Regards,
SiMoN
Moving Images
I have four Images on my form. Is there a way i can make them move randomly in the form?
Moving Images
i am writing a simple program that has a moving image. i want to add another image that moves randomly around the screen. how do i make the images start at random places on the screen. then move the second image move at random.
Moving Images
Hi People,
I'm enclosing a project that has four images. When you click on one of them, it should show the others moving towards where the clicked image is.
To see exactly what I mean, go to Zone.com. Once there, click on hearts and play the game. Once someone wins a hand, you will see that happen. The project also explains better also what I am looking for. It cannot just simply change the left and top property to the clicked image because it needs to move toward the destination but not get there in one time. It should show new movement every approximately .1 seconds. It should be easy to change the variables so it can move faster or slower or even change how many moves it takes to reach the destination.
I'm trying to make a dynamic animation without using too much memory... any help please?
Moving Images
Hi all,
Some days before i put thread to scroll text on images like that only i want to move my images but the problem is that
I have 5 images, i want to move it in this way first image will move first when it move to half distance then second start then third, and when image reach to destination it will stop to move but others continue to move
I had store position(destination) of images,...
but the timercode troubles me lot
how to do anybody have idea, please help me
gary
here is that scrolling form
Moving Two Images..?!
is it possible to actual have two different keydown events such as A to move one picture and left to move another. so holding down A and left will move both pictures...
Moving Images
Hi guys!
Wizbang was so kind as to suppluy me with code, to move an image control along the edges of the form. it starts from the top left corner, moves right, then down, then left, lastly it moves up again and so the image continues.
What I want to achieve is to:
1) image start top right and moves opposite direction
2) image start at bottom right and moves left, then up etc.
3) image start bottom left then moves right etc.
I'm busy with (3), this is what I have:
Code:
Private Sub Timer1_Timer()
If Abs(D) > 60 Then
T = T + D / 2 'move up or down
Else
L = L + D 'move left or right
End If
If L <= 0 Then
L = 30
D = 120 'start moving down
ElseIf L + Image1.Width > Screen.Width - 60 Then
L = Screen.Width - Image1.Width - 60
D = -120 'start moving up
ElseIf T < 30 Then
T = 30
D = -60 'start moving left
ElseIf T + Image1.Height >= Screen.Height - Image1.Height Then
T = Screen.Height - Image1.Height - 60
D = 60 'start moving right
' L = L + Image1.Width + 2
If L + Image1.Width >= Screen.Width - 70 Then
L = Screen.Width - Image1.Width - 60
D = 120 'start moving up
T = T - D
Image1.Top = T - 100
End If
End If
Image1.Left = L
Image1.Top = T
End Sub
what happens here is that the image gets stuck in the bottom right corner.
How could I fix this¿
Moving Images
How do i get an image to move using key arrows on the key board? As well as change the image to a different image so it will apear to be walking?
Moving IMages With KeyPress
Im new to vb, and im having some trouble getting an gif image to move up,down,left,right, caused by a keypress.
ive tried code like this in a form Key ascii sub thing,im trying to get a Link sprite to move around
If KeyAscii= vbKeyUp then
imgLink.Picture = LoadPicture (app.path & "linkup.gif")
imgLink.top = imglink.top + 100
End If
when i run it and hit up, nothing happens. I also used that code style to get him to move left, right, down. still nothing. any suggestions?
Moving Images On Screen.
Hi,
I have series of buttons that create an imagebox with a set picture in it. What I now require is to be able to move the imageboxs created around the form.
The following code will move the imagebox around the form, assuming there is one (1) imagebox on the screen. Because the user can press the "create" button x number of times, is there away that will allow the u/m code to be for all image controls that are on a forward (without writing this code 1000 times).
Many thanks for your help.
[[[[code]]]]
Option Explicit
Private XOffset As Integer
Private XDrop As Single, yDrop As Long
Private YOffset As Integer
Private Sub Image1_MouseDown(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
XOffset = X: YOffset = Y
XDrop = Image1.Left: yDrop = Image1.Top
Image1.Drag vbBeginDrag
End Sub
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Image1.Move (X - XOffset), (Y - YOffset)
End Sub
Private Sub Image1_DragDrop(Source As Control, X As Single, Y As Single)
Image1.Move (XDrop + (X - XOffset)), yDrop + (Y - YOffset)
End Sub
Moving Images Up And Down In A Loop
im trying to create an image to move up and down.
here is the coding , imgbee is trying to move up and down
Private Sub cmdupdwn_Click()
Dim bolMovingRight As Boolean
Dim bolMovingDown As Boolean
bolMovingUp= True
bolMovingDown = False
imgbee.Left = intBeeLeft
imgbee.Top = intBeeBottom
Do
DoEvents
If bolMovingUpThen
imgbee.Left = imgbee.Left + 1
Else
imgbee.Left = imgbee.Left - 1
End If
If bolMovingDown Then
imgbee.Top = imgbee.Top + 1
Else
imgbee.Top = imgbee.Top - 1
End If
If imgbee.Left > intRightBoundary Then
bolMovingUp= False
End If
If imgbee.Left < intBeeLeft Then
bolMovingUp = True
End If
If imgbee.Top > intBeeBottom Then
bolMovingDown = False
End If
If imgbee.Top < intTopBoundary Then
bolMovingDown = True
End If
Loop Until False
End Sub
A Better Way To Do This (moving Images To The Left)
Hi,
I have an array of Images (4) inside a picture box and want to move them by click all to the left - see attached screenshot.
The following code works but it looks ugly
Code:
Private Sub Command1_Click()
Dim lLeft As Long
lLeft = Image1(0).Left
Image1(0).Left = lLeft + Image1(0).Width
lLeft = Image1(1).Left
Image1(1).Left = lLeft + Image1(1).Width
lLeft = Image1(2).Left
Image1(2).Left = lLeft + Image1(2).Width
lLeft = Image1(3).Left
Image1(3).Left = lLeft + Image1(3).Width
lLeft = Image1(4).Left
Image1(4).Left = lLeft + Image1(4).Width
End Sub
Isnt there a better way to do this ??
regards
Ranma_at
User Moving Images...
Ok, what I want is for the user to be able to drag and drop boxes which contain pictures and text... I'm not sure how to create such an item...
Thanks for your time.
Flickery Moving Images
Can anyone explain why, when in the attached app you draw a square the left and top change.
Mousedown
drag to draw shape
mouse up to finish
Best Way To Do Diagrams/ Moving Images?
a Chara,
The App I am going to be working is a Science/ Biology one. There will be a lot of moving images, visual experiments, as well as colourful diagrams etc.
Well I'm wondering the best way to do it - particularly the moving images (for example, a moving arrow through the arteries, indicating blood flow of the heart...).
I think the best way is to make the images a flash movie, and then to include the flash ocx with my program.
Any better ideas? Just wondering in case I notice I've blundered 10 months into the project.
P.S: If I include the ActiveX control is that enough? (Do they have to have Flash player on their system, or will the ActiveX control suffice?)
P.P.S: I don't suppose anyone knows if it's possible to convert flash movies to Realaudio files?
Gur a maith agaibh, a chairde.
Moving Images Vertically
Hello, how can I move an image vertically.
i.o.w. I want an image to move down to the bottom of the screen, then, when it reaches the bottom of the screen, it must move to the right(the width of the image control) and then move up. When it reaches the top it must shift up again and move down.
How can I do this¿
My main problem is with the move function
Thanx
F. T. W.
Problem With Moving Images
I'm writing an RPG in VB and i'm having a little problem...
I'm using tiles to print the main screen layout using the PaintPicture method.
The character is an image box that holds the current image of the character...
The problem is that when the character walks over top of the tiles, the tiles get erased (The character gets moved using the top and left properties)
Is there a way to make the tiles stay when i move the character?
Thanks for any help...
PEACE
Code For Moving To The First Blank Cell In A Worksheet; Moving Left,right,up Or Down
I have created an application form as a userform in Excel. I need to send the data entered into my text boxes when the program runs to separate excel cells in a worksheet.
My problem is I can use code that will send the textbox entry to a specific cell eg. If my textbox is named Surname I can say
range("a5").value = surname but if I do that when I run the programme to enter the next record for someone else the first record will be overwritten.
I NEED A CODE LINE THAT WILL TAKE ME TO THE FIRST EMPTY CELL AND ALLOW ME TO MOVE DOWN OR TO THE LEFT OR TO THE RIGHT
Flicker Free Moving Images? (Sorry!)
I've created a form where you use the arrow keys to move an image around on top of another image to select your name, this'd be what mine:
http://graalubb.hypermart.net/UpperNameK.jpg
The problem is that it flickers and I'm really not familiar with anything that'd do this as I'm new ^_^;; Anyone mind helping me out somewhat? As in how to stop the flickering~ Well, thanks ^_^
Problem With Moving Images-for The Love Of God, Help!
Hi, this is my first post here. I have a vb game project due in a few days. It involves one of the characters from Metal Slug shooting at some evil kitties. Yeah, I'm kinda weird like that.
Anyways, call me stupid, but I cannot figure out for the life of me how to make my images scroll diagonally. Could somebody please help me out?
Bitblt Problems - Moving Images
Gday all,
Im learning some bitblt by creating a simple game; a space invaders type game but with a small airplane.
I have a basic tiling function for the ground and i have the plane moving around. though i want to have trees blitting and moving downwards to appear as though the plane is moving forward. im experiencing alot of flickering with my trees and the movement is not very smooth.
ive attached my project files, can anyone take alook and try and help me out and tell me what im doing wrong or what i need to do.
thanks
Images Moving To Follow Mouse And More?
I'm making a little western shooter game based on halo. I want instead of just clicking on something, you have a gun that you aim with the mouse.
Is there a way to make an image (the gun) to follow the mouse and make the mouse icon be a crosshair for the entire game? Also I notice that when images move their is sometimes little flickers on the screen or something like that, is there a way to get rid of that?
Moving Images In A Circle [Resolved Very Quickly]
Hello again guys!
I want to make a picture move around in a circle.
I put a picture on the bottom left corner of a form, then it moves up (to the middle of a form), once there I want the picture to "loop" like a circle - once it has gone through the "loop" it continues to move towards the top left corner of the form.
Any ideas¿
Flex Grid Problem.Inserting Images And Moving Them
Hi.
Would any1 be able to help me.I am doing a project, space invaders.I am stuck on 3 things.Inporting my images onto the flexgrid.About 20.all the same.Getting them to move across, down 1 row and back.Also resizing my flexgrid cells to the size of the images.Any help would be greatly appreciated.
Yours truly
a vb beginner!!
Moving Images From One Control Array To Another By Mouse Click - Resolved
Hi
Wondering if anyone can help?
I have two Control Arrays the first has 50 images in it all with pictures the second has five images in it all without pictures
What I’m trying to do is to move Images from one control array to another by clicking on the mouse button.
I have code set up in the Images DragDrop event allowing me to move the Pictures from the first control array to the second.
I find this to be very time consuming for the user and I think if they also had the option of clicking on the Images in the first Control Array to send the picture to the first available Image in the second Control Array then it would less time consuming for the user.
I can get the picture to move from the first Control Array to the second with the following code
Private Sub ImgDeck_DblClick(Index As Integer)
ImgDeck(Index).Picture = ImgP1Hand(Index).Picture
ImgDeck (Index).Picture = LoadPicture()
ImgDeck (Index).DragIcon = LoadPicture()
End Sub
Which seems ok as far as it goes but it doesn’t take into account whether the Image in the second Control Array all ready has a picture in it and if it does then it simply wipes over it.
What I want to happen is that if ImgHand(0) has a picture in it I want the picture to automatically go to the next image in the Control Array ImgHand(1) etc.. Until all the Images in the second control Array are full the maybe a MsgBox will pop up stating as many cards as possible have been selected.
Does anyone know the code for this?
Any help would be greatly appreciated.
Moving
i want to be able to have a pre drawn square in a corner of a form and allow the user to click and drag it to a new location. it sounds simple enough but i am struggling with it. does somebody have a tutorial on this stuff
Moving MDI Bar
I have created a Usercontrol as a menu, when the child forms are maximised the relevant control box for that form is above the Usercontrol, is there anyway to position it below the Usercontrol?
Edit: Ooops! Its an MDI form (maximised) with several children.
Cheers
Moving 360
how do you move a player through 360 so it walks the at 1 or 34 or whatever degrees ?
i attempted throught trig but it had its problems
Code:
Dim dir As Double
Const pi = 3.14159265358979
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyLeft
dir = dir - 10
Case vbKeyRight
dir = dir + 10
Case vbKeyUp
If dir = 90 Then
you.Top = you.Top + 10
Exit Sub
End If
If dir = 180 Then
you.Left = you.Left - 10
Exit Sub
End If
If dir = 270 Then
you.Top = you.Top - 10
Exit Sub
End If
If dir = 360 Then
you.Left = you.Left + 10
Exit Sub
End If
If dir < 90 Then
you.Left = you.Left + 10
you.Top = you.Top + 10 * Tan(dir * pi / 180)
End If
If dir > 90 And dir < 180 Then
you.Left = you.Left - 10
you.Top = you.Top - 10 * Tan(dir * pi / 180)
End If
If dir > 180 And dir < 270 Then
you.Left = you.Left - 10
you.Top = you.Top - 10 * Tan(dir * pi / 180)
End If
If dir > 270 And dir < 360 Then
you.Left = you.Left + 10
you.Top = you.Top + 10 * Tan(dir * pi / 180)
End If
End Select
If dir > 360 Then dir = 0
If dir < 0 Then dir = 360
End Sub
Moving
Ok Iam finding this really difficult to do. Iam able to move a shape upwards using this code.
Shape1.Top = Shape1.Top + Vy
When it reaches a specific point I want it to move in the opposite direction so I included this code.
If Shape1.Top = 160 Then
Shape1.Top = Shape1.Top - Vy
End If
I have put this in the timer but when top = 160 the shape stops moving. Why is this/?? Am I doing something wrong here??
Moving And Looking In D3d
Well, i have done a little 3d world and i want to be able to move in different directories and looking up & down at the same time. I made something, but if i look up(or down) and then turn left(or right) then it rotates the view so, that the camera turns on it's back (**** it's hard to say what you want, if you're not English)
Moving Down One Row
Hi all,
I've tried searching for what, I thought would be simple enough to do, a way to move down one row in my worksheet and select it.
I'm trying to read a table from a database and populate the data into a worksheet.
I've learned how to move to the left (ActiveCell.Next.Select), but after I have written the record, I want to be able to move down to the next row and to the first column.
Here's my code:
Code:
'Starting on row 2 because I have a header.
Range("A2").Select
Do Until rec.AbsolutePosition = adPosEOF
For i = 1 To rec.Fields.Count Step 1 'Loop as many times as there are fields
If ActiveCell.Column = 1 Then
ActiveCell.Value = rec.Fields(i - 1).Value
ActiveCell.Next.Select
Else
ActiveCell.Next.Select
ActiveCell.Value = rec.Fields(i - 1).Value
End If
Next i
rec.MoveNext
'Move down to next row and over to column 1
'I'd like to put "Range(CurrentRow +1 & Column 1).Select" here
Loop
Can't I do this without a row counter?
Any suggestions?
Thanks in advance.
Jason
Moving To Web With VB
If I was interested in integrating some vb into a web page, is it possible and how. Any sites you could recommend would be appreciated. I basically just need to know where to look for some direction in putting forms that function like vb listboxes on a webpage...ones that populate automatically...etc..
Or forms, when they are filled in to capture that data like textboxes..etc for use in building data files ...
Thanks in advance
Moving My Box
I have a shape (box) on my form that I want to have move across the the screen when I click on a command button. I've tried using the following on the command button but it will only work the one time:
Code:
AccVar = true
If AccVar then
Shape1.Left = Shape1.Left + 10
end if
I assume this is because VB only cycles through the code once (on each button click). I tried putting the IF statement in the Form Load but it didn't work because I assume code only triggers when the form loads. What is the best or any way of getting my box to move when the button is pressed?
Is there any tutorials on the web about moving objects in VB?
Moving
OK...
I wanna know how I can make a label move down whenever I press the down key...
can anyone help???
thanks...
Moving A Box ><
okay heres the deal. i have a series of images that are arranged like this
xxoxx
xxxxx
xxxxx
xxxxx
xxxxx
in a 5x5 grid of images (images are an array).
and i want to move a box around within them. what i have been doing is changing the image of each box when the user pressed the arrow keys.
so if they press 'down', the current box with an 'o' image in it would change to an 'x' image and the image below that box would become the 'o' image.
(BTW, using x and o is only for simplicity here, there is actually 5 images you can change from).
is there another way to do this? could i have one picturebox and add other pictures to that picture box and move them around within it ? is this possible?
Moving To .NET ???
I would like to ask if it is worth the move to VB.net.
I have a program in VB6 which downloads data from a dallas ibutton and simply writes that data to a .csv file for viewing in a spreadsheet.
I also use the mscomm control for hardwire communications to a microprocessor.
Is it difficult to adapt old code to vb.net ?
I have only a basic knoledge of programming, and do not want to create a monster by trying to upgrade.
Any thoughts and opinions would be appreciated.
Cheers,,,
Chris - Western Australia
Moving From VBA
Hi,
Being fairly new to programming my exploits have been largely based in Office automation using VBA. I have recently completed a project that uses Excel as the host and takes a couple of .csv files, compares and correlates the data and writes it to a worksheet prior to data manipulation and commitment to a Database.
For my next project I would like to build a stand alone app that basically does the same thing (but obviously doesn't involve Excel) but as I am not a 'trained' programmer I am not sure of the way in which a dataset should be built without somewhere to write it i.e. a cell in a worksheet.
Most of my data during the execution of the present program is contained within a number of arrays but the data is handled as a subset of the complete data.
What method would you suggest for this? Create a multi dimension array which basically functions like a worksheet?
Also the handling of writing the data to a Database is easliy handled via DAO at present from within Excel - does VB allow me to do this in the same manner?
Sorry for the general nature of the questions but I am more interested in how an experienced programmer would tackle this.
Thanks in advance.
Moving From DB To Other DB
Hi to all, I have this question:
I need to move some records from my database to other database (these DB's are equals), my porpouse is make a Backup for some records and minimize the size of the DB. I found in the MSDN library the clausule IN, but I don't know how use it.
Note: I'm using MS Access 2000 Databases
Thanks in advance !
Non Moving GIF's
Hello Everyone:
I am trying to use animated GIF’s in my form, but they are not moving? I know that they are animated because I can view them using the filmstrip option in MS XP? How did I make my Animated GIF’s start moving?
Thanks
Art
Moving To VB.NET From VB6
Hello, my boss is considering the idea of migrating to VB.NET. He asked me to do some research into the advantages of using VB.NET 2005 instead of VB6.
What can you do in VB.NET that cannot be done in VB6?
Any help will be appreciated.
Moving
I have a script that you can move your character around using the arrow keys, problem is it "moves" it there, so it looks all jagidy and not a smooth move. Is there anyway to make it smooth and not jagidy?
Moving A Pic..
First off, sorry for all the quesions lately, i thirst for knowledge!
now to my question.
Ive read around about moving a picture (lets just say a pic of the letter Y) or a label of it for that matter.
ive found the picture1.height and .width and stuff, but i cant seem to get them to work.
i also cant get the keyasiis for the ^ < > / keys, they dont print..
i just wanna get a letter or something to move around the screen, and build it into a pong game..
|