|
do it in other ways.
TextBox tb[] = {textbox1,textbox2,...,textbox5};
for(i=0;i<5;i++)
{
tb[i].Text = foundRows[i].ToString();
}
|
|
|
|
|
Lets say these 5 buttons are placed on Form1. Than you can write this:
for(int i=1,i<6 i++)
{
Form1.Controls["textbox"+i.ToString()].Text=something;
}
|
|
|
|
|
Khoramdin wrote: textBox1
textBox2
textBox3
textBox4
textBox5
If you give them real names, they may make more sense. Then add a tag to each which is the same as the column you want to assign there, assuming they are columns from a single record. Then loop through the controls collection looking for the one with that tag.
Or you can create an array of textboxes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I need to implement daemon functionality(which is available in java) in c# without using windows service and sql job. Please let me know if anyone has any idea about it.
|
|
|
|
|
Prajin wrote: without using windows service
Why, what is wrong with a Windows Service?
|
|
|
|
|
Hi,
I need to implement daemon functionality(which is available in java) in c#. Please let me know if anyone has any idea about it.
|
|
|
|
|
In my application i am using a user control "aguage3" my problem is
private void aGauge3_ValueInRangeChanged(object sender, AGaugeApp.AGauge.ValueInRangeChangedEventArgs e)
{
GuageIndex = e.valueInRange;
}
but i need this GuageIndex value(which is coming from above event) in another event called
private void aGauge3_DoubleClick(object sender, EventArgs e)
{
}
The first event is in timer control so it varies automatically
how can i get this GuageIndex value in double click event
Please help me in this
Thanks in advance
PraveenKumar Palla
|
|
|
|
|
It looks like "GuageIndex" is a member variable of the class, so you should have no problem accessing it in the "DoubleClick" event handler. Otherwise, if there is a way to access this value in the control itself, you can do that in the "Double"Click" handler. Just guessing:
private void aGauge3_DoubleClick(object sender, EventArgs e)
{
int guageIndex = aGuage3.ValueInRange;
}
This assumes the existance of a ValueInRange property in the Guage control class.
|
|
|
|
|
yes "GuageIndex" is a member variable of the class, but the event aguage3_valueInRangeChanged is in timer which raises when the needle of the guage changes, so the "GuageIndex" value varies automatically but i need this exact value when i double click on the guage(user control)
NO "ValueInRange" property for the aguage3 user control
Thaks
PraveenKumar Palla
|
|
|
|
|
praveenkumar palla wrote: but i need this exact value when i double click on the guage(user control)
What do you mean ? How is the value ever not 'exact' ? How are you hoping for a delegate to help here ? Either way, you get the value when the event is fired, it's the only value you're going to get.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how do i change any date and time format to current computer datetime format.
|
|
|
|
|
What are you asking ? Doesn't the DateTime class automatically format in the current locale settings ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Use the convert.datetime and pass the IformateProvider information... You should be able to resolve the problem
|
|
|
|
|
RemotingConfiguration.Configure(Application.StartupPath + "\\Client.exe.config",false);
hi the above code is configurting the remoting with an config file
although i dont mind using an configuration file i would like to key in the ip programically...
could any one show me how i can set the ip programically while the rest of the configuration data get from the configration file pls
|
|
|
|
|
I study computers and multimedia and i just got my lesson in C language.I have a book with the name C outside but without # or ++ ...
I need to run a program hello world with these commands only:
#include <stdio.h>
main()
{
printf("Hello World\n");
}
I have the Visual Studio 2005.Can anyone tell me how to begin this little project?
Step by step please.What kind of project shall i begin. i used to work with C but in Visual Studio 6.With this version i am very comfused.
Thanks a lot
|
|
|
|
|
This is the C language.
In C# it would be
using System;
public class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello World!");
}
}
Regards,
Satips.
|
|
|
|
|
In here are any help topics about the C language?
Do you know how to write this hello world program in the C language,but in Visual Studio 2005 ?
Thanks a lot
|
|
|
|
|
In c i used to write Hello world.
<br />
#include <stdio.h><br />
<br />
main()<br />
{<br />
for(;;)<br />
{ <br />
printf ("Hello World!\n");<br />
}<br />
}<br />
But in VS2005 you try as how CG said.
Regards,
Satips.
|
|
|
|
|
C++ is a language built on C. You can create a C++ project and put C code into it. You can change the file names to .c from .cpp to get the compiler to force it to be C code and not C++.
C# is a completely unrelated language that uses the C in the name to indicate that it's syntax is somewhat similar to C++. Use the Visual C++ forum for C questions if you have them in future.
Good luck !!
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I created a txt file and puted the code inside and renamed the file to *.c,and Visual Studio 2005 opened it perfectly.but now another thing came up.The button of compiling are deactivated.How can i run it ?
Thanks a lot
|
|
|
|
|
(You have to watch your less-thans and greater-thans when posting here.)
#include <stdio.h>
main()
{
printf("Hello World\n");
}
Anyway, I did
Start|Programs|Microsoft Visual Studio 2005|Visual Studio Tools|Visual Studio 2005 Command Prompt
Then I used Edit to write the "Hello World" program and used cl hello.c to compile it.
But that's just me.
|
|
|
|
|
Go to File/New/Project. You have to create a project to be able to compile it. Create a C++/Win32 project.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all
I would like to write a little C# bit of code that is able to trigger the playing of short audio files from a trigger generated from say a microphone. Heres the setup - a Snare Drum has a microphone on it. You hit the snare, which pumps that sound into the mic input on a laptop. The software needs to read the mic input audio, and generate a "trigger" to play an MP3 or Wav file each time. It would be nice, but not mandatory, if the the strength of the snare hit could affect the volume of the triggered sound. Sort of a poor-mans sampler. Can anyone suggest how this could be done ? Any help appreciated...
|
|
|
|
|
Set up an wave input device using the managed[^] version of DirectSound. Record the input and perform a root mean square[^] on the buffers. When the intensity of the RMS reaches a certain point, trigger your sample. Use the RMS intensity to affect the loudness of the sample.
|
|
|
|
|
Thanks Leslie for the pointer
I dont suppose you could point me to some sample code as well ?
I'm finding it difficult to locate...
Regards
David Every
|
|
|
|