?
Solved

vb.net controls not updating

Posted on 2012-08-10
1
Medium Priority
?
349 Views
Last Modified: 2012-09-06
Hello,

Am having an issue updating controls on a form. I have a text box on a form and set it to multi line and set its modifiers to public. I have a public sub that takes a passed string and writes it to the text box. If I call that sub from a button click event on that form all is well. But if I call that sub from inside a function in a module, the text box is not updated. I single step and it appears to be writing the text but no text is shown. Same behaviour for list boxes too.

Any ideas?

Thanks,
bartj
0
Comment
Question by:bartdsp
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 38282301
(1) "I have a public sub that takes a passed string and writes it to the text box."

(2) "If I call that sub from a button click event on that form all is well."

Right...the TextBox is in the same Class (the Form) so you can access it.

(3) "But if I call that sub from inside a function in a module, the text box is not updated."

Referencing back to statement #1, if you only pass a string, then how is the MODULE getting a reference to the TextBox?  I'll take a wild stab and guess that you're creating an instance of the form and trying to update the existing form on the screen with your newly created instance?

Show us the code in your sub please...
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question