How get data after the form loaded?

  • Thread starter Thread starter yxq
  • Start date Start date
Y

yxq

Hi,
How to get data to listview after the form has been shown, i dont want to
use Timer control.
Thank you
 
yxq,

I can answer on this, however I don't see the purpose and therefore have no
idea what is the moment you will show it.

Cor
 
yxq said:
How to get data to listview after the form has been shown, i dont want to
use Timer control.

\\\
Private Sub Form1_Activated( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles MyBase.Activated
Static IsActivated As Boolean
If Not IsActivated Then
IsActivated = True
Application.DoEvents()

' Fill the listview control here.
End If
End Sub
///
 
Thanks, my old code is
*******************************
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Timer1.Interval = 100
Timer1.Enabled()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Timer1.Dispose()
getData()
End Sub
*******************************
But i dont want to use the timer control, how to do?

Thank you
 
yxq said:
Thanks, my old code is
*******************************
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Timer1.Interval = 100
Timer1.Enabled()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Timer1.Dispose()
getData()
End Sub
*******************************
But i dont want to use the timer control, how to do?

Please re-read my post. It includes the source code of a complete solution
that doesn't use a timer component.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top