|
Hi.
It still does not work.
New problem:
The user input is like this
Breakfast: Sliced Bread
Lunch: At McDonald's
(had some coffee and snack)
Dinner: Chicken
Supper: Mexican
and my match.Groups[0].Value is
Breakfast: Sliced Bread
Lunch: At McDonald's
instead of
Breakfast: Sliced Bread
Lunch: At McDonald's
Dinner: Chicken
Supper: Mexican
Why?
This is starting to be embarrassing
Kjetil
|
|
|
|
|
No, that is not correct. If you check your result again, you will see that you are getting the breakfast and the dinner. That is because the pattern is consuming the line break before and after each match, so the next line won't match.
Change the part of the pattern that matches the end of the line or end of the string from (?:$|\r\n) to (?=$|\r\n) to make a zero-width positive lookahead.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello Experts:
I want to open a Project developed in VS 2008 with 2.0 Framework. How can I open this complete project in C sharp Express Edition 2005. I can only be able to open .cs extension file but not the complete project.
While I am trying to open .csproj file I receive the following error message.
Unable to read the project file xyz.csproj.
thanks
|
|
|
|
|
In the .SLN file:
It looks like this for VS 2008:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Change it to:
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Now you can load the solution. I have does this in the past and it works without issues.
|
|
|
|
|
Dear Expert:
I have tried your method but it does not work so finally I have created a new project in Express Addition and add .cs files into it and it works fine.
thanks for your quick responcce...HIghly appreciated.
|
|
|
|
|
Unless you really dig into the text behind the solution (and project) file, you will not be able to change a VS2008 solution to VS2005. You did exactly what should have been done: include the .NET 2.0 compatible projects into a new VS2005 solution.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hello all.
I want to generate a tiny preview image from a website by C#.
Do you have any suggestions ?
Thank you
modified on Wednesday, August 27, 2008 7:58 AM
|
|
|
|
|
|
Wow, nice response.
Thank you
|
|
|
|
|
There is an excellent WebBrowser wrapper control done in C# that gives you much greater control over the web browser--one such feature is the ability to generate a thumbnail for the current page:
Google Group[^]
CodeProject article (older)[^]
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
hi everyone.
when you select the day, month or year in the DateTimepicker control (i.e. 08/26/2008 ) suppose here i have selected the year,
when i click the Up Arrow key it will increment the year automatically but how to do that by pressing any other key.
regards
Vinayskvs
|
|
|
|
|
vinaykskvs wrote: Please help me its urgent
So what?
This is annoying and rude. You have the same post on this page.
vinaykskvs wrote: when i click the Up Arrow key it will increment the year automatically but how to do that by pressing any other key.
Have you ever hear of events...Fire a event when some key is pressed. On that event do whatever you want to do.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
yes but i didnt get any reply may be my question is not proper for others to understand, u people will just find these things like does he repeated the same question or he is asking something else..
But hardly few people will give the solution not Good soln but the Best..
so plz if u have understood my question please try to help me.
|
|
|
|
|
vinaykskvs wrote: But hardly few people will give the solution not Good soln but the Best..
Did you even read what I answered...or your definition of solution is cooked CODE
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i dont know. i modified my question a bit in the previous post can u plz see that solve my problem...
|
|
|
|
|
private void dateTimePicker1_KeyPress(object sender, KeyPressEventArgs e)
{
int LiYear = dateTimePicker1.Value.Year + 1;
dateTimePicker1.Value = new DateTime(LiYear, dateTimePicker1.Value.Month, dateTimePicker1.Value.Day);
}
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hello
iam working on report for printing barcode serial
but i hvae problem that report have custome size about 2*3.5 cm for each label
so i want to resize the details section to that size but i don't know how to do that it's y first work with barcode reorts and that project was created on .net 2003
can any one help me quickly
md_refay
|
|
|
|
|
Is it possible to detect the insertion and removal of Plug and play devices (for example : keyboard , mouse etc) while the computer is still ON. We wanted to do the above in C#. We tried a couple of WMI classes like win32_Keyboard class, but after manually removing the Keyboard, there was no change in the Property "status" of win32_Keyboard. it showed that the status was OK.
We also tried a piece of code which uses win32_DeviceChangeEvent but that also doesnot seem to work for plug and play devices.
Plaese can u suggest some Solution to this problem.,
thanks in advance
|
|
|
|
|
Hello
VS 2008
I have a resource file called Form1.fr-FR.resx which has been added to my project when I set the local and language of the form.
In my Form1.fr-FR.resx I have button1.Text, button2.Text. I have set the culture to fr-FR so when the form starts its displays the french language in the buttons.
However, I would like to include some string of my own in this file. I have added strName, strAddress as I want to display these in a message box. However, when I add more control to the form the string I have added get deleted. When I open the Form1.fr-FR.resx using edit plus the string are there. However, when I try and display them, I just get a blank.
Is there some reason that the strings don't persist in the resource file?
Some code that I am using:
Dim rm As New ResourceManager("LanCulture.Form1", Me.[GetType]().Assembly) <br />
Console.WriteLine(rm.GetString("strName", Thread.CurrentThread.CurrentUICulture))
Many thanks for any advice on this,
|
|
|
|
|
steve_rm wrote: Dim rm As New ResourceManager("LanCulture.Form1", Me.[GetType]().Assembly)
This is C# forum.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi
I've made a graphic simulation with a timer. But now I want to stop the simulation (but not disappear) only freeze the simulation.
I've already tried to use a do-while-loop but then the application crashes.
I've also tried to use a if-loop and in the loop set the length (that the application have to drawn) to zero but it doesn't freeze.
I've also tried to use in a if-loop, to call another function which doesn't do anything but this doesn't freeze the application.
Also I did this in a do-while-loop but then it crashes.
Does someone knows an answer and perhaps knows an example that I can understand what you're trying to say.
PS: The simulation is shown in a pictureBox
|
|
|
|
|
Graphic simulations often depend on calculations done in an Update loop based on the time that elapsed since the last frame. If you set the elapsed time in your update loop to zero (i.e.: "no time elapsed since the last frame"), you can bring your simulation to a halt.
Another possibility would be to set a flag bool paused = true and stop any updates whenever this flag is true .
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank you for your reply. Is there also an oposit of Update()? Something like .Pause()? I've tried somethings out but they aren't right.
|
|
|
|
|
Those methods handle completely different functions then what you may thinking. Update() or Invalidate() are used to refresh the entire form based on the information contained in the OnPaint event. Their is no way to pause the OnPaint event unless you write your own graphic logic. One of my articles Basics of Falling Blocks in VB2005[^] has been able help some people understand how the painting system works in WinForms as well as how it should be thought of.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
1. With a System.Timers.Timer just use the Stop() method to stop the timer.
2. With a System.Threading.Timer, just don't use this timer (why? read documentation). Replace with a System.Timers.Timer
3. For good performance forget timers. Force rendering into app's main loop (as Greeeg mentioned)
modified on Wednesday, August 27, 2008 8:03 AM
|
|
|
|