|
Try using the Regex.Replace[^] function.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
With a single line of code:
Dim cleanString = Regex.Replace(LineText, "[^A-Za-z\d ]", " ")
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
If e.KeyCode = Keys.F1 Then
'MsgBox("F1 pressed")
AxWindowsMediaPlayer1.URL = "E:\iva_megh\audio\welcome.wav"
Play()
Do While AxWindowsMediaPlayer1.status <> "Stopped" And Timer1.Enabled And Not bInterrupted
Application.DoEvents()
Loop
End If
Sorry do not know how to continue the thread. Please inform me.
Thank you for all the efforts!
|
|
|
|
|
meghanaVishwa wrote: Sorry do not know how to continue the thread. Please inform me.
When viewing the message you want to reply to, simply click the "reply" link and write the new message. It will automatically be appended to the thread with the appropriate indenting level based on the message to which you were replying.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
meghanaVishwa wrote: Do While AxWindowsMediaPlayer1.status <> "Stopped" And Timer1.Enabled And Not bInterrupted
Application.DoEvents()
Why is this not a complete waste of code ? I don't see what it could possible achieve?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
i have written it but the control is not going there when i debug it
|
|
|
|
|
yeah, great. why don't you use the thread you already started?
what did you write?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi,
I beleive this sample code is in C#:
string cleanString = String.Empty;<br />
Regex reg = new Regex("[A-Z]|[a-z]");<br />
MatchCollection coll = reg.Matches(<mystringgoeshere>);<br />
for(int i = 0; i < coll.Count; i++)<br />
{<br />
cleanString = cleanString + coll[i].Value;<br />
}</mystringgoeshere>
See, i want to remove all characters that do not fall in the A-Z or a-z OR 0-9 category AND replace it with a space...
example test123t3er = test t er
Am i wrong in saying that the Regex reg = Regex("[A-Z]|[a-z]") CAN IT BE: Regex reg = Regex("[A-Z]|[a-z]|[0-9]") ???
AND the cleanString = cleanString + coll[i].Value;
CAN I DO A TEST: IF(coll[i].Value == String.Empty) THEN cleanString = cleanString + " " ELSE cleanString = cleanString + coll[i].Value ???? - in this way i add space if the character is not in the above category????
So please help me convert the very top section of code and i will build from there...
Thank you in advance...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
(via Instant VB):
Dim cleanString As String = String.Empty
Dim reg As New Regex("[A-Z]|[a-z]")
Dim coll As MatchCollection = reg.Matches()
For i As Integer = 0 To coll.Count - 1
cleanString = cleanString & coll(i).Value
Next i
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB, C#, or Java to C++/CLI
Java to VB & C# Converter: convert Java to VB or C#
|
|
|
|
|
Hi All,
Please help me!
I have windows media player 9.0 control on the form. The audio should be played on click of a particular button from the keys present in the keyboard. How do I know when the key is pressed? How to get the key pressed event?
Bye
Megh
modified on Tuesday, March 11, 2008 9:53 AM
|
|
|
|
|
meghanaVishwa wrote: How to get the key pressed event?
The same way you get all other events: Select the control for which you want to insert an event on the left combobox above your code-window, then choose the event from the combobox on the right hand side.
meghanaVishwa wrote: How do I know when the key is pressed?
If e.keycode = YourKey then...
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
i want to pass the integer parameter fields to Crystal Report through .net 2003.i want in windows application.
|
|
|
|
|
i want to become incredibly rich without having to do any more work for the rest of my life.
(btw, it's urgent!)
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Here[^]
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi,
I’m trying to create the following Datalist in vb.net in the code behind window. I want to create the items in code rather than in the designer as I want to avoid an image placeholder appearing on the webpage if the value in the database is null.
Does anyone have a complete example they could share please?
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# Eval("prod_image", "~/images/{0}") %>'/><br />
</ItemTemplate>
</asp:DataList>
Thanks,
Nick.
|
|
|
|
|
Have you solved this?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
I have been trying to figure out a way to enable autofill in the webbrowser control. I finally found a way, but the user has done something which I cant figure out how to do:
Public Sub GetHostInfo(ByRef theHostUIInfo As DOCHOSTUIINFO) Implements IDocHostUIHandler.GetHostInfo
theHostUIInfo.dwFlags = theHostUIInfo.dwFlags Or CType(DOCHOSTUIFLAG.DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE, Integer)
End Sub
How can a sub implement an interface? I'd appreciate any help with this. I know of a way to user IDocHostUIHandler and implement it on a class and then assign use ICustomDoc.SetUIHandler() to assign it to it, but the problem is I only need to use the GetHostInfo sub. Doing so overrides all the webbrowser control functionality. Is there a workaround? thanks in advance! The link where I got this from is:
http://www.vbdotnetforums.com/showthread.php?p=76778#post76778[^]
|
|
|
|
|
Hi,
I am looking for a Calender cum Sheduler control for VB.NET applications.
Which shows information, day/month/year wise.
Please if anybody know a control similar to the need or atleast provide calender control with day/month/year view...
Please post the links.....
Note: It's better if it is an Open source.
Jats
|
|
|
|
|
don't know about any open source one's at least none that you can use without adjusting it
but codejock and devexpress have some good ones (ofcourse you pay for it)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Thank You...
Do you have any idea of...
How to create our own calendar control...
I had started working on it, and i am thinking to link Datetimepicker with datagridview to display the complete month of the of the user selection in Datetimepicker. (Still working on this)
Once that can be done i will write the cellclick event of the datagridview to add user personalized events to the cell.
This is just one of my thoughts.. Please add on if you have any...
Thankx again...
Note: If you are not sure of my idea the output should be some what like the below link
http://geekswithblogs.net/kobush/archive/2006/01/02/64660.aspx[^]
Jats
modified on Tuesday, March 11, 2008 11:40 AM
|
|
|
|
|
Jats_4ru wrote:
Note: If you are not sure of my idea the output should be some what like the below link
http://geekswithblogs.net/kobush/archive/2006/01/02/64660.aspx[^]
Did you realize, that you can download the sourcecode for that control there?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Ya, I did, but the control is displaying only the calender where as i need to add schedules to it.
There the problem arraises, So i wanted to develop my own...
Jats
|
|
|
|
|
After searching through various classes including Arrays, ArrayLists, Lists, Dictionaries I'm still unable to find a class with the functionality I need, maybe it's how I implement it.
Anyway, I need a very dynamic array.
* The number of elements must be dynamic.
* The number of dimensions must be dynamic
I want to use this to create a treeview, is there a better way?
Regards
|
|
|
|
|
you could create a list of lists, and use the old ArrayList class, which means that your objects at each level can be a List<T>, or T, or you can put List<T> at every level and just store a T at the bottom, and replace it with a list if you want to add another level.
No, that won't work, you need ArrayList. Sounds nasty.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
I have developed one desktop application for jewellery. I want to get current rate of gold from internet and show to my desktop application
please tell me how to do this.
it's really very urgent
with Regards
Ershad Ali
|
|
|
|