Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2009, 07:47 PM
Authorized User
 
Join Date: Jun 2008
Posts: 33
Thanks: 2
Thanked 0 Times in 0 Posts
Default continually updating textbox

How do I continually update a text box with values, while also allowing the rest of my program to run?

Right now my program will continue to go through a routine and I can constantly click a button that updates the values in a text box without interrupting the rest the program. How do I write code to serve the same function of me updating the values in the text box by me clicking a button?
 
Old March 3rd, 2009, 08:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hello there... Why do you think that when you press the button you are not interrupting the rest of the program??
Sorry to say this, but unless you are using another thread and you are lucky to be using several processors (things that don't happens in windows) you are interrupting the original code. You maybe don't notice that, but you are interrupting it.
Explained that, your point is that you press and the program continues from it is. But somewhere you are catching events.

Anyway you can achieve the exact same behavior with a timer. You set the timer to a specific interval, and then you simulate the press calling the same procedure that drive the click event.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old March 5th, 2009, 05:13 AM
Authorized User
 
Join Date: Nov 2006
Posts: 31
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via ICQ to debasisdas Send a message via AIM to debasisdas
Default

you simply need to use a timer for the purpose.
set the interval as desired depending on the interval you want the code to re execute.
call the click event in the timer_timer event.
__________________
Regards
Debasis





Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box updating textbox needelp Access VBA 1 January 12th, 2007 12:26 PM
Updating a textbox from DropDown selection kjord ASP.NET 1.0 and 1.1 Professional 4 November 7th, 2006 04:04 AM
Page song want to play continually surendran HTML Code Clinic 1 February 18th, 2005 10:03 AM
Textbox not updating itekcorp ASP.NET 1.0 and 1.1 Basics 4 January 16th, 2005 11:07 PM
Masked TextBox & formatting TextBox melvik C# 1 September 22nd, 2003 11:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.