Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Make A Label Move


I've read on a few topics abt this in this forum and i have try the source code that have been suggested. Unfortunately it did not work on my project and i do not know why.
[code]
Private sub form_load()

ndName = txbFullName
lblUser.Caption = "You are now login as " & ndName

end sub

Private Sub Timer1_Timer()
lblUser.Move lblUser.Left + 1
End Sub[code]




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Make Caption In Label To Move Left & Right?
Hi ,
I need the captions in my label to move to the right and then appear from the left in the label, does any one know how?

Thanks

How Do I Make My Shape Move Left Up Or Down (i Already Know How To Make It Move Right
Hey, i don't know how to make my shape move up down and left. <^v. could anyone who know how to do it please help me?
i'm a noob at vb. i just started doin some things and up up to keypressing and stuff.
thx

Can Anyone Give Me Some Example Code To Make Move First,Move Previous...
hi all,

can anyone give me some example code to make Move First,Move Previous,Move Next and Move Last button.please help..tq in advance.

Move Label
How can I move a label when a button is pressed? It is at the bottom of my form and I want to move it up when a command button is pushed..how can i do that?

ty

Move Form Without Label
Hi!

My problem is how to make label always visible on a form, which could scroll left or right.

Form is something like planning board, and on left side of screen I have the name of component, which was on board.

When I scroll form left I want thets label whit component name move whit form and stay visible on left side of screen.

Now I use second form which is always on top.

Mouse Move On Label (VB6)
have 2 label, label1 and label2 in a form
how to use mousemove event for label1 and label2 with blu and red color.
Tks.

Move Label From Butom To Top
I want to move (visually) LABEL from butom of the form to its top

Making Label Move Across Form
Hello,

I downloaded an example of pong but i can't figure out which timer is used to make the ball in pong bounce off the walls since all three timers are simply labeled timer1, 2, 3. Does anyone have the code for a label to bounce off walls of inside a frame?

Move A Label Vertically Downwards On A Form
simple problem

I want to create a chessboard composed of labels, this works fine for the top row, but how do i employ the move function to move onto the next line


Private Sub Form_Load()

board.Width = 8000
board.Height = 8000
Dim c, lcount As Integer
Dim col As Boolean

For c = 1 To 7 ' do horizontal
Load lblsquare(c)
lcount = lcount + 1
If col = False Then ' for colour
lblsquare(c).BackColor = vbWhite
col = True
Else: col = False
End If


lblsquare(c).Height = (board.Height / 8) 'put square in correct position
lblsquare(c).Width = (board.Width / 8)
lblsquare(c).Move c * 1000
lblsquare(c).Visible = True


Next c

End Sub

Is There A Way To Move A Label/picture Withouth Blink? *RESOLVED*
Hey guys!

I am using this code to move a picture (I tried a label too)...

x = Image1.Left
While x > 960
DoEvents
Image1.Left = Image1.Left - 1
x = x - 1
Wend


Its working.. The only problem when it is moving it starts to blink...

I tried to use timer... But the same thing happens....

Any ideas to make the move clean, without the blinks?

Thanks guys!

Elminster

{solved} Move Window By Clicking/holding On A Label
hi,

can somone explane to me how to move the current window/form by clicking and holding on a label?

cheers,
Spunky



Edited by - Spunky on 9/23/2005 2:18:09 PM

Function To Move Form By Label - (W98 Ok , W2k Prob) *Resolved*
Hey VbCitizens, i got a problem with a function that works on Win98 but not on Win2k, can someone tell me if i need another declaration to get it working on both, or do i need to add a certain dll only found on Win98 orso?
I don't get any errors using it on Win2k, but it just doesn't want to move..., so i don't know what am looking for here.

Thanks at front.

Code:
Private Declare Function ReleaseCapture Lib "user32" () 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_SYSCOMMAND = &H112

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
       ReleaseCapture
       SendMessage Me.hwnd, WM_SYSCOMMAND, &HF012, 0
    End If
End Sub




=============================================
aka Red2048.

Edited by - T48 - [RedPlanet] on 3/2/2004 8:14:04 AM

Why Can't I Make It Move
why cant move my spaceship?it works in forms but when i used Bitblt it doesn't any more...


Codes i used:



Dim BScroll As Integer
Dim X As Integer
Dim Y As Integer
Dim SLeft As Boolean
Dim SRight As Boolean



Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode

Case vbKeyLeft
SLeft = True

Case vbKeyRight
SRight = True



End Select



End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Select Case KeyCode

Case vbKeyLeft
SLeft = False

Case vbKeyRight
SRight = False



End Select
End Sub





Private Sub Form_Load()
X = 0
End Sub

Private Sub Timer1_Timer()
Back.Cls
If SLeft = True Then X = X + 20
If SRight = True Then X = X - 20

BScroll = BScroll + 5
If BScroll > 600 Then BScroll = 0
BitBlt Back.hDC, 0, BScroll, 800, 600, Front.hDC, 0, 0, vbSrcPaint
BitBlt Back.hDC, 0, BScroll - 600, 800, 600, Front.hDC, 0, 0, vbSrcPaint


BitBlt Back.hDC, 0, 0, 800, 600, spaceship.hDC, X, Y, vbSrcPaint



In MODULE:



Public Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long

How To Make Something Move
if i have a text box, line, label, button etc.. how do i make it move across the screen?

Help Me Make This Move Please
hello, i've been trying to make my picturebox's picture to move. i put a gif but its not moving. how can i make a picturebox to have a moving image?

How To Make Bitblt Move?
can some one show me a simple code on how to make a bitblt move? thx

How To Make Something Randomly Move?
Can someone tell me how to make something randomly move. Lets say it is a picture on a normal form. How would I make that randomly move around the screen on it's own.

If you could give me tips on how to make it bounce and stuff that would help.

so I wanna try to make it simple because I get all confused when there is alot going on I learn by learning one thing at a time... so all I have is a blank form and a picture called picture1.

How Do I Make The Mouse Move?
Ya ya... without using my hands.

I want to write a short program that will move the mouse an inch or so. Any ideas?

Thanks in advance!

--DB

Make Images Move
I don't know why i don't know how to do this but, heres the situation.

I have an image, and i have command button. I want to click the command button and have the image move a little bit. I figured that you should use the Top or the Left thingy, but i dont know how to write it.

anyone wanna help me?

How Do I Make The Cursor Move ?
Hi,
I was trying to make a so called "clicker" program in VB6
The idea of it is for the user to click on the color box ( striped one on the pic ) and then to click on some point on the screen. The program should remamber that color and position. After pressing "start" it should automatically start clicking over that point.
Moreover, if the color of that point changes to another specified ( in the second color box ), the cursor starts moveing right untill it is over the first color and, after clicking on it, the cursor moves back to its originaly set position.

http://www.vi2.com/maxForumFiles/1_1...27_screeny.JPG

But how can I tell VB to detect the cursor positions and the color under it?
Couldn't find it anywhere, is it possible in VB?

Thanx

How To Make Some Words Move Up To Down Or Down To Up?
I wonder how to make some words or sentences move up to down or down toup in VB 6.0 ?

Any one have some hints?

Thank u

How Do You Make An Image Move?
I want to make a ball or something i draw to move across the form. How would I do this?

How Do I Make A Line Move
hey guys,
i'm pretty new to programming and am currently trying to learn vb7. I was trying to get a line to move every time the timer event fires, i also need to keep this line within the confines of a label and control its direection. i'll do the actual coding myself, i'd just like to know how the logic behind doing this works.

Thanks

How Would I Make This Image Move
Iam creating an adventure game and I have a screen where once the player enters I want an image to move from the far left of the screen and stop in the middle of the screen can you please give me all the steps I need to know to do this please?

How To Make Taskbar Move Away And In?
hi out there,
is there some one to help on this topic?, i want taskbar to move away(disappear) whenever mouse move away from it, and reappear when cursor approach it.that is initially the taskbar is hidden but is shown when cursor approach it.
hope to hear from u.
thanx

 

How To Make A Character Move To Where You Click?
Ok, Im new at VB 6. what ive learned, ive learned from books and hearsay, but I haven't tested out alot of stuff. Ive recently gotten the information on how to find out the cursor position using the getcursorpos procedures and such. But my main issue is that I can;t get things to move where I click, and when I think I have it, they move in the opposite direction or off the screen. Any ideas on what to do?'



Dark Knight

Make Image Move Across Form
I have a program I am writing that counts down the days til the Daytona 500. I have an image of a racecar that I want to move from the right to the left and when it reaches the far left play a mp3 / wav file and have the picture move again. Does anyone know how to do this? I guess a loop would be the way to do it, but i'm not sure how to do it. I'm working with a regular picture box. Please let me know.

Make Image Move Across Form
unfortuanetly for me neither the code oon pic moving with the 2 picture boxes nor the image1.left= image1.left +1 work. can someone help me with the code or suggest another code.

i copyed the code and followed all the guidelines: 2 pic boxes one named picture1 the other picimage. but i may be confused about which one goes where(which pic goes inside the other one).

Thanks.

Using Xy Data To Make Object Move
hi i have xy data in notepad and i want to use it to make a point or object move/follow it . thanks

How Can You Make An Object Move Across A Form?
How could I make an object move across a form at a constant steady speed?
Thanks!
Eric

Make The Form Move WHILE You Drag It...
Hi,
I want to know how a form can be moved on the MouseDown event, like you can move the form while dragging it, instead of 'finish' dragging it. Just like Winamp. Pls tell me

thanx

How Do You Make Pictures Move The Whole Form?
I want my main graphic at the top of my form able to move the whole form around the screen... does anybody know the code to do this? thanks in advace. -SeaG

How Do I Make A Shape Move Towards A Click?help!
ok i have an idea for a useless but interesting program. see, the problem is that i dont know how to accomplish what i want to do. here ill describe the program: there is one form. on the form is a shape. when you click and hold your mouse on the form, I want the shape to move/"walk" towards the click/hold spot, but not just transport i want it to visibly "roll" "walk" "slide" or whatever you want to call it towards it. I think it has to do with using a timer and some mathematical equations , but I dont know the exact way to do it. its probably a really easy solve...i dont know. thanks for any help!

Help: Make The Mouse Move Over All Over The Screen
i am having a simple problem i cant figure out how to make the mouse move over all over the screen. here's my code

Private Declare Function SetCursorPos Lib "User32" (ByVal X As Long, ByVal Y As Long) As Long

Private Sub Timer1_Timer()

Call SetCursorPos(Rnd * 600 - 100, Rnd * 340 - 200)

End Sub

please help, thanks in advanced

In Need To Use The Keyboard To Make A Picture Move
how do i make a picture of a car move using arrow keys?

Make Shapes Move On Command
I have 2 option buttons to start and stop a ball moving from the top left hand corner of a frame to the bottom right hand and it is on a timer. How do I make it move (in code) and loop back to the top left hand corner? Help ASAP will be appreciated!!

How Do You Make A Bitmap Move UP Or LEFT ...
Hi,

I know the code to move a bitmap to the right, which is : (Example)
Image1.Left = Image1.Left + 20
But, how do you move the object in the opposite direction.

Also, to move an object upwards its
Image1.Top = Image1.Top + 10
But, how do you move the object downwards.

Any Info, I`m in the middle of making a game!!!

Mark

How To Make Stuff Move, Like A Turtle Image
Hey I am trying to make a visual basic game for my Computer Science 1 class. I need to know how to make an image of a turtle move when you use the arrow keys.

How To Make An Object Move Using Arrow Keys
How do i make an object move using then arrow keys (up, down, left, right). I figured out how to make things using command buttons but would like to use the arrow keys.
Any help would be appreciated

How To Make Image Move By Button Press
hello i am fairly new to vb i was woundering how i would make an image move when a keypress was done such as W-up A-left S-down D-right.

thanx

How Do I Make Arrow Keys Move Images?
How would I make an image move so when I push the "up arrow" it would move it 10 twips? I thought it would be


If vbKeyRight = True Then
imgball.left -10
Elseif vbkeyleft Then
imgball.left +10
Elseif vbKeyUp then
imgball.top +10
Else vbkeydown then
imgball.top -10]
End if

but its not can someone help me?

How To Make Mouse Move Beyond Edge Of Screen Or
Hello
I have to make an application in VB 6.0 that can move the mouse beyond its X or Y edge of the Screen. If moving the mouse is not possible in this way then I would like to know how to keep recording its movement even if I reached the edge of the screen. I mean I know that probably the cursor will still stay on the edge but I am sure that there is someway of recording the mouse movement Beyond that point. Can Anyone help me?
Thank You.

Is There A Way To Make VB Read From Access And Determine Its Next Move ?
ie. i create a database and i got a table named "Food".
Suppose i got a field in the "Food" table call "Price".
It is possible to call the VB to get the value of "Price" through Access ?

Make A Shape Move At Angle Of Line
Hello,


I've been working on this program frantically for a while and can't come up with any solutions towards making a shape of a ball called shape1 move at the angle of a line, called line1. I tried the code below to almost success. Does anyone know how? I know the angle of the line, but don't know how to do this.

VB Code:
shell.Move shell.left + velocity, shell.top - angle

How To Make The Mouse Pointer Move By Code?
do anyone of you know hot to make the mouse pointer move through code? pls help.

How To Make Mouse Move Where I Want It To I Need It Explained In Detail Im New
i need to know in detail how to make the mouse move around the screen by clicking a butoon on a program

How To Make The Mouse Cursor Move Slower
Hey ,

i have a game (Warcraft 2 ) that the mouse scroller is too fast

i was thining , maybe its possible to write a small program to make the mouse pointer move slower

i know that the mouse is related to int 33$ , but i cant remember how to set it up

and another question is , what if the game , while running will set a new speed for the game , can i do a interrupt based program TSR that can change this setting anytime ?

hmmmmmm

anyone with an idea - please reply

How Do I Make Images Move In A Computer Game
How would I make images move in a computer game using visual basics.

How Do I Make Pictures Move Randomly Across The Screen?
Hello!

I am new to VB. I have been experimenting with it and would like to learn even more. I have been trying to figure out how to get pictures to move randomly across the screen. Can any one help? I would like to do 2 or more pictures but one would be enough to start.

Thanks in advance.

Copyright 2005-08 www.BigResource.com, All rights reserved