473,322 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

caption at run time

I want to change the controls caption at run time. I will take this captions
from a SQL Server table. I want the form to have this new captions when is
showed. Where I have to put the code ? In the forms load event ?
I saw when the form is loaded in the form load event the control collection
is empty.I don't have any buttons or any other controls. Why ?

Thank you
Jan 3 '07 #1
7 1134
Posting the same question twice will not guarantee you an answer. We
still need more information. VB2003 or VB2005? Webforms or Winforms?

Robin S.
---------------------------
"Mihai" <bv*****@telus.netwrote in message
news:CUImh.107125$YV4.74338@edtnps89...
>I want to change the controls caption at run time. I will take this
captions
from a SQL Server table. I want the form to have this new captions
when is
showed. Where I have to put the code ? In the forms load event ?
I saw when the form is loaded in the form load event the control
collection
is empty.I don't have any buttons or any other controls. Why ?

Thank you


Jan 3 '07 #2
"Mihai" <bv*****@telus.netschrieb:
>I want to change the controls caption at run time. I will take this
captions
from a SQL Server table. I want the form to have this new captions when is
showed. Where I have to put the code ? In the forms load event ?
For example, but you can also assign the captions in the form's constructor
directly after the call to 'InitializeComponent'.
I saw when the form is loaded in the form load event the control
collection
is empty.
This should not be the case.
I don't have any buttons or any other controls. Why ?
Do the controls show up when the form becomes visible?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 3 '07 #3
Thanks anyway , I think I resolved the problem. You are very nice, guys.

"Mihai" <bv*****@telus.netwrote in message
news:CUImh.107125$YV4.74338@edtnps89...
I want to change the controls caption at run time. I will take this
captions
from a SQL Server table. I want the form to have this new captions when is
showed. Where I have to put the code ? In the forms load event ?
I saw when the form is loaded in the form load event the control
collection
is empty.I don't have any buttons or any other controls. Why ?

Thank you


Jan 4 '07 #4
Posting the same question twice will not guarantee you an answer. We still
need more information. VB2003 or VB2005? Webforms or Winforms?

Robin S.
But gives you for sure an answer from Herfried if another regular tells
that.

Cor
Jan 4 '07 #5
Well, come on, tell us how you resolved the problem!

Robin S.
-------------------------------
"Mihai" <bv*****@telus.netwrote in message
news:Sn0nh.109723$YV4.44159@edtnps89...
Thanks anyway , I think I resolved the problem. You are very nice,
guys.

"Mihai" <bv*****@telus.netwrote in message
news:CUImh.107125$YV4.74338@edtnps89...
>I want to change the controls caption at run time. I will take this
captions
>from a SQL Server table. I want the form to have this new captions
when is
showed. Where I have to put the code ? In the forms load event ?
I saw when the form is loaded in the form load event the control
collection
>is empty.I don't have any buttons or any other controls. Why ?

Thank you



Jan 4 '07 #6
Hi Robin !
When I have th error I tried to put the caption in
Me.Controls.Item(btnName).text = ....
It didn't work and what was strange the count property of the controls
collection show = 1 even I had more controls on the form.Today, (I was more
relaxed) I saw from the first shot on the form I have a split container (
this is a container also) and the split container has 2 panels ( each of
each is a container also ) so I have 3 collection.
So the right code was
declare value as collection
value = me.controls.item(splitcontainername).controls.item (0) ' 0 is for the
first panel
value.controls.item("controlname").text = value from SQL server table

So this is all folks, it works fine !
Cheers !
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:gb******************************@comcast.com. ..
Well, come on, tell us how you resolved the problem!

Robin S.
-------------------------------
"Mihai" <bv*****@telus.netwrote in message
news:Sn0nh.109723$YV4.44159@edtnps89...
Thanks anyway , I think I resolved the problem. You are very nice,
guys.

"Mihai" <bv*****@telus.netwrote in message
news:CUImh.107125$YV4.74338@edtnps89...
I want to change the controls caption at run time. I will take this
captions
from a SQL Server table. I want the form to have this new captions
when is
showed. Where I have to put the code ? In the forms load event ?
I saw when the form is loaded in the form load event the control
collection
is empty.I don't have any buttons or any other controls. Why ?

Thank you



Jan 4 '07 #7
Thanks for letting us know!

Robin S.
-----------------
"Mihai" <bv*****@telus.netwrote in message
news:bF1nh.109742$YV4.71729@edtnps89...
Hi Robin !
When I have th error I tried to put the caption in
Me.Controls.Item(btnName).text = ....
It didn't work and what was strange the count property of the controls
collection show = 1 even I had more controls on the form.Today, (I was
more
relaxed) I saw from the first shot on the form I have a split
container (
this is a container also) and the split container has 2 panels ( each
of
each is a container also ) so I have 3 collection.
So the right code was
declare value as collection
value = me.controls.item(splitcontainername).controls.item (0) ' 0 is
for the
first panel
value.controls.item("controlname").text = value from SQL server table

So this is all folks, it works fine !
Cheers !
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:gb******************************@comcast.com. ..
>Well, come on, tell us how you resolved the problem!

Robin S.
-------------------------------
"Mihai" <bv*****@telus.netwrote in message
news:Sn0nh.109723$YV4.44159@edtnps89...
Thanks anyway , I think I resolved the problem. You are very nice,
guys.

"Mihai" <bv*****@telus.netwrote in message
news:CUImh.107125$YV4.74338@edtnps89...
I want to change the controls caption at run time. I will take
this
captions
from a SQL Server table. I want the form to have this new captions
when is
showed. Where I have to put the code ? In the forms load event ?
I saw when the form is loaded in the form load event the control
collection
is empty.I don't have any buttons or any other controls. Why ?

Thank you




Jan 4 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Randall Sell | last post by:
Can anyone confirm if I am being an idiot, or is this a bug in the CSS implementation of Netscape 7.x/Mozilla 1.4 ... give the following single HTML: <html> <head> <style type="text/css">...
7
by: Paul T. Rong | last post by:
Hello, Often when I open one form, and (without closing it) open the form in its design view, then all the caption value of the controls in this form remained there in form's design view that is...
9
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. For a...
6
by: Bob Darlington | last post by:
I want to use the caption property for fields in a recordset as a condition in a loop. That is, I only want to consider those fields which have captions: For each fld in RecordsetName.Fields If...
11
by: Chris Beall | last post by:
See http://pages.prodigy.net/chris_beall/Demo/photo%20block%20experiments.html I've ended up with what seems like a rather complex structure for what I thought would be a somewhat simple...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.