|
I haven't touched VB6 in 8 years, ever since I got my hands on the .NET 1.0 Beta.
|
|
|
|
|
|
sir
i am making labels at runtime form .
I have one button on runtime form when i press this button then labels create now i want to change that labels text at runtime form.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim rc As ResizeableControl
Dim LocXPosition As Integer = 20
Dim LocYPosition As Integer = 20
Dim textbox As New TextBox
'Dim intTotalRec As Integer
Static i As Integer
If i = 0 Then 'to check that how many times this has been called
i = i + 40
Else
i = i + 20
End If
textbox.Location = New Point(i, i)
Me.Controls.Add(textbox)
textbox.Text = "test"
textbox.BorderStyle = BorderStyle.FixedSingle
rc = New ResizeableControl(textbox)
End Sub
|
|
|
|
|
please, please, don't flood this forum with your ignorance, your inability to write a decent question, and your total disregard for any sort of personal advancement. You are out of your depth, obviously. Just ask one intelligent question, for one problem, and that after you try to read your books, or do some research.
How do you expect to access these textboxes ( which are not labels ), if you don't keep a reference to them ? you could iterate over your controls collection, but there is no chance in hell of you understanding that code, so instead, just keep a list of textboxes as you create them, so you can interact with them later.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Insults are not welcome Mr. Christian Graus
Pleas dont behave like this because I dont think so you have any idea that what their Journey is ALL about
please if you cant help some then dont humiliate also
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
softdev_sup wrote: Insults are not welcome Mr. Christian Graus
ROTFL !!! Apparently, the truth hurts.
softdev_sup wrote: Pleas dont behave like this because I dont think so you have any idea that what their Journey is ALL about
please if you cant help some then dont humiliate also
I know what the journey is all about. It's about people with no idea how to write any code whatsoever, taking jobs they can't do, and then asking us to do the work. The guy asked the same question three times, each time the subject was more and more ridiculous, and the guy plainly has no clue what he was doing. I gave him the best advice he could possibly hope to hear. He needs to either give up, or he needs to buy a book and learn some basics.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
$10 says he's making a 'virus'...
(See Rajdeep.Net for rofls)
|
|
|
|
|
You've developed ERP's for hospitals and financial accounting systems and your post revolves around critisism of someone who has 60,000 posts and has been an MVP, let's see here, for the following years:
1 Jan 2009: CodeProject MVP 2009
1 Jan 2008: CodeProject MVP 2008
1 Jan 2007: CodeProject MVP 2007
1 Jan 2006: CodeProject MVP 2006
1 Jan 2005: CodeProject MVP 2005
??
Why didn't you just answer his question, surely you where able to given your background?
Perhaps you might want to review the previous threads and posts to garner a history before making a comment and assuming someone was rude?
|
|
|
|
|
There is no denying Christian's technical knowledge and competence in the field, but I actually agree with oftdev_sup. Sometimes it is better not to say anything rather than dent the confidence of, and humiliate an obvious beginner. We were all beginners at some point (some of us still are), and these forums are a great tool to progress, and people should be comfortable to ask questions, no matter how ridiculous some people may think they are, without being ridiculed.
|
|
|
|
|
Again, perhaps you may need to consider the history of posts within a few hours of Christians reply, you will see he received help, but just continuously repeated his posts, oft in a vague and non-descriptive manner.
|
|
|
|
|
Christian's response to the first post I have found from this guy is, well, lets just say it's less than supportive.
|
|
|
|
|
hahaha , i am not here for buttering a bigger and thicker tree gives more and more shadow , no heart feelings , in 7 years career 3 erps and other projects i thinks so are not bad , beleives on Quality rather then quantity
I really respects Christian Grausand have learnt alot from his posts and i am reading his posts even before when he was not mvp but from few days i saw some change so i posted , dont give it a different color and make it an issue , its your wrong perception
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
Research the AddHandler command.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
sir
i am new i cant understand how can change labeltext at runtime please can you send me complete information
thxxxxx
|
|
|
|
|
Hello rashid. Let me explain all the ways in which this post of yours is kind of dumb
1 - if you're talking to someone in another thread, replying to that thread will mean they get an email
2 - if you're talking to someone in another thread, there's no reason to expect they will log on at the point in time that this post is visible
3 - your header, by naming someone, fails to say anything that might attract someone else who could help your problem, even tho it's so trivial that I doubt there's more than 5 people who have ever used this forum, and could not answer you.
4 - intellisense means that even if you're too cheap to buy a book and too lazy to google, you can just put a . after a variable, to see the properties and methods it has, with documentation
5 - in any case, if you have no idea how to approach this problem, I assume you're trying to teach yourself, and you've dived in far too deep. Forget about any sort of forms app for now, buy a book on VB, and learn how basic programming works.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You wrote
<quote>i am new i cant understand how can change labeltext at runtime please can you send me complete information
Me.Label1.Text = "This is the new label text"
And now go read the book as Christian says!
|
|
|
|
|
sir
pls help me
how can i select label or textbox at runtime form on vb.net
thx
|
|
|
|
|
Label1.Focus()
TextBox1.Focus()
My advice is free, and you may get what you paid for.
|
|
|
|
|
Instead of posting a flood of easily answered questions, and then typing in code you don't understand and thinking it makes you a programmer, buy a book and work through it for these sort of absolute basics. If you can't work out this sort of stuff, the odds are low that you're learning anything from the answers, as you have no basis on which to understand anything about programming,.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You want to Set Focus in Text Box or you wants to select the Text in the control, i dont think so Label is a good option here Use rather TextBox.
you can use its Focus Property at run time and at Design Time you can set tab order by going to Menu
View and then clicking on TabOrder
to select All Text in a textbox control use
TextBox.SelectAll()
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
If you read all three of his questions, what he calls a label, IS a textbox, and his issue is that he creates them on the fly, and does not keep a reference to them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
Hi,
I have a VB 6 application which crashes giving system message about the crash.
Scenario:
There is a simple form where there is one text box and 2 command buttons, submit and cancel.The text box is restricted to accept only numeric values. Once valid data is entered into the textbox i press ENTER + (some other key) simultaneously. The entire application crashes!
The ENTER + (some other key) press happens by mistake for sure, but i cant afford to loose all that data because of the crash.
If i knew the exact cause of the crash i could handle that event.
Can you help me out here? Have any of you faced such a situation?
-Shruti
|
|
|
|
|
First, why do you torture yourself with vb6, when vb.net is available and free (Visual Studio 2008 Express)?
Your application crashes after you have pressed enter + (some other key), because enter is not numeric (it is a control key), but it is an actual value entered.
So validate the value entered in the textbox before you use it. At the same time this will prevent the program from crashing when the user copy-pastes a value into the textbox.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Yes i understand, but when i debug i can see the control directly going to the submit button's click event when i press ENTER.
Another point, while debugging i do not get any errors. It crashes only once the application is installed.
-Shruti
|
|
|
|