|
I have created a widows service,register it and it is working fine.
Now i have created Windows application.RIght Click the solution and click add new item.I have added windows service compiled code and register using "installutil C:\mcWebService\bin\Debug\windowsapplication1.exe"
Now when i go to computer->manage->services and start service it gives following error
"Error: 1053 the service did not respond to the start or control request in timly fashion"
any body has solution for this
|
|
|
|
|
installutil is for Windows Services, not Windows Applications.
|
|
|
|
|
Then when we create windows aplication and right click to add new item and add windows service class then how this windows service will run
|
|
|
|
|
You either want a Windows Application or a Windows Service, you can't have something that's both.
If you want both and want them to interact, you'll need to create your own way to do that.
What are you trying to do?
|
|
|
|
|
Hello,
I am writing a regular expression to divide a CSS file into rules like this;
#DTEST
{
border-style:solid;
border-width:thin;
}
I want to repeat a part of the pattern to match all attributes enclosed between the tow braces
the pattern I want to repeat looks like this:
[\n\t\\s]*[a-zA-Z\\-]+[\\s]*:[\\s]*[a-zA-Z\\-]+[\n\t\\s]*
Dad
|
|
|
|
|
|
I want to repeat a part of the pattern to match all attributes enclosed between the two braces
the pattern I want to repeat looks like this:
[\n\t\\s]*[a-zA-Z\\-]+[\\s]*:[\\s]*[a-zA-Z\\-]+[\n\t\\s]*
How to repeat this pattern? this pattern allows application to validate only one attribute
like this
color:red;
but if there is a lot of attributes i don't know
How to make the pattern match them all?
Dad
|
|
|
|
|
Regex.Matches returns a MatchCollection , if more than one match is found. I don't see your problem!?!
|
|
|
|
|
Here you go, I even tested it for you...your pattern appears to work fine and dandy:
string input = @"#DTEST
{
border-style:solid;
border-width:thin;
}";
string pattern = "[\n\t\\s]*[a-zA-Z\\-]+[\\s]*:[\\s]*[a-zA-Z\\-]+[\n\t\\s]*";
MatchCollection mc = Regex.Matches(input, pattern, RegexOptions.Multiline | RegexOptions.IgnoreCase);
Console.WriteLine(mc.Count);
foreach (Match m in mc)
{
Console.WriteLine(m.Value.Trim());
}
|
|
|
|
|
Thanks a lot,
I know that the pattern works well in the way you use it for getting the attributes inside
these two braces {} but what I've failed to do is to match the whole rule like this:
#DTEST
{
border-style
: solid ;
border-width : thin ;
position:relative;
right:10px;
left:900px;
width:50px;
}
This is the whole pattern:
[\\.#]?[a-zA-Z0-9_]+[\n\t\\s]*{[\n\t\\s]*[a-zA-Z\\-]+[\\s]*:[\\s]*[a-zA-Z\\-]+[\n\t\\s]*;[\n\t\\s]*}
but it works only if the css rule contains only one attribute like this:
.Red
{
color:Blue;
}
the question is how can I let it match the css rule even if it has multiple attributes.
Dad
|
|
|
|
|
I want to select a member of TabControl by stroking keyboard but not by clicking the mouse on it.So,I think I have to create a shortcut key for that member.Can you tell me how to create it? Thanks
Hello Friends
|
|
|
|
|
with a keyboard event ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
if i understand correctly you want to make a event on e keypress no with a mouse ex. pressing the F* to raise the event that you want.
i think that in the form that you want to do the shortcut you have to enable keyPreview to True and on the keydown event of the form you should write that on what keycode it should raise this event.
ex...
if (e.KeyCode == Keys.F8)
{
write the code...
}
maybe it should help
spaps
|
|
|
|
|
hi,
i get an error when i try to remove the specific row ....which is following
Message = "Rows cannot be programmatically removed unless the DataGridView is data-bound to an IBindingList that supports change notification and allows deletion."
how can i change the data-bound configuration .
|
|
|
|
|
Hi,
I am developing an windows based application in which some print menu is present which prints the project information.
So i am using "PrintPreviewDialog" control in my application. But the problem is when there is no printer installed in my computer then it is not showing the preview.
but in microsoft word and others it is showing the preview so.
How to show print preview when no printer is installed on ur computer or no printer is connected to your computer. At least it should show the print preview. Is there is some method or some property.
I am using printdocument object in it.
Please guide me.
|
|
|
|
|
Is print preview enabled for Wordpad or MS Word on that computer?
I would just install a generic printer driver and it should work. The printer doesn't have to be plugged in to do a print preview.
|
|
|
|
|
Word, Excel is showing the preview.
But my application is not showing preview
|
|
|
|
|
Even i am also facing the same problem.Can anyone please suggest me the solution?
|
|
|
|
|
|
relative to what ?
No.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
Sorry for the delayed reply but thank you very much for the useful answer.
Kind Regards,
Mushq
|
|
|
|
|
Very much a beginner C# person.
I need something simple and I'm pretty sure it can be done. I need to go to a website and simply see if a date has changed. I it has I need to pull the date back in. The date always follows the same three words so it will be easy to find.
Thanks for any who can help
dflat4now
|
|
|
|
|
Not sure I fully understand this, but it sounds like you're talking about a specific web page, and you know roughly where to find this date on the specific page. That should be easy enough--just download the content to a string via http, then "find" the date in the string (i.e. by locating the "same three words"), trim the rest away so you just have the date text, then parse this into a DateTime object using either DateTime.Parse, or another (third party) date-parsing algorithm (there are some on CodeProject) depending on the format of the date.
“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!
-”-”-
|
|
|
|
|
Use WebClient class to download the webpage content. Write a regular expresssion which finds the required date.
|
|
|
|