Help!! Moving An Image On The Screen
I am wanting to do it so when someone clicks on and image they can move it any where on the screen,and when they release the button the picture stays in that location...
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Moving An Image To Move Another Image
Im creating my first small program for my assignment and ive done the design and code, just havign trouble with another part if anyone could help me please.
Here is my whole code first off.
Code:
Option Explicit
Private Sub cmdBat_Click()
While imgBall.Left < imgBatter.Left
'Moves the ball away from the bowler
imgBall.Left = imgBall.Left + 1
'Comment
DoEvents
Wend
'Comment
While imgBall.Left < imgBatter.Left
'Comment
imgBall.Top = imgBall.Top - 1
'Comment
imgBall.Left = imgBall.Left
' Allows the user to respond to another button
DoEvents
Wend
End Sub
Private Sub cmdBowl_Click()
While imgBall.Left < imgBowler.Left
' Moves the ball towards the batter
imgBall.Left = imgBall.Left - 1
' Allows the user to respond to another button
DoEvents
Wend
'Comment
While imgBall.Left < imgBowler.Left
'Comment
imgBall.Top = imgBall.Top + 1
'Comment
imgBall.Left = imgBall.Left
'Comment
DoEvents
Wend
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdStart_Click()
imgBowler.Left = 8400
imgBowler.Top = 960
imgBatter.Left = 840
imgBatter.Top = 960
imgBall.Left = 7920
imgBall.Top = 2520
End Sub
What i need to do, as the ball gets to the bat for the bat to hit the ball and move it back where it came from. Ive done so far that the ball goes past the batter and when the bat button is pressed the ball comes back to the bat and goes back again.
I cant work out how to move the ball back when the ball is moving and the button is pressed. Im not advanced in programing either, ive been doing it for about a year
Here is an EXE of the program so far to demonstate
<link removed>
Moving The Screen With The Player....
In my program I've got a Point on the screen that can move at any 360 degree angle and has its physics like space....
But my problem is it moves around the screen ..I want the screen to actually follow the point....but still move around with the space like physics that ive given the point(a ship)
like diablo..how the screen follows the player around with the player in the middle...
Moving An Object Away From The Screen
say i want to move an object farther away from the screen, like going into the distance, right now i got a cube with a black screen and i want it to move back, right now i changed the the z corodinates but it stays the same. should i change all the corodinates for every vertex, or just move the camera away from the object to make it seem like its moving farther away?
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 Focus To A New Ie Screen
The problem is this. I am writing a program that pulls information from a website. One part of the information can only be pulled by clicking a button on the site which opens up a new window and the data is in that new window of ie. I can find the Hwnd of the new window no problem, but i don't know how to move control over to that new window so i can get the data from it.
I tried
Set oIE = SendMessage(lhWndP, WM_GETOBJECT, 0&, 0&)
but it doesn't seem to make oIE be that instance of ie.
Any thoughts? I've checked all over the search function but haven't been able to find something similar to this.
Thanks!!
Moving Objects Across Screen
ok so i have a picture that i need to move across screen but it cant hit the sides of the screen or barriers that i make with other pictures.
i have no idea how i would go about doing this i dont necissarily want code but if someone could point me in right direction that would be chill
Moving The Screen Or 'game Map'
I am totally confused on this problem and i hope someone can help.
On most games where you direct a little guy around the screen, the screen moves with the man when he hits the side of the window. Kind of like maps for the game. How on earth would I attempt to do this.
Thanks.
--------------------------
You just have to accept that some days your the pigeon and some days your the statue
--------------------------------------------------
'If a man ask you a question just reply 42, if he asks you what you mean, give him a calculater'
-------------------------------------------------
Longhorn is just like Labour, All promises and no show
Moving GIFs Across The Screen?
Hi all,
I was wondering if someone has any idea how to make some of my gifs (pictures)
move across the screen when someone runs my program?
Thanks,
Mike
VB In Excel Moving Screen
How can I get Excel to scroll so that a given cell, say f13, is the top left cell?
Sorry for the noob question. I'm used to Visual C++. Thanks.
Comparing Image From File With Image From Screen
hey, i was wondering if it is possible to look for a special image on my computer screen. i guess it would be similar like the function that looks for a specific color on the screen. anyone know how to make 1 to look for a specific image on the screen? im guessing u can call it image comparison with a specific image from a file or whatever, to an image on the screen.
For example:
i take a screenshot of my screen right now, i crop it out so i only have the image "Members List", please remember, its an image, not text. then i want to have the function look for that exact same image on the screen and return a true or false.
ne help?
Moving (Or Animating) Shapes Across The Screen???
I need to make a shape move from one position on the screen to another position.........at the click of a button. And I mean actually move, not just disappear from the first position and then re-appear in the new position within a split second.......It already does that and it looks ****, so I need actual "movement".
Now I know it's possible, but i've searched all over the net AND on msdn, but I can't find anything (plus I don't exactly know what I'm looking for.....word for word......so it's hard to search for it)
Does anyone know how to do this???
Moving A Borderless Window Around The Screen
Ok im using my own graphic images made in PS to make a nice interface for a game im makeing, however i dont want the windows style border around the screen so i set the borderstyle of the form to none, however when i run the program i find i cant move the window around the screen ne more. This could be annoying to some one useing the program cos the window would be stuck in one position all the time. So i was wonder if there was a way of moveing the window around when border style is set to none. Thanks for any help
Richtext Box Flickers When Moving Off Screen
I have an application where I need to move a full screen sized richtext box off screen (similar to a tele-prompter). I am getting a nasty flicker! Is there any way to maintain the text formatting of the RTF "and" eliminate the flicker when it is being moved off screen? I have done some research on BitBlt but I have not had any success getting it to work. Any suggestions would be greatly appreciated...
Moving Borderless Form Across The Screen
Hello Everybody,
I've a problem. I've made a program without a border(borderstyle=0) which contains a label which displays a name and the same name is the caption of the form, if the label.caption changes de form.caption changes. But the problem is because the form has no border I can't move it across the screen. Is there a way I can still have no border, but can move the program across the screen?
Moving A Form Just Like A Windows Screen Saver
Can we model an application in such a way that current active form becomes the screen saver- i mean moves across the screen and is always on top.What i understand here is i could make a current active form as always on top until any mouse event or keyboard event happens and moving it around until then.I not able to understand how to move the form around the monitor as if it were afloat.u r help is higly appreciated.
thank you,
-srikant
Moving Cursor To Specific Pixel On Screen
Hey guys. I have a pixel on my screen (1 pixel that can be located anywhere on my screen). What I want to do is I want the cursor to move to that pixel whenever i click one of my command buttons. The pixel color as a long value is 3706556. Could anyone help? I used GetPixel to scan the window for the pixel im searching for, and i used a nested loop to make it search both x and y positions. The thing is, it takes WAY too long and it lags too much to do that. Anyone got any better ideas?
Converting Screen Points And Moving Mouse
I got a problem. I have got some objects on the form and want to select them. But when the user clicks on the form I get an x and an Y, but those values aren't comparable with the .left and .height from the object, how to convert these?? My form scaleMode is on twips. DOn't say I must use the object_click porperty cause that's not wat I want.
And How to set the mouseCursor to a specific point on the screen. The positon of the object for example. I know there is something like SetCursor, but I can't get it working
Child Forms Moving Down Screen On Loading
Hi all,
I have a mdi form which currently has two child forms that are loaded from the menu of the mdi.
The problem is that when I open the mdi and load either of the child forms for the first time it is positioned correctly at the top of the screen under the toolbar of the mdi.
However when I unload then reload the form (either one) the form opens a couple of cm from the top. Each time I umload and reload the form(s) they move down the screen until they eventually appear at the correct position and the process starts again. There is no code etc in the forms resize event.
I've tried changing the forms from sizeable to dialod etc, and making their startup position to full screen which makes the form flicker before they appear on full screen.
Has anyone any idea how I can make the forms always appear in the correct position and if on full screen to stop flickering from standard size to full screen.
I'm training today but will check my mail when I can, thanks in advance for any ideas etc.
Graham
!UNRESOLVED! Moving Mouse To A Color On The Screen?
Hey, what I want to do is have my program scan the screen for a certain color. Say, FF00FF, pure purple. Once it has found the color, move my mouse to that pixel. If there are more than one pixels next to each other of that color (IE: a 4x4 square of purple) then move the mouse to the middle of that square. I found one way of doing it but it loops around the screen moving my mouse to every pixel of that color. I just want it to find the middle of a group of pixels that are a certain color and move my mouse there. And I'm not worried about if it see's 2 colored pixels that aren't next to each other, I can take care of that on my own. Does anyone know how to do this? Is it possible in VB? I'm sorry if you couldn't understand what I meant, it's hard to say. If I wasn't detailed enough please let me know.
Remember that this world is not reality. It's a playground of appearances on which we practice overcoming seems-to-be with our knowledge of what is.
ViRuaL
Edited by - ViRuaL on 6/14/2005 5:43:47 PM
Prevent User Moving Form On Screen
How does one prevent a user from moving a form around the screen in VBA?
<Edit> AbbydonKrafts - Moved thread to VBA forum </Edit>
Edited by - AbbydonKrafts on 11/3/2006 7:35:51 PM
Image Moving
vb6.0
Hi,
id like to know how to move a picture inside an picture box without moving the box but only the picture inside it. like, i have a 2000x2000 picture in a 400x400 picture box and wat i want is for it to show inside it and then i move the picture to see differ parts of it while the picture box remains in the same place.
Thank you.
Seeing The Image While Moving It
How to move an Image (or a PictureBox) over a Form and see the image, not only its surrounding frame, during the move phase. Basically, my code looks as follows:
[vbtemp]
Private Xi As Single
Private Yi As Single
Private Sub Card_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Card(Index).Drag vbBeginDrag
Xi = X
Yi = Y
End If
End Sub
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Source.Move X - Xi, Y - Yi
End Sub
Private Sub Card_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
Source.Move Source.Left + X - Xi, Source.Top + Y - Yi
End Sub
[/vbtemp]
The 'Card' is an Image (or a PictureBox) located in a control array. The code works fine, but I can't see the card face while I'm moving it.
Moving An Image
I tried borrowing the code from ?????'s pacman example
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'figure out where we WANT to go....
Select Case KeyCode
Case vbKeyLeft:
ShpTestShooter.Move -350
Case vbKeyRight:
ShpTestShooter.Move 350
End Select
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case vbKeyLeft:
ShpTestShooter.Move -350
Case vbKeyRight:
ShpTestShooter.Move 350
End Select
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyLeft:
ShpTestShooter.Left = ShpTestShooter.Left - 350
Case vbKeyRight:
ShpTestShooter.Left = ShpTestShooter.Left + 350
End Select
End Sub
arrrrggggh!!
how did he managed to get his pacman working???
My program refused to respond to my pressed keys
which are arrow buttonws
Put a breakline, it absolutely refused to go there
Image Moving
How can you get a picture box or an image to move across the screen. I'm guessing you can use a timer, but am not quite sure how to set up the timer. What I have is... a for next loop in a sub called PlaneMove (I call that sub in GameLoop). So, in this sub, I set the image.visible = true, and then the for next loop is
For i = 1 to MAXPLANEX (MAXPLANEX is the end of the form to the right)
Picture.move i, Y (Y is an int(Rnd) formula to make the y coordinate a random number)
Image.move i, 0 (I don't know why, but I can't get the picture box to move across the screen without an image moving across the screen also, but if I just have an image it jitters, and has problems.)
Next i
So anyway, the result of the for next loop is that it works, the Picture Box of an image of a plane moves across the screen very smoothly, but there is one problem. The whole loop has to go through before any other action can be done, and in this case in this game, Player 1 is a tank that has to shoot the plane, and it should be able to move left and right, and up and down, with the max y coordinate set at an integer so that it can't pass that integer. The problem is, the plane has to move through the entire screen, and only after it passes, will the tank move to the cursor position, and Player 1 can't shoot at all, because as soon as the plane goes through the loop and gets to the end of the screen, and once the new tank picture is drawn at the tank coordinates, the planeloop starts again, and therefore there is no time for the ball to shoot out and move. I'm guessing that with a timer, the plane can move through the screen, and Player 1 can do all of the other actions without any problem, but I just can't figure out an algorythm for the timer, so I'm just basically stuck in an everlasting loop... both in the game and in the code... any suggestions?
Moving A Image
here is my code:
Private Sub Timer1_Timer()
imgshield.Move Left - 100, Top + 1000
End Sub
i've placed my code in the timer and form coding areas but it still won't work... why won't it... I want it to move constantly I.E.: like this simple little "."
I want it to go like this:
. . . . . . . .
I want it to be constantly moving until I tell it to stop
P.S. my interval's set at 1000
Moving Image
anyone have a code snipplet for that I could place in a timer to make an image move (right to left) accross my form? thanks in advance!
Moving Image (gif)
How can I add a moving gif on my form?
when I do it with a picture box or image it wont won't move.
can anyone tell me how I can do this?
//golles
Moving An Image
Is there a way where I can drag an image anywhere i want on a forum and when i let go the image will stay there?
Moving Image
I want to devolop
a project in which i want to gif images they are moving means animated
but when i put them on label or imge control
they become constant means not moving how can i use the please give some
sugestion
Thanks
Moving A Image
How can i move an image left and right???I would imagine its simple but i suck at vb well i will apreciate the help ty!
Image Moving
I have an image control on a form, and I'm trying to get it to move.
I want the user to be able to either click/drag it to anywhere on the form, but can't get the right event/code combination. Anybody know how to move an image during run-time?
Thanx.
Moving An Image
hello all,
i m trying to drag an image from a specific place on the form,
and drop it on another .
how can i do that?
tnx
LirLir
Moving An Image Everywhere
can someone please help me i need to know how to move an image in all directions randomly such as right left up diagonally ect (RANDOMLY) please
Moving Image So It Goes Everywhere
i need it so when i press go ..
the image will move randomly everywhere
such as a bird.. so when i press go the bird will fly down up left right diagonally and it will do it randomly
PLEASE HELP ME
Moving Image Help
Hi everybody!
can anyone tell me agood way of making an image float randomly around the screen? i've tried 'do until ' and 'if then' without getting the results I want.
Thanks in advance for any suggestions.
Moving An Image
Thanks to the guy who helped me move the image around the screen by using the keys but i have another problem. How do i make it so that when the user presses the keyboards left arrow, the image moves left but changes to another image. e.g.
i want to move the elephant image left
when i press left i want to move the image but change the image to one that is of an elephant facing left
how do i do this with al the arrow keys?
Bunch O Timers - Moving Objects - Bounce Off Screen Edge
I'm sure it's been covered before . It's not that hard to do
yet I have issues . This is simple , Move the Object around the screen . The problem lies when it's moving to the right hand side . It seems to hit the wall then go straight up , yet on the left it works fine . I fail to see the error in my code and was hoping that you would have a look . The code is below .
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_GETTEXT = &HD
Private Sub cmd_StartRecord_Click()
End Sub
Private Sub cmd_StopRecording_Click()
Sleep 4000 ' 2000 milliseconds = 2 seconds to delay
Timer1.Enabled = True
retval = SetCursorPos(0, 0) ' move the cursor to top left corner
End Sub
Private Sub cmd_Start_Click()
Sleep 4000 ' 2000 milliseconds = 2 seconds to delay
Timer1.Enabled = False
retval = SetCursorPos(0, 0) ' move the cursor to top left corner
End Sub
Private Sub Command1_Click()
End Sub
Private Sub cmd_Stop_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
'Call the Formsontop function
'USAGE: Call formsontop(Me ,True ) -ONTOP MOST
' Call formsontop(Me ,False ) -NOT TOP MOST
Call FormsOnTop(Me, True)
'Set Initial Settings
Steps = 0
'Set the Steps Caption to the amount of steps
lbl_Steps.Caption = "Steps (" & Steps & ")"
Recording = False
Playing = False
'Get the screen Resolution
Dim x, y As Integer
x = Screen.Width / Screen.TwipsPerPixelX
y = Screen.Height / Screen.TwipsPerPixelY
Label3.Caption = "Screen Width =" '& x '& " TwipsPerPixel"
lbl_X.Caption = x
Label4.Caption = "Screen Height =" ' & y '& " TwipsPerPixel"
lbl_Y.Caption = y
Timer2.Enabled = True ' This captures the links
End Sub
Private Sub Timer1_Timer()
If IsOnScreen Then
'Call MoveMouse(GetX + 10, GetY + 10) 'Change Location of the Current Cursor
Dim retval As Long ' return value
retval = SetCursorPos(GetX + 10, GetY + 10) ' move the cursor
'//Updatet the text boxes
txt_CurrentX.Text = GetX
txt_CurrentY.Text = GetY
Me.Refresh 'Refresh the form1
If GetAsyncKeyState(vbLeftButton) Then Debug.Print "Left Button"
If GetAsyncKeyState(vbRightButton) Then Debug.Print "Right Button"
If GetAsyncKeyState(vbMiddleButton) Then Debug.Print "Middle Button"
If Not IsOnScreen Then
Putonscreen
End If
End If
End Sub
Public Sub TogglePlayrecord()
'This toggels the play and record booleans
If Recording = True Then
Playing = False
End If
If Playing = True Then
Recording = False
End If
End Sub
Private Sub txt_Steps_Change()
End Sub
Public Function IsOnScreen() As Boolean
'Get the screen Resolution
Dim xscreen, yscreen As Integer
IsOnScreen = True
xscreen = Screen.Width / Screen.TwipsPerPixelX
yscreen = Screen.Height / Screen.TwipsPerPixelY
xHold = GetX
yHold = GetY
If xHold + 20 >= xscreen And yHold + 40 >= yscreen Then IsOnScreen = False
End Function
Public Sub Putonscreen()
Dim retval As Long ' return value
retval = SetCursorPos(0, 0) ' move the cursor to top left corner
Call Flash
End Sub
Public Sub Flash()
Dim i As Integer
For i = 1 To 50
SendKeys "{NUMLOCK}"
SendKeys "{CAPSLOCK}"
SendKeys "{SCROLLLOCK}"
DoEvents
Next i
SendKeys "{f5}"
End Sub
Private Sub tmr_down_Timer()
If Not IsOnScreen Then Putonscreen
If Not Istolow Then
'Call MoveMouse(GetX + 10, GetY + 10) 'Change Location of the Current Cursor
Dim retval As Long ' return value
retval = SetCursorPos(GetX, GetY + 10) ' move the cursor Down
'//Updatet the text boxes
txt_CurrentX.Text = GetX
txt_CurrentY.Text = GetY
Me.Refresh 'Refresh the form1
If GetAsyncKeyState(vbLeftButton) Then Debug.Print "Left Button"
If GetAsyncKeyState(vbRightButton) Then Debug.Print "Right Button"
If GetAsyncKeyState(vbMiddleButton) Then Debug.Print "Middle Button"
If Istolow Then
'Go Up
tmr_up.Enabled = True
tmr_down.Enabled = False
End If
End If
End Sub
Private Sub tmr_left_Timer()
If Not IsOnScreen Then Putonscreen
If Not Istoleft Then
Dim retval As Long ' return value
retval = SetCursorPos(GetX - 10, GetY) ' move the cursor left
'//Updatet the text boxes
txt_CurrentX.Text = GetX
txt_CurrentY.Text = GetY
Me.Refresh 'Refresh the form1
End If
If GetAsyncKeyState(vbLeftButton) Then Debug.Print "Left Button"
If GetAsyncKeyState(vbRightButton) Then Debug.Print "Right Button"
If GetAsyncKeyState(vbMiddleButton) Then Debug.Print "Middle Button"
If Istoleft Then
'Go Right
tmr_left.Enabled = False
tmr_right.Enabled = True
End If
End Sub
Private Sub tmr_right_Timer()
If Not IsOnScreen Then Putonscreen
If Not Istoright Then
Dim retval As Long ' return value
retval = SetCursorPos(GetX + 10, GetY) ' move the cursor right
'//Updatet the text boxes
txt_CurrentX.Text = GetX
txt_CurrentY.Text = GetY
Me.Refresh 'Refresh the form1
If GetAsyncKeyState(vbLeftButton) Then Debug.Print "Left Button"
If GetAsyncKeyState(vbRightButton) Then Debug.Print "Right Button"
If GetAsyncKeyState(vbMiddleButton) Then Debug.Print "Middle Button"
If Istoright Then tmr_left.Enabled = True And tmr_right.Enabled = False
'Go Left
End If
End Sub
Private Sub tmr_up_Timer()
'If it's not on the screen put it on the screen
If Not IsOnScreen Then Putonscreen
Dim retval As Long ' return value
If Not Istohigh Then
retval = SetCursorPos(GetX, GetY - 10) ' move the cursor up
'//Updatet the text boxes
txt_CurrentX.Text = GetX
txt_CurrentY.Text = GetY
Me.Refresh 'Refresh the form1
If GetAsyncKeyState(vbLeftButton) Then Debug.Print "Left Button"
If GetAsyncKeyState(vbRightButton) Then Debug.Print "Right Button"
If GetAsyncKeyState(vbMiddleButton) Then Debug.Print "Middle Button"
If Istohigh Then
tmr_up.Enabled = False
tmr_down.Enabled = True
End If
'Go Down
End If
End Sub
Private Sub txt_CurrentX_GotFocus()
Me.SetFocus
End Sub
Private Sub txt_CurrentY_GotFocus()
Me.SetFocus
End Sub
Public Function Istohigh() As Boolean
Dim maxUp As Long
Dim CurrentUp As Long
Istohigh = False
CurrentUp = GetY
maxUp = 0
If CurrentUp - 40 <= maxUp Then Istohigh = True '
End Function
Public Function Istolow() As Boolean
Dim maxUp As Long
Dim CurrentUp As Long
Istolow = False
CurrentUp = GetY
maxUp = CLng(lbl_Y.Caption) ' this is Y of the screen
If CurrentUp + 40 >= maxUp Then Istolow = True '
End Function
Public Function Istoleft() As Boolean
Dim maxleft As Long
Dim Currentleft As Long
Istoleft = False
Currentleft = GetX
maxleft = 0
If Currentleft - 50 <= maxleft Then Istoleft = True '
End Function
Public Function Istoright() As Boolean
Dim maxRight As Long
Dim CurrentRightt As Long
Istoright = False
CurrentRight = GetX
maxleft = CLng(lbl_X.Caption)
If Currentleft + 50 >= maxleft Then Istoright = True '
End Function
Thank you ,
[]P
Can An ActiveX Control Detect When Its Container Form Moving On The Screen?
I need to know when my ActiveX control being moved on the SCREEN.
A "user control class" doesnt have such an event, and other controls only detect when they are being moved on the container form
Can an ActiveX control detect when its container form moving on the screen?
Can an ActiveX control detect the messages its container control (form)receive from windows?
Can an ActiveX control detect windows messages other than the events of the "user control" class?
plz help
Moving Image W/ Mouse
I wanted to have an image move according to the mouse cursor. I've managed to do that with a mousemove procedure on the form. However, the image moves fine on the right side of the screen, but the image doesn't move so smooth on the left side. I'm not sure why there would be a difference, and I cannot change the effect.
Moving Image- Flashes
Hi,
I've got a very simple program, where a image in VB moves around the screen. To get it to move smoothly, i've put a timer on at 1ms, and it moves 1 pixel every ms. It works great.
However, the image "flashes" as it moves- black lines appear down it- like watching a TV screen through a camera. I've tried changing it to 10ms, 10 pixels, etc, but that doesn't really help much, since it is jerky.
Moving Image Too Fast...
Im working on a game that sets a image's position every 500
milaseconds, it works fine just looks well.... dumb... it shows the image move over then down kinda like streaking it to its position, I think bitblit will fix this but id rather not get into all that if there is an easyer way and yes it is very inportent that it sets the position every 500 milaseconds
Image Loading/moving
I was wondering if there is a way to load or move an image from a different form.
For example, if I have a picture in Form2.frm and I want to be able to display that image in Form1.frm at different times during the program, what would I do? I want to do this so that I can just store all my pictures in a form separate from my game and just call the images whenever needed.
Any help is appreciated.
Thanks.
Moving An Image With The Mouse
hey all, just wondering if anyone could point me in the direction of moving an image by clicking on it, and while holding the mouse button down and moving it in any direction, how to change the properties of the image(in this case, the .left, or .top properties)
Thanks in advance.
Image Moving On Keypress
2 questions.. # 1, is there a KeyAscii for the arrow up down right left keys??
and #2, when i make Image1.left = image1.left - 25 , it moves but it flashes. Thats very annoying and ugly, ive tried transparent and not transparent, it always flashes. is there a way so it moves without flashing???
Making A Moving Image Go The Other Way?
Hey, Ive got an image moving around on my screen using option buttons, (up down left right) and I want, when it gets to a certain point, to go the other way. So say up is selected and it gets to y 3180 I want it to start going down. Ive had a go at the coding on the 5th line but it doesnt work, the other 4 do though. Can anyone help please? thanks
Private Sub Timer_Timer()
Dim original As Single
If OptDown.Value = True Then
ImgCross.Top = ImgCross.Top + 50
End If
If OptUp.Value = True Then
ImgCross.Top = ImgCross.Top - 50
End If
If OptLeft.Value = True Then
ImgCross.Left = ImgCross.Left - 50
End If
If OptRight.Value = True Then
ImgCross.Left = ImgCross.Left + 50
End If
If ImgCross.Top = 3180 Then
OptUp.Value = False
ImgCross.Top = ImgCross.Top - 50
End If
End Sub
Label In A Moving Image
is there any way to put a label or text inside a moving image so it contains some text in the center even when moving? This text will randomly changes everytime a certain event triggers
or I have to use the frame thing??
|