how can create lables control array in mobile web application in vb.net ?

  • Thread starter Thread starter nehal
  • Start date Start date
N

nehal

Sir,
i want in my application, a form should display lables according to
the data
in the database means no. of lables are not decided.
how can i do this ?

i also want my first form should pause for 5 seconds and then
automatically
second form should be display. i have tried timer control and timer
property, but i can't do that.

pls. help me.
 
Nahal,

I made a little sample for you for a normal window application how you
implement that in your ce application is yours

\\\it needs a form with only one label
Private mytimer As New Timer
Private dt As DataTable
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
dt = CreateTables() 'normally from the database
mytimer.Enabled = True
mytimer.Interval = 5000
Label1.Text = dt.Rows(0)(0).ToString
AddHandler mytimer.Tick, AddressOf mytimertick
End Sub
Public Sub mytimerTick(ByVal sender As Object, _
ByVal e As System.EventArgs)
Static mycount As Integer = 1
If mycount > 6 Then
Me.Close()
Else
Label1.Text = dt.Rows(mycount)(0).ToString
mycount = 1
End If
End Sub
'only to have a datatable
Private Function CreateTables() As DataTable
Dim dtVBreg As New DataTable("Persons")
dtVBreg.Columns.Add("Name")
dtVBreg.Columns.Add("Country")
For i As Integer = 0 To 7
dtVBreg.Rows.Add(dtVBreg.NewRow)
Next
dtVBreg.Rows(0).ItemArray = New Object() _
{"Herfried K. Wagner", "EU"}
dtVBreg.Rows(1).ItemArray = New Object() _
{"Ken Tucker", "US"}
dtVBreg.Rows(2).ItemArray = New Object() _
{"CJ Taylor", "US"}
dtVBreg.Rows(3).ItemArray = New Object() _
{"Jay B Harlow", "US"}
dtVBreg.Rows(4).ItemArray = New Object() _
{"Terry Burns", "EU"}
dtVBreg.Rows(5).ItemArray = New Object() _
{"Tom Shelton", "US"}
dtVBreg.Rows(6).ItemArray = New Object() _
{"Cor Ligthert", "EU"}
Return dtVBreg
End Function
///

I hope this helps?

Cor
 

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