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




Moving Form Objects


Hi guys

I am trying to write a section of code at the moment that spawns up to 100 imagebox controls and places them as a matrix on the screen. I then need groups of these objects to move down, across, down then disappear. I have got as far as placing the matrix of objects on the screen but am having a hard time moving the objects.

My question is; what would be the best way to move the controls? I have tried doing for..next loops with changing the image1(x).top and .left and have used a pause function between each step but the code is very clumsy and I am getting lost in all the loops. Is there another method that I have overlooked? You'll have to forgive me if I am missing something basic. I am not a "newbie" but have been away from VB for some time.

Thanks in advance




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Moving Control Element Objects On Form
hi there i really need to know the answer to this since im leaving 2morrow until thursday....


i have a form. this form adds components using the index array at runtime. is it possible that when they are added to the form, for the user to click and drag those components on the form and then detecting its x,y co-ordinates?

Thanks

Help With Moving Objects
In my game, you can move objects around the playing field by using various keyboard keys (arrow keys, enter and space). This works fine. However, whenever I put a text box, command button, or anything else on my form, I can't move anything around....unless I disable the other objects. Is there a way around this?

Moving Objects
hi, im currently making a game.
for 1 part of the game, i have an image and it automatically moves
down + right with a timer. here the coding for it:

Image2.Move Image2.Left, Image2.Top + 40 ' Move Down
Image2.Move Image2.Left + 20 'Move Right

when i press 'the space bar', the 'Image2' moves up + right. heres the coding for it:

Image2.Move Image2.Left, Image2.Top - 40 'Move Up
Image2.Move Image2.Left + 40 'Move Right

i got this portion of the project done but when i press the space bar, it doesnt move 'instantly'. instead, when i press and hold down the space bar, it moves up + right, stops, then finally moves up + right. i would like for it to move instantly and smoothly when i press the 'space bar'

i think this problem may be because when i press the space bar, the image is moving down at the same time, so it kind of "fight" the push of it.

also, if anyone can help me to get this to work for the 'mouses click' instead of 'spacebar', it would also be appreciated but i dont really care.

can anyone help?
thanks very much.

Moving Objects
I know there are a few threads on things like this, I have seen them befor but I can't seem to find them. It was a few weeks ago that I last saw them.

I have a circle on the form and I want to be able to move it up if I press up arrow down if I press down arrow and so on, if i do this a few time with different things I could learn to move sprites. Any help please?

A Little Help {moving Objects}
sorry im really really new to this site but by the looks of things it kicks major buttooooooocks sooooo i just want a little help

ive been into game programming for a while but i aint used VB that long only about 3 weeks ive made a few simple problem programmes but nothing amazing

just to start off cos i am really new to this is there a thread which u could introduce me to to teach me how to move something around a screen because i intend to make an rpg but that will take alot of work so anything u can do for me will help me greatly.

well anyway im 16 m from wales uk and am doing a college course on computing (including VB) but we do boring stuff so theres no point in going there

thanks for all replies

Moving Objects
Am trying to do simple animation with several objects. The stuff moves as intended but not at the speed I would like. I have a several lights that sequence in the timer1 sub. Also during one of the sequences an object is to move across a page. Here is the code for the start of the object moving across the page:


Code:
Private Sub Timer1_Timer()
Case imgYellow 'Main Red, Side Green for25 seconds
Timer1.Interval = 4000
imgMain = imgRed(1)
imgSide = imgGreen
imgMain = imgRed2
If picHolder.Visible = True Then
Select Case imgSide.Picture
Case imgSide.Picture
imgSide.Picture = imgGreen
Do While picHolder.Left > 0
picHolder.Move picHolder.Left - 0.6
Loop
End Select
End If
end sub
If the picholder.left value is less than 0.51 the program hangs. And 0.51 is too fast.

Any help is appreciated.

Kim

Moving Objects Help
Please could someone help me this is my code for a moving image
Public Sub movUp()
imgsnail.Picture = imgsnail.Picture
imgsnail.Top = imgsnail.Top - 100 'Up'


