|
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.
|
|
|
|
|
Hi
But it will be greyed out and i wont be able to use keyboard also which i have to do?
Amit
|
|
|
|
|
What component are you using to get data from your Scanner? You may have to see if your scanner's component has an event that fires before it sends data.
|
|
|
|
|
Hi,
There is no component used as such.When i attached scanner to USB part and in my app when i set focus on any text box and scans any bar code text box itself gets the data guess its default behavior.
I dont have much idea about any component. I have been looking for some solution from quite some time on google also but till dat i havent got anything.I could find that input comes in the same way as it comes via using keyboard using virtual keyboard.Also i captured the windows messages being fired in both cases(scanner and keyboard) but they were also same.
Thx,
Amit
|
|
|
|
|
hello everybody in this forum.
i need to ask one question.
i had implemented multicast chat room to connect to multicast enabled ip address and on a specific port.
that's ok......
actually all users will be connected to that chat room who will connect to that ip address with that port pair.
but what if i wanted to create multiple chat rooms .
does that mean i will use multiple ip addresses and multiple ports for creating multiple chat rooms or it is only one ip address and port pair that i will relay on but with additional coding ?????
Human knowledge belongs to the world.
|
|
|
|
|
Hi all,
I want to mark a blocked ComboBox with the "Cursors.No" curcor symbol but in the text area of the combobox the cursor changes always to Ibeam independent of the controls cursor setting.
What's to do to change this behavior and get a cursors.no symbol on all areas of the control ?
Tnx in advance
Frank
|
|
|
|
|
Hi,
try assigning the cursor type to System.Windows.Forms.Cursors.No in the MouseMove event handler for the combo box. This should solve your problem
Anant Y. Kulkarni
|
|
|
|