Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

threading question

Avatar of gormly
gormly asked on
Visual Basic.NET
6 Comments1 Solution281 ViewsLast Modified:
I am new to .net and I want to run this code:

        Label1.Text = "Now Deleting Temp Files"

        My.Computer.FileSystem.DeleteDirectory("C:\Documents and Settings\Administrator\Local Settings\Temp", FileIO.DeleteDirectoryOption.DeleteAllContents)
        My.Computer.FileSystem.CreateDirectory("\C:\Documents and Settings\Administrator\Local Settings\Temp")

without locking up the GUI.

Example, when running this the label1.text doesn't change to the text I am trying to asign it and the GUI totally locks up.
In VB I would use DoEvents but I am clueless here.

Any quick example of doing this?
Avatar of AlexFM

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers