refreshing label text

  • Thread starter Thread starter rigamonk
  • Start date Start date
R

rigamonk

I have a form that runs a procedure when a button is clicked. the procedure
does a few things, then outputs the results to labels on a form....which it
does fine.
However, when I call that procedure again (in the same instance of the
program), the labels do not update.
i have tried resetting the text. update(), refresh(), beginUpdate() and
endUpdate(), Invalidate() and a few others that sounded pretty good ;-)
no dice.
any ideas?

thanks, patrick
 
Rigamonk,

I assume that that procedure is in the ButtonClick event, can you show us a
little bit of the code you are using?

It should show directly after that method is done normally.

Cor
 
ok.
here is some of the code in the called procedure:

data854F = CType(regKey.GetValue("{A8A88C49-5EB2-4990-A1A2-0876022C854F}"),
Byte())

data0120 = CType(regKey.GetValue("{AEBA21FA-782A-4A90-978D-B72164C80120}"),
Byte())

str854F = Hex.ToString(data854F)

str0120 = Hex.ToString(data0120)

Try

sub854F = str854F.Substring(72, 13)

sub0120 = str0120.Substring(72, 13)

Catch ex As System.ArgumentOutOfRangeException

sub854F = str854F.Substring(72, 11)

sub0120 = str0120.Substring(72, 11)

End Try

lblDefaulLvl.Text = "Advanced"

If sub854F.Equals("14-1A-15-39-4") And sub0120.Equals("14-1A-15-39-4") Then

IEex1.Text = "Block"

IEex2.Text = "Block"

IEex3.Text = "Block"

IEex4.Text = "Block"

lblSession.Text = "Always Allow"

ElseIf sub854F.Equals("14-1A-15-39") And sub0120.Equals("14-1A-15-39") Then

IEex1.Text = "Block"

IEex2.Text = "Block"

IEex3.Text = "Block"

IEex4.Text = "Block"

lblSession.Text = "Not Allow"





so....this is called and it populates the varios labels. works great the
first time. but lets say i want to call the proc again a little later to see
if anything has changed. well, the values in the labels DO NOT CHANGE. I've
run into this type of thing before and (obviously) never figured it out.

any ideas
 

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