|
Message Closed
modified 27-Apr-15 11:03am.
|
|
|
|
|
Hi Mehmet
I don't understand your question.
Do you mean - how to change the User Interface, or parameters, etc. on the new form ("mehmet" in your example)?
In that case, you do it the same way:
Create public properties on the Form1, that way you can use these parameters to change the values on the newly opened form:
Here is a fragment of the newly opened form
public class FormSettings : Form
{
private TextBox txtName;
public string Name
{
get {return this.txtName.Text;}
set {this.txtName.Text = value;}
}
}
Here is your code, with added code to change what text is displayed in the textbox shown above:
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
{
Form1 mehmet = new Form1();
mehmet.Show();
mehmet.Name = "A name...";
}
Hope this helps
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
Hi guys,
I have a datagrid control in my c# application and I want to select more than one cell at same time,
the problem is that the control not allow to do it.
If someone know how to do it please help me!!!!
Thankyou a lot in advance.
Mirko.
|
|
|
|
|
Hello there
I have a string with one line repeating after every 10 lines
I want to replace the first line only and let the other as its.
the problem is when I use variable.replace(findString,ReplaceString);
it replaces all.
can anyt one tell me how to replace the first string only
Rizwan Bashir
|
|
|
|
|
I think you have to use IndexOf to find the position of the searched string, then use SubString to get the left and right parts of the string and finally concat everything together.
|
|
|
|
|
Hi,
It is simple. First use the IndexOf method to find the index of the sring. then using length property just remove the string to be replaced. then insert new string at the same index from where we first removed the string.
Hope this algo works. i havent checked but its the only solution i could figure out.
Anant Y. Kulkarni
|
|
|
|
|
The RegEx.Replace method can replace a specific number of occurances:
variable = new RegEx(RegEx.Escape(findString)).Replace(variable, ReplaceString, 1);
If ReplaceString contains any $ characters they have to be replaced by $$.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
if you are planning to perform number of successive operations on strings, then it is recommended that you use the StringBuilder class. It will help your program performance. This class is somehwere in the Text namespace i think. try searching for it in MSDN or google.
Anant Y. Kulkarni
|
|
|
|
|
hi all,
i wanna ask somethin about the forms.
let's say i've 3 textbox which hold the info of name, surname and age of a people.
then i place a button Submit. my simple form is finished. but then i want to add another text field to hold email data right up to my Submit button.
when browsing with TAB key, i fill first 3 text box step by step then jump to Submit button and after that cursor places on eMail textbox.
what should i do to fill eMail textbox before jumping to Submit button ?
help please...
ps: for this simple form, it's easy to delete Submit button and place a textbox then put the button on form again so as to achieve what i ask for above.
but what if i work on complex forms? this remove & place operations will undoubtedly severe headaches
|
|
|
|
|
Hi,
You can set the tabindex property of the control to get the desired result.
Hope this will solve your problem.
Best Regards,
Apurva Kaushal
|
|
|
|
|
1) Open form in designer
2) View menu>Tab Order
3) Click on elements in the order you want them tabbed
4) View menu>Tab Order (to switch off)
Job done!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi,
Can any body tell me how to set up an interactive service using C# service project...
Regards,
Waqas.
|
|
|
|
|
Hi,
A windows service can be interactive by implementing the OnCustomCommand event in your service. This event is fired when a custom command is send to your service through a ServiceController. You can then implement various logics accordingly in your service so that it turns interactive. For this you will have to create a front end application which has a service controller for your service and then pass custom commands to your service thorugh that controller. the ExecuteCommand statement in the service controller accpets an integer argument denoting your custom command type. you will have to decide over these commands and there numbers to distinguish between.
Hope this helps you.
Anant Y. Kulkarni
|
|
|
|
|
how can i have checkboxes for only child nodes in a windows treeview control? i dont want to have checkbox for all of node.
i used visual2005! thanks !!!
I Love C#/VS2005!
http://justinw.cnblogs.com
-- modified at 8:18 Tuesday 16th May, 2006
|
|
|
|
|
help!
I Love C#/VS2005!
http://justinw.cnblogs.com
|
|
|
|
|
Hi,
I have to draw line with the properties like in MS-WORD like Style and Weight. The Constructor of Pen class ask for Width of Pen in float. How can I relate width to Weight of line. Say I have to draw line of .75 pt then what will be the width of line...
Any idea??
Thanks in advance
|
|
|
|
|
Read about property Graphics.PageUnit and GraphicsUnit enumeration.
Best regards, Alexey.
|
|
|
|
|
Hi,
Has any body worked on windows hooks regarding file and folders their click events and things like that... I am talking about windows system hooks and not the local hooks for keyboard or mouse etc...
If there are any samples around that could help... it will be a great favor... sample about hooks in general is located at http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/ and it discusses local hooks... if any body has something other than this... please do forward that.
Thanks
Regards,
Waqas.
|
|
|
|
|
What is it specifically you are trying to do? If you want to integrate with the shell from .NET, there is a section of articles here on Code Project that details how this works, check it[^] out.
|
|
|
|
|
Actually I have got a project that does file and folder encryption and for that purpose I need the knowledge of file and folder hooking so that whenever a user double clicks an icon of file or a folder then before that event of file/folder being opened, I could do my check of encryption decryption...
Looking forward for your reply...
Regards...
Waqas.
|
|
|
|
|
Could you please send me the link of that project
|
|
|
|
|
can anyone give me the solution to upload a file to the remote server from the windows application..
ssr
|
|
|
|
|
What protocol would you like to use to transfer files?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi,
I have an application where in I have two ways to capture data in a text box one is using scanner attached to USB port and other is via keyboard.
Before the text box population by scanner how can i know that data is coming via scanner so that i can avoid populating text box (as for some text boxes its mandatory to enter data via keyboard)
Thanks,
Amit gupta
|
|
|
|
|
I hope i have understood your question. It seems to me that you are saying that some textboxes get data from the scanner and others get data from the keyboard. If so, you could set the ReadOnly property of the textboxes for the scanner to true and populate them programmatically.
I hope this helps.
|
|
|
|