|
Thank you for the tip. Unfortunately I avoid WMI since it requires admin priveleges to use.
|
|
|
|
|
hai,
when i register my details how to create folder in my name .
if u know the code replay to me.
|
|
|
|
|
System.IO.Directory.CreateDirectory
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 )
|
|
|
|
|
Like this
System.IO.Directory.CreateDirectory(@"C:\New Folder");
|
|
|
|
|
I have RichTextBox control. I want to save the text in a stack for Undo operation each time user changes/updates the Text.
I dont to want to use TextBox Base Undo functionality bec i have other controls whose state also would be saved in the same stack.
If i use TextChanged event it occurs on each character typed. I dont want this. I also tried using RichTextBox.Leave event but this works only if control leaves the TextBox.
I want to save the Text in the stack on following scenarios
1. User selects already typed text and changes it
2. User deletes the Text and types again etc
Basically it should work like how the Undo works in Ms Word when you type in some text.
Your suggestion is really appreciated. Please help
|
|
|
|
|
Hi Everybody,
I have a problem flow:
I have a datagrid. When my cursor on cell[0,0],after fill data in, if I press enter, cell [1,0]and cell[2,0] auto fill data(data defend on myshelf) and the cursor jump to cell [3,0](cell haven't data),then I press enter it jump to cell that haven't data auto fill next.But if I press shift+enter the cursor jump to cell that haven't data auto fill front.
That mean I want to control key enter(key enter change for key tab) that my cursor just jump to cell haven't got data.
Please help me!
Thank you a lot,
|
|
|
|
|
I guess you need to handle the keypress event, iterate over cells and set the focus to the next empty one
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 can't control complex key(example shift+enter the cursor jump back to empty cell).
thank!
|
|
|
|
|
Why not ? Where are you stuck ? The key press event has properties that will tell you if shift is down
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 )
|
|
|
|
|
can you tell me more detail please.
For example when my cursor in [0,0] I press enter, it jump to [2,0]
When my cursor in [2,0] if I press shift enter it jump to [0,0] but If I just press enter it jump to[0,3]([0,0][2,0][3,0] are the cells that I have to fill, [1,0] is auto filled when my cursor in[0,0] and I press enter.
Help me please,
I also ask someone but they can't help me.
|
|
|
|
|
I'm not really sure how I can make it clearer without doing it for you. Do you know anythign about C# ? Have you considered buying a book and working through it ?
An event is fired when a key is pressed. You can subscribe to this event. You can then check what keys were pressed, and respond accordingly. If you know what cell you are in, you can check other cells and move the focus to whatever cell you like.
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 all,
I have two C# project. One is a C# .Net service and the other one is a Dialog based C# project. From the dialog based project, using a button click I want start the service and do all required processing. Its simple, I used a serviceController component and do it.
Now I want to make a slight change. On the button click event I want to send some parameters to the service and use it in the service. How can I do that.
In simple work how can I access from one project to the other
Thanks.
I appreciate your help all the time...
Eranga
|
|
|
|
|
You need to change the service code, then update your reference to it, then your method will have those parameters.
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 )
|
|
|
|
|
Christian Graus wrote: You need to change the service code
What you mean change the service code, mean that change the code according to required process, its ok to me.
Christian Graus wrote: update your reference to it
That's where I'm really stuck. Can you explain little more.
I appreciate your help all the time...
Eranga
|
|
|
|
|
The dialog app must have a reference to the web service, to be able to call it. Right click on it and choose 'update' once you've updated the live service. Or just delete the reference and create a new one
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 )
|
|
|
|
|
Yes I add a reference to the dialog based project.
System.web.service
But I can't call any function from the other project(.Net service)?
I appreciate your help all the time...
Eranga
|
|
|
|
|
.NET Service or WebService?
only two letters away from being an asset
|
|
|
|
|
No it's .Net service, a Windows Service. I work on Visual Studio .Net 2003
I appreciate your help all the time...
Eranga
|
|
|
|
|
Oh - a Windows service.
I don't see how that makes any difference. To call one project from another, you need a reference and if you change the project you're calling, if you update your reference to it, you'll see the new methods.
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 )
|
|
|
|
|
Christian Graus wrote: you need a reference and if you change the project you're calling
I think I'm mess with this. Make reference between two projects. Is that correct I have done as including,
System.web.service
as the reference to the dialog based project.
I appreciate your help all the time...
Eranga
|
|
|
|
|
CodingLover wrote: stem.web.service
How, just by including the generic service class, does your dialog project know how to call your windows service now ?
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 )
|
|
|
|
|
Actually what I have done is add a new reference to the dialog based project(Windows Application) as I mentioned above.
To call the service(simply start, stop the service) I used a serviceController component in dialog form. So I can used
serviceController.start();
serviceController.Stop();
etc....
What I want to do is, send few parameter to the service either on Start() or anywhere else.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Oh... you're not adding a method, you want to specify parameters.
http://msdn2.microsoft.com/en-us/library/9c38b683.aspx[^]
When you open the brackets on your start call, intellisense will show you that there are two possible methods to call. One of them takes a string array, of arguments to pass to the service.
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 )
|
|
|
|
|
There are plenty of results here[^]
Cheers,
Vikram.
If the radiance of a thousand suns
Were to burst at once into the sky
That would be like the splendor of the Mighty one—
I am become Death,
The shatterer of Worlds.
|
|
|
|
|
Thanks pal,
Actually I'm stuck with passing parameters in two projects. Not in a same project(between classes.)
I appreciate your help all the time...
Eranga
|
|
|
|