Click here to Skip to main content
15,918,742 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionform printinng Pin
viji]2-Oct-06 18:46
viji]2-Oct-06 18:46 
AnswerRe: form printinng Pin
Exelioindia3-Oct-06 3:14
Exelioindia3-Oct-06 3:14 
QuestionKeyboard Hook is not working in Windows Service. Pin
kushang.moorthy2-Oct-06 17:57
kushang.moorthy2-Oct-06 17:57 
AnswerRe: Keyboard Hook is not working in Windows Service. Pin
Dave Kreskowiak3-Oct-06 5:53
mveDave Kreskowiak3-Oct-06 5:53 
Questionvbscript work with Excel Pin
henrysun999992-Oct-06 13:37
henrysun999992-Oct-06 13:37 
QuestionTurning numbers into a readable time. [modified] Pin
aqzman_2-Oct-06 13:04
aqzman_2-Oct-06 13:04 
AnswerRe: Turning numbers into a readable time. Pin
Christian Graus2-Oct-06 16:02
protectorChristian Graus2-Oct-06 16:02 
QuestionControl Access within a Thread Pin
VFaul2-Oct-06 11:35
VFaul2-Oct-06 11:35 
I have a label control and I want to modify its text from within a thread (example shown below), but I get a runtime access exception. How do I access controls from a thread?

Imports System.Threading
Imports System.Threading.Thread

Public Class Form1
Public thrd As New Thread(AddressOf MyThread)
Public counter As Integer = 0

Public Sub MyThread()
Do
counter = counter + 1
lblThreadCount.Text = "Thread Count = " & counter
Sleep(100)
Loop While 1
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lblThreadCount.Text = "Thread Count = " & counter
thrd.Start()
End Sub

Private Sub Form1_FormClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
thrd.Abort()
End Sub
End Class

AnswerRe: Control Access within a Thread Pin
zacharyshroyer3-Oct-06 0:40
zacharyshroyer3-Oct-06 0:40 
Questionget hard disk capacity Pin
ADY0072-Oct-06 7:00
ADY0072-Oct-06 7:00 
AnswerRe: get hard disk capacity Pin
Dave Kreskowiak2-Oct-06 8:49
mveDave Kreskowiak2-Oct-06 8:49 
Questionparsing text Pin
jon-802-Oct-06 6:12
professionaljon-802-Oct-06 6:12 
AnswerRe: parsing text Pin
Christian Graus2-Oct-06 16:04
protectorChristian Graus2-Oct-06 16:04 
QuestionSocket hook - connect to already established connection Pin
thisismyfakemail1232-Oct-06 6:05
thisismyfakemail1232-Oct-06 6:05 
AnswerRe: Socket hook - connect to already established connection Pin
Dave Kreskowiak2-Oct-06 8:12
mveDave Kreskowiak2-Oct-06 8:12 
GeneralRe: Socket hook - connect to already established connection Pin
Colin Angus Mackay3-Oct-06 5:35
Colin Angus Mackay3-Oct-06 5:35 
GeneralRe: Socket hook - connect to already established connection Pin
Dave Kreskowiak3-Oct-06 5:51
mveDave Kreskowiak3-Oct-06 5:51 
AnswerRe: Socket hook - connect to already established connection Pin
Colin Angus Mackay3-Oct-06 5:37
Colin Angus Mackay3-Oct-06 5:37 
QuestionHow to take values of a dataset, and populate a local table? Pin
Rashar2-Oct-06 6:04
Rashar2-Oct-06 6:04 
Questioncheck what drive is primary? Pin
ADY0072-Oct-06 4:43
ADY0072-Oct-06 4:43 
AnswerRe: check what drive is primary? Pin
Colin Angus Mackay2-Oct-06 5:26
Colin Angus Mackay2-Oct-06 5:26 
Questionunzip a .zip file? Pin
ADY0072-Oct-06 3:36
ADY0072-Oct-06 3:36 
AnswerRe: unzip a .zip file? Pin
Dave Sexton2-Oct-06 4:03
Dave Sexton2-Oct-06 4:03 
GeneralRe: unzip a .zip file? Pin
ADY0072-Oct-06 4:38
ADY0072-Oct-06 4:38 
AnswerRe: unzip a .zip file? Pin
jimpar2-Oct-06 6:03
jimpar2-Oct-06 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.