The MovUp stands for move up; it works however there are three more lots of this code one for moving right, left and down. Here is my problem once you have moved up and then either right, left or down the image will then not move up. Well it will just in the last position. For example if I move right then try going up the image will move up but will still be facing right. Please could someone tell me if there is anything wrong with this code, I think it may need modifying but I am not sure how.



Thank you Helen

How To Tell When 2 Moving Objects Have Met
Hey, im making a game for school. I need it so that if an object hits the rocket something will happen.
For example I have a picRocket and a picObstacle1
picObstacle1 just goes from side to side across the form and the object of the game is to get the picRocket past the picObstacle1 using the arrowkeys to fly without getting hit.

What im asking is, how can I tell when the Rocket has hit the obstacle while it is moving?

Moving Objects
How do I make a object disapear when it hits nother object and then set it to appera in another spot on the screen
Thankx

Moving Objects
How can I make a image move back and fourth and up and down??
Thankx

Moving Objects...
When you move an object (form, picturebox etc.) then a rectangle is displayed indicating where the object will be placed when the capture is released.

Is there any way you can change this rectangle using API?
I need this for a docking system I'm working on so that when the user drags a window over a specific area of my program the rectangle will change so that the user can see that if he releases the left mouse button the window will be docked at that position.

Did that make sense? And do you know if there is such an API?

Moving Objects
Im making a program where it randomly makes boxes that i want to fall from the top of the screen. I have it create the box with this code:


Dim ctlPB As Control
Set ctlPB = Controls.Add("VB.PictureBox", "PictureBox2", Picture1)
ctlPB.Top = 0
ctlPB.Left = Label4.Caption
ctlPB.Height = 375
ctlPB.Width = 255
'show the picturebox
ctlPB.Visible = True
End If

Label4 is just the random location at the top of the screen. Now what code would I do to make this now created box move down the screen.

Vb Moving Objects?
Hi,

I have created a basic maze, the user uses the arrow keys to navigate between the maze walls collecting items ( basically a rip off of pac-man ). Anyway, i have "shpMonster", i want to create a set path for it to travel around the maze on, whats the best way to do this? Timers? Im new to this so im not too familiar with making an object move round a path constantly...

Thanks in advance.

Moving Through Objects
hi we all know about moving through objects in vb using tab, with the tabindex and stuff. but what about moving through objects with arrow keys? is this possible and if so can someone show me some code?
i don't even know if this is the right form i just assumed it would be something with API.

anyway thanks for your time.

Moving Objects
Hi there,

does anybody know how to move objects?
like a plane or an object?

i wan it say a random no. generated is 4
i wan this object to move 4 steps..
how can this be done?

has it got to do wif x, y corrdinates??

if i wan this object to move according to the random number generated..how can this be done also?

pls reply..thanks.

Moving Objects Smoothly
I have found that moving a picture at a constant rate is somewhat jumpy even using bitblt. How can I fix this?

Moving Objects With Keyascii
I am making a game for my A-Level I.T project and need to know how to make an object move using the cursor keyas and Ascii code. Anyone know how to do this?

Randomly Moving Objects?
Ok i tryed a few searches but didnt find anything relating to this.

Does anyone know how i could move say and Image Control for example Randomly across a Form.

Lets say that Image1 is in the Middle of the form and will Move its way down to the bottom.

But then i need it to randomly position itself some else on the form and so on.

Any Ideas?

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 Objects Over A Picture
Has anyone any idea how to create a small app that lets you move objects around on a picture while keeping them all individual?

I am trying to create an app that lets you select from a series of small images and drag them onto a large image for positioning/sizing. Each small image should remain individual and resizeable until you click 'Apply' when they will become part of the large image.

Thanks, i dont know if its possible in vb without writing each line of code to do it or if theres a component that does it for you.

Cheers

2 Questions About Moving Objects.
Hi. I am new to Visuall Basic but not also to programming.

1)I have this function function:

Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = 32 Then
...

When i have the right arrow key pressed a picture keeps moving. But it stops moving when i hit another key, although the right arrow key is still pressed. How can i do that so that the picture will keep moving when the right arrow key is pressed, no matter if meantime i press other keys?

2) I want to make a picture or shape to start moving everytime a particular key is pressed. I can do this, but if the user press the key twice, the picture starts moving and then ( when they press the key for the second time ) it stops to move, goes to the beginning position and then starts to move again( from the beginning ). But i want the two pictures/shapes to move at the same time. How can i do that? And the user can hit the key as many times as they want. If he hits the particular key 4 times, then four pictures/shapes will start moving from a particular position ( but in different times; every time he press the key a pictures starts to move, if it takes them 5 second to hit the key for the second time, then the second picture will start to move after 5 seconds from the first one. Finally, both of them will move - but the one will be ahead ).

thanks in advance

Help: Moving Objects After Buildtime??
any one know how i would move an object ( a picrure box) on a form, and be restricted to certin gids/other objects(label or a frame)?????

_________
|x|p|p|_|_|
|_|_|p|_|_|
|_|_|_|_|_|
|_|_|_|_|_|

like this if x was the object to move aroubd and p is the path it can move in; and cant move over other objects.

Moving Objects In Arrays (vb.net)
This is probably a stupid question but me and my friend are new to this... Haha.

I'm making some program for class with my friend and we have all these items moving from left to right, then once reaching the edge changing their vertical direction so they are moving from right to left, and then when the reach the edge they move down a bit and then the process repeats using an array. Then, we have a random number select one of the objects in the array whenever the timer reaches a certain number, and move just that item downwards, HOWEVER, we do not want to move the 'selected' item left to right anymore. We want it to stay in the same position that it started moving downwards from. We have tried MANY different things, and we cannot seem to get it to work. All that we have got is the moving downwards of the one object to happen, but for some reason we just cannot get it to stop moving left/right.

We were thinking that it might work if you can remove an object from an array but our teacher said that you can't do that... So yeah... We really are stuck now and are therefore using the weekend to search for a solution!

Any suggestions/ideas are welcome...

I hope this made sense. If any questions or clarification is needed feel free to ask and I'll do my best to explain.

Moving Objects To Cells On MSFlexgrid?
I've made a form with a 25 * 25 cell msflexgrid, on the form is a small image, how easy is it to move the image onto a set of cells, by either draging and dropping the image, or clicking on the cell and tell the image to move there, then afterwards telling me where the image is?

Moving Objects To The Mouse Cursor?
I am making a diablo style RPG and I need to implement a mouse system like diablo where you click somewhere and your character will move towards it.
All I need to know tho is how to make objects move to the mouse cursor position.

And I was also wondering how I can use the arrow keys on the keyboard to make them do commands.

How To Detect If Moving Objects Touch Each Other
Hi,
I'm practicing with object animations using a timer. My particular object are just basic shapes (an oval and a circle) that move around within the form.

I'm trying to make the program detect when the objects come in "contact" with each other, so that I can ask for other things to happen. What I've basically done to detect a contact is checking for the Left,Top "coordinates" for each object and also considering each objects' "perimeter" coordinates.

I don't know, but that may not seem practical to do, especially when Shape1 moves and doesn't take in all the possible ".top" values (like when moving vertically) because it's more practical to make it "skip" in INTERVALS to make it seem like it's moving fast up the form. And even if I only consider the ".top" value when detecting contact, it may not even be possible to detect any contact at all when the ".top" value of Shape2 is contantly (moving horizontally) between one of the ".top" value intervals of Shape1.
So, in normal "playback," it may look like that the shapes collide, but it's never detected.

So, is there any practical way to dectect object "collision" when they are moving?

Also, I use different timers for each shape so that I can make one of the shapes stop moving when there is a collision. Tell me if this is an inefficient use of the timer.

