Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 6th, 2005, 03:13 AM
Registered User
 
Join Date: Sep 2005
Location: Kallered, , Sweden.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to change text in textbox from sub in module

In earlier Vb you could change for example text in a textbox from a sub in a module by
<Form1.Text1.Text="whatever"> How do I do this in Visual Basic.Net

Jan


Reply With Quote
  #2 (permalink)  
Old September 6th, 2005, 12:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In VB.NET, the controls are private elements of the form (finally!)
You have to pass the text box control explicitely to the sub, or you can add a property to Form1 that exposes the textBox you want to change (but that is a bad code design, that .NET is trying to discorage)

BTW this is a 'prior .net' forum, I suggest you to switch to a .net forum

Marco
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Text of Textbox inside Template DarkForce ASP.NET 2.0 Basics 3 September 14th, 2012 07:11 AM
Change Textbox Backcolor for certain records only camehere Access VBA 5 April 28th, 2008 06:28 AM
Change Textbox and have checkbox checked arholly Access VBA 1 August 25th, 2006 10:22 AM
Change the properties of a textbox control? marksartwork ASP.NET 1.0 and 1.1 Basics 7 April 4th, 2006 04:55 PM
How can i change the textbox into a dropdownlist saif44 ASP.NET 2.0 Basics 1 March 5th, 2006 04:20 PM



All times are GMT -4. The time now is 06:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.