22-01-14, 03:51 AM
نحمده ونصلي على رسوله الكريم
كود :
Private Sub listBox1_MouseDoubleClick(sender As Object, e As MouseEventArgs)
For Each f As Form In Application.OpenForms
If Break(f) Then
f.Activate()
Exit For
End If
Next
End Sub
Private Function Break(form As Form) As Boolean
For Each ctrl As Control In form.Controls
If TypeOf ctrl Is Label AndAlso ctrl.Text = listBox1.Text Then
Return True
End If
Next
Return False
End Function