I would appreciate any reply. Thanks.

HOw To Make Random Moving Objects
I want to make a ball move around the screen randomly, what is the best way to go about doing this??

Moving/Resizing Objects At Runtime?
Does anyone have code example of how to select an item at runtime and have it selected with resizer handles around it and allow resize/moving at runtime?

Thanks!

Moving Objects With The Arrow Keys
My cousin is working on a VB program for school and is wondering how to make it so that when he has "compiled" (I don't know a lot about VB, so I don't know how you go about doing things) the program, he can use the arrow keys to move an object. He really needs to know how to do this fast, because it was due a couple of days ago. Please respond ASAP.

Darkwater3@hotmail.com

Moving Objects/controls Inside A Picturebox!?!
I need to move several (LOADS OF) objects (labels/textboxes/etc) inside a picturebox quickly and easily....... is there anyway of doing this without deleting the objects and re-creating them inside the picturebox?

...and I need them actually inside the picturebox, not just hovering on top as if it looks like they're inside it!

Any help would be great!

Thanks in advance!

Best Thing To Use For Making Moving Objects In A Game
I am creating a snake game . it works great but once the snake gets longer it's "segments" start to look flashy (disapearing pieces for a minor second) i ofcourse dont want to have this. the segment is made from a picture in a picturebox and so is the playfield where it is located in autoredraw is turned on, so what should i do about it?

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

Conflicting Names - Moving Controls Of An Object Form To An MDI Form
Hello,

I have two simple question:

1.
I have added to my project a form saved as frmTEST.frm; and i don't know what i have made so now i receive a message error which is:
"Conflicting names were found in 'C:frmTEST.frm'. The name 'frmTest' will be used."
And in the project explorer window i have under 'Forms' folder : frmTEST(frmTEST.frm)

Can anyone tell me how to stop this message error ?? I tried to use Help button under error message window, but still don't know how to fix the problem.

2.
How can i Copy the controls on the object of my form to a new MDI Form ??
I receive an error such as "control don't have align property...error loading clipboard..."

Conflicting Names - Moving Controls From A Form To An MDI Form
Hello,

I have two simple questions:

1.
I have added to my project a form saved as frmTEST.frm; and i don't know what i have made so now i receive a message error which is:
"Conflicting names were found in 'C:frmTEST.frm'. The name 'frmTest' will be used."
And in the project explorer window i have under 'Forms' folder : frmTEST(frmTEST.frm)

Can anyone tell me how to stop this message error ?? I tried to use Help button under error message window, but still don't know how to fix the problem. I tried also to change the name of the form but no solution.



2.
How can i Copy the controls on the object of my form to a new MDI Form ??
I receive an error such as "control don't have align property...error loading clipboard..."

VB Code And Form (&amp; Objects One Form) Out Of Sync - Refresh Problem
Here's a strange problem
Visual Basic 6 Pro & SP5 running on Windows XP Pro (2600)

