Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb_dotnet thread: Windows App


Message #1 by "marc cardenas" <marclena@h...> on Tue, 3 Dec 2002 11:08:22
Thanks, it works
I really appreciate your help

> The problem is that a message must be processed to make the label 
display.
Unless you code in a wait state (Application.DoEvents) , then there is no
wait state during the processing of your button_click handler.  You must
insert a line which reads:  Application.DoEvents after you change the
label.text, or it will not appear until after the sub returns (at which 
time
the host window's message handler will run).  This works the same way as it
did in VB6.  Just think of the time wasted if the runtime added a wait 
state
after each statement!!!



-----Original Message-----
From: marc cardenas [mailto:marclena@h...]
Sent: Tuesday, December 03, 2002 11:08 AM
To: pro_VB_dotnet
Subject: [pro_vb_dotnet] Windows App

I've got the following code

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
        Dim i As Integer
        sConnString = "server=" & TextBox1.Text & ";Database=" &
TextBox2.Text & ";UID=" & TextBox3.Text & ";PWD=" & TextBox4.Text & ";"
        Label5.Text = "Reading the Contract file"

        readLicence()


        'showdongles()

    End Sub


When I click the button this method will run.
I've got a label called label5, on this method I put a text for this
label, but the label doesn't show any text, when the code is finish I set
up another text for the label and this text is being showed.
Why the text that I put on the above method doesn't work?
Thanks
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to



  Return to Index