|
Hi,
Set the debugger in your code.........
and then run your project...........use keys of F10 and F11...
Nisar Inamdar
Always For U.
|
|
|
|
|
When developing a windows service I'll normally make it as a self contained class library. I'll then develop most of it using a console frontend and only when I'm done transfer it into a windows service and test it in place.
When you have to debug a windows service you can open a new Visual Studio and use Tools >> attach to process to attach the debugger.
|
|
|
|
|
Can you please give me a link how to perform debugging usign "Attach Process"
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
|
This link tells how i can test the service but i want to debug the service
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
|
hi,
Do one thing...........
In properties window of textbox select events tab (shown like lighting)...
there is keypress event.............just doble click on it..........it will goes to code the function...........
Nisar Inamdar.............
Always for U..........
|
|
|
|
|
There are two ways you can create the event handler routines for the key press event.
Firstly in your initialisation routine type the following: (where "textBox1_KeyPress" will become the event handler routine)
textBox1.KeyPress += new KeyPressEventHandler(textBox1_KeyPress);
(As you are using Visual studio as soon as you type the "+=" part Visual Studio should prompt you with an auto complete option - press tab twice and it will create both the above line and the event handler routine)
2nd way is through the form designer. Click on the textbox and go to the textbox properties window. Click on the events button (the little lightning icon) then simply double click inside the KeyPress item in the list. This will create the routine for you and should take you to the code.
|
|
|
|
|
yep i like the second one, easy and gud... thanks dudes
Becoming Programmer...
|
|
|
|
|
HI:
i want to develop an application in which when i write text in textbox in english it converts into unicode and displays text in urdu.
anybody have idea about it
Thanx in advance
Farhan Ali
|
|
|
|
|
|
|
Is it me or is the documentation on setting up a secure tcp channel in remoting particularly opaque?
Please, can someone explain to me in words (preferably) of one syllable how to use the .Net remoting 2.0 tcp security model to do the following:
Cause authentication and encryption to be required on calls to a singleton remoted object.
The scenario is: I have a huge LED display board in a call centtre. The server it is connected to (by RS232 (quaint)) exposes it's interface as a remote object. A web site on the intranet remotes in to set the text on the display. The web site is Windows authenticated, but obviously anyone with the URL of the display server could remote in and put rude messages up in the call centre.
So, how to secure?
I've got this far
IDictionary properties = new Hashtable();
properties.Add("port", 12000);
properties.Add("secure", true);
properties.Add("impersonate", true);
IChannel channel = new TcpChannel(properties, null, null);
ChannelServices.RegisterChannel(channel, true);
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(LaserDisplayBoardDriver),
"LDB",
WellKnownObjectMode.Singleton);
but I don't know how to consume this in the client, nor how to pass credentials.
Please help!
|
|
|
|
|
|
I am working on a small game , and i have a problem --
when the user win a message box appear asking him if he want to play again if he answered -yes- the form must be shown again as it was in the beginning of the game , and i do not know how to reload the form
thanks ,
Mona
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
Hi,
AFAIK you can load a form only once. But you can show and hide it many times
using either Show()/Hide() methods or setting Visible property true/false.
Apart from that, you could create a new instance of your form, which would give you its
initial state automatically (wanted or not).
|
|
|
|
|
thank you Luc Pattyn for your replay
I do an instance in a method and hide the current form ,and it works , but i think when i hide the current form to call the new instance that i make an over load in memory because the current form is still exists .
what do you think , How can i close the current form to cal its new instance ??
thanks again
Mona
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
why would you do that ?
it is one or the other:
1. create a single instance, and now loop {initialize variables, show, hide} until app exits
OR
2. loop {create an instance, show, close } until app exits
it does not make sense to create a new instance, while a previous one is still around
(hidden instead of closed).
|
|
|
|
|
Sorry Luc Patty , I do not understand you , ok lets go slowly
first :
the user choose new game > The PlagGame Form Will Be shown(By Calling The Create Method witch create an instance from PlayGame Form).
Second :
the user Win Or Lose a Message Box Appear And Asking Him If He Want Play again ??-the PlayGame Form Still Exist -
third:
in this step i need to ReShow the PlayGame Form to looks like an other new game if i hide the current PlayGame form i need than to call it again with out create another instance How can I ????
sorry I know that my question may be bored
thanks any way
Mona
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
Adding to my previous reply:
you may find it difficult to organize the looping in a single form; the natural solution
is to have two form classes, the main one organizing the looping (and maybe showing highest
scores, or whatever), the second one representing a single game.
So now the app would:
create and show a main form,
then loop over the following steps {
create a game form,
show it (maybe as a dialog) (and maybe you want to temporarily hide the main form)
let the game run,
when the game is done, make mainform visible again (if hidden), and close the game form
}
As I said before you could reuse the game form (by hiding, not closing it), but I
see no real advantage here, since now you must reinitialize the game form explicitly
for consecutive runs of the game.
|
|
|
|
|
of course you are Right ,and i did what you said when the user finish close the game form an return to the main form .
but i do not want to return to the main form again after finishing the game , i want the game form to reshow again as if it reloaded ,that is the problem .
Mona
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
The main form can organize that without being visible.
And as I said before, the game form can either be reused or be replaced by a new
instance (that would cause some flickering I guess).
|
|
|
|
|
Hi Mona,
you do one thing.....
Create one function which loads the form and then recall it .
example---------
MessageBox.Show("Are you want to play Again??????","Play Game",MessageBoxButtons.YesNo)==DialogResult.Yes)
{
///call the functio here...........
}
Nisar Inamdar
|
|
|
|
|
thank you Nisar Inamdar for your replay .
i do a method witch create an instant from the form and call it and hide the current form ,and it works .
but i have a question when i hide the current form every time the user win or lose the form still exists ,do you think that is over load in memory , and bad performance , i do not know i am asking
thanks again for your Useful Replay
Mona ,
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
I believe you can do a Form.Close() and then a Form.Dispose() in order to clean up the memory, instead of having the form stick around w/ Form.Hide.
|
|
|
|