a few forms and a few code modules (.BAS's)

in Module1

Code:
Public Sub PlayTrack(TrackID As Integer, i_frmMain As Form)

' Increase the play count for this track
' Load track into the player
' update the status on the main form
P_MusicCatalog(TrackID).PlayCount = P_MusicCatalog(TrackID).PlayCount + 1
With i_frmMain
.lblStatus.Caption = _
"Now playing " & Trim(P_MusicCatalog(TrackID).mTitle) & _
" by " & Trim(P_MusicCatalog(TrackID).mArtist)
.lblStatus.Refresh 'Try refreshing the label
doevents 'Give the system time to do anything else
.refresh 'refresh the form
.wmpPlayer.Open (P_MusicCatalog(TrackID).FName)
End With

End Sub


On the main form (frmMain) I have some code that calls PlayTrack accordingly
The problem is that when looking at the lblStatus label on the form it still displays the caption that was set at design-time
I know that the code has excuted because the two Debug.print items appear in the Immediate window
Also calling:
MsgBox frmMain.lblStatus.Caption

displays a MsgBox with the next "Now playing <track name> by <artist name>"

I've since noticed that the same bug occurs when calling frmMain.caption

Also moving the code to the actual form that it affects (frmMain) has not effect

If I create a new, blank project with a module & form then it works correctly.

If I call frmMain.printform then the printed copy of the form is updated correctly, but the copy on screen is still incorrect.
Any Ideas?

Creates A New Form During Run Time, And Copies Objects Over From An Existing Form.
Hi,
Is it possible to
Creates a new form during run time, and then copy objects over from an existing form onto the new form?
Thanks.

Disable Objects On Form And Closing Previous Form
1st :Let say i have many textbox and combobox on the window form. Then i want to disable these objects by writing the short
       code. i dont want to repeat: "texbox1.text.visible= true" What can i do?

2nd: I have two window forms. On first window form, i create one button to open the 2nd form. But i cannot close the first form.
       I just can hide it. How can i close the first form?

 I am just a beginner of VB language so please explain me as beginner level. Thank a lot for your reply!

Moving A Form
Hello all!
Well, i want to make a form with BorderStyle set to None, but i want to move the form when the user keep the mouse pressed and moves the mouse.
How can i do it?
I tried doing the foloowing:

Form_MouseMove ( ... )

If booPressed then
me.x = x
me.y = y
Endif

But it doesnt worked very well.
Thanks

FeRgO

Moving Form...
Little bit of a toughy here...

I want my program to hold right above the windows start bar... The only problem with this, is when someone changes the start bar size...

What I mean is, when someone unlocks the bar and then drags it to make it bigger/taller...

I'm not sure how this will work, seeing as someone could change this while the program was running... so wouldn't it have to have a constant check of the bar?

Thanks in advance!

Moving A Form..
Hey there!
I have a form with BoderStyle set to 0-NONE and by default when you run the program you cannot move/drag the form.
How do you set the "0-none" forms to be dragable forms?

One day I will be the one who posts the answers,today I only have questions...

Moving A Form
hey all...

i know what i want to do is possible, but i can't find anything that will help me achieve it...

I have made an app with a custom window design (borderless window and images for the title bar, buttons etc...) and i would like to be able to move the form around by using the title bar image (image2). any ideas?

Moving The Form.
Hi, I've really been enjoying experimenting with VB6. But there's something I'm having trouble with. I'm trying to get the form to move to another X-Position when I click a button. But I keep getting an error. Assuming I'm completely wrong, which is likely, how would I go about moving the form along to the right by let's say, 100 pixels. Any Ideas?

Syrillia

Form Moving
I dont want the form moving around. How to do that?

Moving The Form !!
i have a form with "none Border Style"and i want make the form to move while dragging it with mouse !! how can i do this /?

sorry if i was understandable because i don't know very well English

Moving Form
Hi, I'm Trying To Move My Form. But The BorderStyle Of My Form = On "None" What I'm Trying To Do Is If My Mouse Is On Ex: Picture1 And Button On The Mouse Is Pressed It Will Move The Form But I Dont Know How To Do That
Can someone Help ?

Moving A Form
What codes do I use to move a form. My form has no title bar, and i would like to move it by clicking and draging on an image or picturebox.

Moving The Form
Gd day all

Ive made a little custom-look on my form by setting BorderStyle to 0... and coz this also removes the title bar i cannot move the form around on the screen...

So is there any way to do so that if you press down the mousebutton in a certain area you can move the form around? Thanks



Added green "resolved" checkmark - Hack

Moving A Form
okay i made a program that had no border style and i coded the X and minimize button however i noticed i could not move it without the titlebar so i was thinging id need to write sum thing like this


Code:
Private Sub Form_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
Form1.Top = Y
Form1.Left = X
End Sub



im having issues with defining where it would go such as writing the mouse axis's to = x & y but im not sure how to do so

Form Moving
thanks for that, its much appreciated.

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