Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
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 November 26th, 2007, 05:06 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default Lost Focus of Dynamic Textfield

Hello friends!!

      pls let me know that how can I work at LostFocus event of
dyanmic textfield.

      I mean I creating n number of Textboxes and I have to get some
functionality done at its lostfocus event.

      Pls give me any idea of it.

Thanks.


DPK..
__________________
DPK..
 
Old November 26th, 2007, 08:09 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

and you are using what version of VB??

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old November 26th, 2007, 08:12 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default

THANKS TO REPLY

 I AM USING VB6

DPK..
 
Old November 26th, 2007, 08:14 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

If you are using an array of control it will execute the lostfocus event automatic. If you are not using an array, I suggest you use one...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old November 26th, 2007, 08:18 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default

           Is there no any other way to fix this problem? because I will have to do much work again for this.

           If any alternate for that for the being time please tel me. Becasue for the next time I will use Array myself.

  Thanks!!

DPK..
 
Old November 26th, 2007, 08:21 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

Well.. How are you actually creating the controls?? because using an array of controls is simple, you just put a control on the form, set it to invisible, put it index to 0 and when you need a new control you load a control of that type with the same name with index +1...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old November 26th, 2007, 08:25 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default




  For i=0 to n numbers
   Set TxtBox = Controls.Add("VB.Textbox", "ADD0" & i, Me)
       With TxtBox
                .Visible = True
                .Top = 100 + Top
                .Left = LFT + 1000
                .Width = 1500
                .Height = 100
  Next

DPK..
 
Old November 26th, 2007, 08:32 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

If you want to change it, you just have to follow what I told you, and replace the controls.add for a load with then name of your control and the new index.. is not hard to do... Why you say that you will have to do a lot of work?

Also, always set visible to true as the last step, that way you avoid flickering of the form.

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old November 27th, 2007, 01:03 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default

because I will have to do it at many places in my form not only one place. but if there is no alternate for that then its okk..
ultimately I will go to do the same as u said...

Thanks.

DPK..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Textfield deean Pro JSP 1 June 19th, 2008 02:11 PM
Form lost focus color change dthrun VB How-To 1 March 30th, 2007 10:41 PM
Tell me following problem of lost focus amit_mande@yahoo.com VB.NET 2002/2003 Basics 1 November 13th, 2006 12:42 PM
calculate value on Lost Focus of text field creative_eye General .NET 1 April 12th, 2004 08:35 AM
textfield damnnono_86 Access 2 October 27th, 2003 10:24 AM





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