|
Thanks, I must b have a flaw in my flow. I tried using a flag to no avail. I will try again.
|
|
|
|
|
Hi, I'm using Visual Studio 2005 C++/CLI. I have a data entry Form that has 50 TextBox controls. The Forms Designer gives these controls the names textBox1, textBox2,.....textBox50. When I check to make sure none of the fields are null I have to write code for each of the 50 controls. It would be nice if I could loop through textBox(n) controls. Is there any way to do this?
Thanks
Buck
|
|
|
|
|
I don't do any forms coding, but can you iterate through the control collection
for the form and look for TextBox controls? Something like:
for each (Control control in form->Controls)
{
if (nullptr != dynamic_cast<textbox>(control))
{
...
}
}
Mark
Mark Salsbery
Microsoft MVP - Visual C++
modified on Tuesday, June 17, 2008 6:25 PM
|
|
|
|
|
LMAO did you see my post got voted a '1'? This place is really starting to suck dude.
led mike
|
|
|
|
|
Yeah
I try to ignore all the voting stuff, but I do notice stupid stuff like that.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
F*** um, I'm going to start voting all the idiot questions a '1', I'm on a mission.
led mike
|
|
|
|
|
Well you've got your work cut out for you
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
BuckBrown wrote: I have a data entry Form that has 50 TextBox controls.
BuckBrown wrote: It would be nice if I could loop through textBox(n) controls.
Ok, but wouldn't it be better if you didn't have 50 textbox controls that you had to loop through? Alternative User Interface designs could eliminate that and simultaneously offer a better experience for the user.
led mike
|
|
|
|
|
Hello,
I am trying to learn C++/CLI from a text. I have downloaded source code
from the books website. I then created an empty project (CLR Console App.).
Now I want to add some example source code from the book:
File 1. HelloWorld.cpp
//OK, This I was able to add as a source file to the project.
File 2. HelloWorld.obj
//How do I add this?
//Do I need to add this?
File 3.HelloWorld.exe.manifest
//How do I add this?
//Do I need to add this?
File 4. HelloWorld.exe
//How do I add this?
//Do I need to add this? shouldn't the .exe be created at runtime?
I would really appreciate some input about File 2, 3, 4 with the followig caveat-- If you want to respond w/ "read the MSDN documentation" or "is this a joke question?" (which I have received in the past) don't bother to respond.
I am programming as a hobby an dam grateful for any help...
thanks a lot
|
|
|
|
|
...---... wrote: File 2. HelloWorld.obj
//How do I add this?
//Do I need to add this?
No, that file is produced by the compiler.
...---... wrote: I am trying to learn C++/CLI from a text.
My suggestion, to anyone, would be to start with ANSI C and C++ before trying to learn C++/CLI.
led mike
|
|
|
|
|
I am using Visual c++ NET 2005 and using for my report CrystallReport.
I didn't yet seen an example for thatat C++ or C#. I try to translate VB example but I don't succed. When I display report, I have a screen asking to fill the value of parameters.
I need help, an example of how to fill programmatically parameters and load report in Visual c++ NET or C#
|
|
|
|
|
http://www.codeguru.com/cpp/cpp/cpp_mfc/templates/article.php/c12721/
use above links to learn about crystal report.
Nigah M Manzoor
|
|
|
|
|
I'm looking for opinions, I can find articles here / on google myself
|
|
|
|
|
It's C++ with .NET extensions, so you can use the .NET framework, you can interact with C# and VB.NET, and your exe is compiled to MSIL instead of machine code.
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 )
|
|
|
|
|
And possibly most important, the code executes in a garbage collected environment which is why they call it "managed", yes?
led mike
|
|
|
|
|
yeah, but it's all a crock
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 )
|
|
|
|
|
You mean the idea that the concept of GC is desirable?
led mike
|
|
|
|
|
No, I mean it's undesirable in C++
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 )
|
|
|
|
|
bulg wrote: I'm looking for opinions,
My opinion is that C++ (like developers) shouldn't be managed at all.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
modified on Thursday, June 19, 2008 7:54 AM
|
|
|
|
|
CPallini wrote: C++ (like developers) shouldn't be managed at all.
Yes, unmanaged developers tend to be the most productive
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: Yes, unmanaged developers tend to be the most productive [Roll eyes]
Indeed.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes, us unmanaged developers are more productive since we don't waste time with meetings, explaining what we are doing to the project manager, or attending anti-productivity meetings
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I use Visual c++ Net 2005
I have in my DataGridView one Column 'quantite'. In this column I need to put only numbers.
How can I format this column sothat I can only capture numbers ?
|
|
|
|
|
This kinda goes along with my answer to your previous question.[^]. There is no "DataGridViewMaskedTextBoxCell" available so you will need to get the cell that the user just modified and format/validate the value yourself.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
System::Void grid_CellValidating(System::Object^ sender, System::Windows::Forms::DataGridViewCellValidatingEventArgs^ e)
{
bool bInt = false;
for each (wchar_t ch in e->FormattedValue->ToString()->Trim())
if(!wchar_t::IsDigit(ch))
bInt = true;
if(e-->ColumnIndex==2)//Quantity
{
if(bInt)
;//DO
else
return;
}
}
Nigah M Manzoor
|
|
|
|