Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2008 > Visual Basic 2008 Essentials
|
Visual Basic 2008 Essentials If you are new to Visual Basic programming with version 2008, this is the place to start your questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2008 Essentials 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 May 31st, 2011, 04:31 AM
Authorized User
 
Join Date: Aug 2010
Posts: 19
Thanks: 1
Thanked 0 Times in 0 Posts
Default How to know every control's Text property of a form

Hello,I want to konw every control's Text property of a form,and then I will make the next setp due to different cases.The code should be something like this:
For Each ctrl as control in Form1
If ctrl.Text="" then
'Do somehting in this case
End If
Next

But I don't know how to write that correctly.Please give me help for that.Thanks.
 
Old May 31st, 2011, 08:56 AM
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

MM.. Don't you have a control property on the form??? that control property is a collection of controls.. Besides, apart from the text, you should check the type of control.
__________________
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.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Control's text placement ceboc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 8 June 26th, 2010 11:22 AM
Error setting menu control's OnAction property andrewafresh Excel VBA 0 February 3rd, 2009 01:26 PM
Text Box .text Property Displays conflicting Valus JPOhlman Visual Basic 2005 Basics 3 August 23rd, 2006 02:39 PM
Can't set text property of dynamic text box sreerajrs ASP.NET 1.0 and 1.1 Professional 1 May 31st, 2006 09:39 PM
How to change filefield control's button text? shenliujun Javascript How-To 1 July 20th, 2004 12:05 PM





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