|
How do you mean, just storing settings in there ? There's tons of examples on that. If you mean something else, please clarify.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Ya.. storing settings in it and loop through the section for the desire result. Any link where by there is example to that area?
|
|
|
|
|
|
I have a string variable which contains the name of a textbox whose text I want to get/use.
How can I I create a textbox object from my variable and get the text?
Thanks!
-Steve
|
|
|
|
|
Reflection.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
If i didn't know how to phrase it for a forum, how would i know how to phrase it for a search engine? Useful keywords would have helped more than a post on how to use Google.
|
|
|
|
|
I'm sorry. I'm sorry you're so stupid. The link to google is, in fact, my sig block. My answer was actually one word. Reflection. Google reflection and you'll drown in examples on how to do what you want.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
svanwass wrote: If i didn't know how to phrase it for a forum, how would i know how to phrase it for a search engine?
Chill, dude. When in doubt, explain what you're actually trying to do - not how you think you're gonna do it. And ask follow-up questions.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
My apologies Christian. I misread your answer.
|
|
|
|
|
You could try:
with directcast(me.controls(StringName),textbox)
.Text="Blah"
end with
Although you will have to be sure that the control exists, or you will get an exception.
|
|
|
|
|
The solution has already been suggested, but whenever you need reflection to do something, you are either doing something quite advanced, or you are doing something backwards...
Why is it that you have a name of a textbox, instead of a reference to it? What is it that you are trying to accomplish really?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
My program connects to a database which populates a bunch of text boxes. I then unlock them and allow the user to edit the contents. A write button is pressed and the contents of the current text boxes are stored in an array and compared to the original database read (stored in a different array) to determine what has been changed. The position at which a change is found is store in another array. These positions correlates to another array that stores the names of the text boxes.
The step i am missing is to take that stored text box name and get the real text boxes text.
|
|
|
|
|
...so that you can then store the changed values in the database?
But don't you already have the values? Isn't the position of a changed text item also the index of the array that you first used, when the user clicks the Write button, to store what was in the text boxes? Why read from the text boxes when you can read from your array's copy of the text boxes?
|
|
|
|
|
Hi All!
I've been through literally hundreds of syntax highlighting code editor controls and
not one free control has been able to provide fast, flicker-free and clear HTML syntax highlighting
for my application.
All I Want is a HTML Syntax highlighter written in VB, and (I Think) Shouldn't HTML Be one of the
easiest languages to highlight? Everything that needs highlighting is enclosed by tags, so it makes no sense that i have a perfectly good javascript syntax highlighter but can't find
one Fast HTML Syntax highlighter.
Does anyone know of a fast, flicker-free HTML Syntax highlighing control with support for
comments and (If possible) Strings(Quotations) and tag attributes?
Thanks
MrWolfy
|
|
|
|
|
Hi again,
I did a general-purpose text editor with full syntax coloring for several languages.
The key to get it both fast and flicker free, is NOT to rely on complex Controls, such
as RTB; instead use a simple Panel and draw the text yourself, in an OnPaint method.
Hint: the only thing that needs to be drawn are the few dozen lines that are actually visible
at any one time.
An RTB (and any other standard Control) is a terrible device for handling large amounts
of data; an RTN especially so since it maintains the concatenation of all text lines.
|
|
|
|
|
hi good day to all!
Can someone help me share some code in vb6 with regards to printer character code such as print#, chr(27) & "@" to initialize the printer. When done printing i tried chr(12) and still the passbook printer status after feed off paper, any character code use to deselect or off the printer?
Thanks!
|
|
|
|
|
Hi All
I'm trying to do a mailmerge from a VB.NET winform program into an MS Word Document but I am getting tied up in knots right at the start.
Visual Studio 2005
I have added the MS Office Word reference to the Solution
Imports Microsoft.Office.Interop.Word
Form_Open
Dim oWordApp As New Microsoft.Office.Interop.Word.Application
oWordApp.Visible = true
the oWordApp is underlined as a error of "Declaration Expected"
All help & Pointers Gratefully received
|
|
|
|
|
can anyone tell me if there is a dll in vb.net which has the implementation of all the functions used in ms excel.
I want to use these functions in my application
thanks in advance...
|
|
|
|
|
Not unless you count Excel. You can control Excel using the Microsoft tools for office, but your users will need Excel installed.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want to use these functions in datagrid.
|
|
|
|
|
Well, that's just too bad. Really, you can't. Why would someone write a free dll that turns a datagrid into Excel ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm fairly new to VB.NET, (I was previously an ASP.NET develeper) and I have what a fairly trivial problem.
I am developing a system for a client where the application gets data from a SQL Server database. I have the connection string to the database stored in the app.config file. But the problem lies in that I am using a different database when developing than that which will be used on the live system. So it means that each time I build the project to test on their machines, I have to remember to change the connection string settings before I do so (and in fact, there are other settings like file paths which need changing to).
Like I said, a failry trivial isssue but if you guys have any suggestions on other ways to go about this then it would be appreciated.
Thanks.
|
|
|
|
|
I'd deploy a different app.config, or perhaps write code so that the debug version of your code reads one setting and the release, reads another. You do this with
#ifdef DEBUG
#else
#endif
in C#, I am not sure if VB is capable of that tho.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Couple of solutions:
1. Use two different connections settings, ex: devConnectionString and ProdConnectionString
2. Make a form that allows user to input settings such as db server name etc and save those settings.
|
|
|
|
|
You can consider something like this (change DEV_COMPUTER and TEST_COMPUTER to match the names of your computers):
<appSettings>
<add key="ConnectionString_DEV_COMPUTER" value="..." />
<add key="ConnectionString_TEST_COMPUTER" value="..." />
</appSettings>
ConfigurationManager.AppSettings("ConnectionString_" + Environment.MachineName).ToString
|
|
|
|