|
MSDN on Process.GetCurrentProcess() says: Gets a new Process component and associates it with the currently active process. I can see no plural form anywhere, so why use foreach ?
|
|
|
|
|
I wish to create quite a number of TextBox controls in a form.
Is there anyway I can create a array of TextBox controls, so the controls can be updated by calling the array control with index.
for example I can update all the TextBox Text by the following code:
int i=0;<br />
foreach(TextBox txtBox in txtBoxes)<br />
{<br />
i++;<br />
txtBox.Text = "Control " + i;<br />
}
where txtBoxes is a array of all the TextBox controls in the form.
*12Code
|
|
|
|
|
follow the steps.
TextBox[] textBoxes=new TextBox[]{txt1,txt2,txt3,txt4};
foreach(TextBox t in textBoxes)
t.Text=string.Empty;
where txt1,txt2,.. is the name of TextBoxes in Form.
|
|
|
|
|
Hi
I how to create banner maker application using c#.net with windows aplication.The sample site like www.bannersnack.com.Having one option craeting own banner maker component.If somebody know plz suggest me.Thanks in advance.
With Regards
Ch.Gayatri
|
|
|
|
|
That's like walking into a gathering of masons, pointing to a house, and then asking whether one of the masons can explain how you build it, using concrete slabs. I doubt that this approach will have a high rate of success.
Now, if you'd simply pick up a brick, and start the actual motion - the masons here would take interest since you're doing what they love to be doing. Come back from time to time, and show off your progress and hard work, you'll find that lots of masons here will gladly help you out if you get stuck
I are troll
|
|
|
|
|
Thanks 4 ur beautiful comment.
I definitely do that one.Plz if you wont help, don't discourage us.I am new in this field.I too want to learn.
with Regards
Ch.Gayatri
|
|
|
|
|
You asked a very imprecise question. You also gave the impression that you wanted someone else to do your work for you. No one is going to do that for you.
Eddy, quite rightly, suggested that you think about the problem like a series of bricks which if put together properly will give you a house. You need to think of what parts you might need to make a banner app. If you are too thick to do that, then give up now, take up a different hobby/career, knitting for example, where you can buy ready made patterns. No thought required, at all.
Wait a minute, that gives me an idea, have you learned how to Google yet? Yes, then bloody well use it! 'Banner application c#' should do the trick.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
I am working on tab form i need to do focus on first text box of tab page i already post this issue but i didn't get result please tell me what i should do.
On form load first tab page will display and first text box must be focus like courser must be blink their.
Thanks
|
|
|
|
|
write following to your form load and tabControl selectedIndexChange Event.
void setFocus(byte selectedIndex)<br />
{<br />
switch (selectedIndex)<br />
{<br />
case 0:<br />
txt1.Focus();<br />
break;<br />
case 1:<br />
cmb1.Focus();<br />
break;<br />
}<br />
}<br />
void TabControl1SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
setFocus((byte)tabControl1.SelectedIndex);<br />
}<br />
void Frm_Form7Load(object sender, EventArgs e)<br />
{<br />
setFocus((byte)tabControl1.SelectedIndex); <br />
}
set the control TabIndex to 0 and you can also set the TabControl TabStop to false.
|
|
|
|
|
Have you checked out the MSDN documentation for the Form, TextBox, and TabControl classes? Everything you need to answer your question is there.
Dybs
|
|
|
|
|
Open the form in design view.
Click on the View menu, you will find a Tab Order option. Use it to set tab order for all your controls. No code needed.
Regards
David R
|
|
|
|
|
Ok. I am not putting up an example because I really dont think it is needed. I have a form with a split container with another split container in that. I have the containers displaying a treeview and a property grid. I also have the standard menus on the form. There really isnt that much. my problem is that i have the split containers hidden when the form is loaded, when i press new it displays them. My problem after i press new the form loads one split container then the other one. it doesnt look very good. is there any way i can speed up the loading?
|
|
|
|
|
Some controls have a suspend/resume layout which may be useful, I do not think you will get a good resolution unless you are doing a lot of processing in the container load.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i tried to import excel file to gridview but this error message appeared(failed to map path)and i can't handle it and any code contain server.map path statement the same error message appear .
what i can do to solve this problem.
thanks
|
|
|
|
|
I have been working with XML documents for quite some time in C#, and I am quite familiar with XSD validation. Question, is there a similar technology/standard that repairs erroneous documents, or does anybody have any techniques for doing this?
Many thanks
|
|
|
|
|
how to make communication between two systems using SIP server.
yogesh
|
|
|
|
|
I want to check the where are the co-ordinates of mouse using on mouse move Or OnMousehover. I am new to C# pls let me know how to write handlers for MOUSE move or mouse click.
|
|
|
|
|
Try googling for 'handling mouse events c#' you'll get loads and loads of hits, some of which might be useful.
If google is broken where you are, the MSDN Library is your friend.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
thanks for you reply. it is helpful. I am loading a background image on form and again loading some small images on it and i want to capture move over to these small images and change the cursor shape. I am facing problem here. if u know how to do it...will be helpful...
|
|
|
|
|
It depends on how you are loading the small images, and what you are loading them into.
You will have to give more information to get a useful reply.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Supra2 wrote: I am new to C# pls let me know how to write handlers for MOUSE move or mouse click.
On the controls that you want to detect mouse movement.
|
|
|
|
|
public List<int> CreateTableInstance(List<int>[,]myBoard)
{
List<int> zero = new List,int>(1);
zero.Add(0);
for(int y1=0;y1<3;y1++)
{
for(int x1=0;x1<3;x1++)
{
myBoard[x1,y1] = zero;
}
}
return myBoard[3,3];
}
private void button1_Click(object sender, EventArgs e)
{
List<int> theBoard = new List<int>();
theBoard = CreateTableInstance(theBoard);
}
/pre>
I know there is some syntax wrong, but I can't seem to get it to work through trial and error X| </int></int></int></int></int>
|
|
|
|
|
stonebergftw wrote: I know there is some syntax wrong, but I can't seem to get it to work through trial and error
Can I suggest that you read up on how the language works? It will save you a lot of frustration as trial and error, while excellent practical methods once you understand the theory, will only take you so far. Without the knowledge of what is supposed to happen it will often take you the wrong way down the path.
Now, as for your code, could you post it again so that the Browser doesn't eat the angle brackets? Do that by ensuring that "Auto-encode HTML when pasting?" is checked.
Finally, you might like to tell us what your code is supposed to do so we understand better what to look for.
|
|
|
|
|
<pre>public List CreateTableInstance(List[,]myBoard)
{
List zero = new List,int>(1);
zero.Add(0);
for(int y1=0;y1<3;y1++)
{
for(int x1=0;x1<3;x1++)
{
myBoard[x1,y1] = zero;
}
}
return myBoard[3,3];
}
private void button1_Click(object sender, EventArgs e)
{
List theBoard = new List();
theBoard = CreateTableInstance(theBoard);
}
|
|
|
|
|
public List CreateTableInstance(List[,]myBoard)
If this is the List in .NET, and not your own class, then it is a generic and must be specified as such
List<Type>
List[,]myBoard
You are defining a two dimentional array of list objects here called myBoard. Is that what you want to do, an array of lists?
List zero = new List,int>(1);
This is completely confused. You have a non-generic List on the left, and on the right is a half baked attempt at instantiting a generic list object containing integers with an initial capacity of 1.
List theBoard = new List();
theBoard = CreateTableInstance(theBoard);
You have already defined CreateTableInstance as requiring an array of list objects. However, you are passing a list (not an array of lists).
That takes care of the syntax errors that I can see. However, your compiler will have told you all about these already. Right?
You have not, as I requested, told me what you are attempting to do. By reading the code I cannot tell what it is you are trying to do because the code is too confused. You do one thing on one line, and then you undo it later on. Or you perform actions that have no effect because you throw away the work they have done.
|
|
|
|