How do I make a form stick to the right side of another form? and how do I delete and item selected in a listobx
Printable View
How do I make a form stick to the right side of another form? and how do I delete and item selected in a listobx
What exactly do you mean?Quote:
How do I make a form stick to the right side of another form
Try this:Quote:
and how do I delete and item selected in a listobx
WPCode:Private Sub Form_Load()
For i = 0 To 10'just an example
List1.AddItem i
Next i
End Sub
Private Sub Command1_Click()
List1.RemoveItem List1.ListIndex :)
End Sub
Code:Dim I As Integer
I = 0
While I < List1.ListCount
If List1.Selected(I) = True Then
List1.RemoveItem I
I = I - 1
End If
I = I + 1
Wend
i mean by like 2 forms acting like winamp. you can move the main form and the other form will move too
Private Type Attribots_To_Form2
X As Single
Y As Single
End Type
Private Moving_Thing As Attribots_To_Form2
Private ok As Boolean
Private Sub Form_Load()
Load Form2
Form2.Show
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ok = True
Moving_Thing.X = X
Moving_Thing.Y = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If ok = True Then
With Form1
.Move .Left + X - Moving_Thing.X, .Top + Y - Moving_Thing.Y, .Width, .Height
End With
'moving the second form to the coordinates of the left+width of the first form
With Form2
.Move Form1.Left + Form1.Width, Form1.Top, .Width, .Height
End With
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
ok = False
Moving_Thing.X = X
Moving_Thing.Y = Y
End Sub
'Main Thing :
'Try To Move The Main Form : Form1
that works... sorta.... i just sorta tweaked it and now it works better. thanx!