|
well I tried to design my form..
apparently, when i tried to compile it said something wrong with my event handling..dunno why..
and i also have problem with serilization in soccer game..
it would be agood idea if i could attach u the file..but i dunno how...unless you give your email address.
|
|
|
|
|
Just show here the code that gives the error.
|
|
|
|
|
this.picSnow.Image = ((System.Drawing.Image)(resources.GetObject("picMove.Image")));
//cboSnow
private void cboSnow_SelectedIndexChanged(object sender, System.EventArgs e)
{
switch (cboSnow.Text)
{
case "move" : picSnow.Image = picMove.Image;
MessageBox.Show ("move the snow");
break;
default: picSnow.Image = picSnow.Image;
break;
}//end switch
}//end cboSnow event
i paste a few code..the switch has 3 cases..move,throw and make..when i compile the event handler highlight the this.picSnow.Image ....
and before it's said there is no debug folder..and i should make one..how??
|
|
|
|
|
Sounds like you defined an event handler, then deleted the code, but the code in InitialiseComponent is still trying to hook up an event handler to the method that you deleted.
And you can't debug until your program compiles, a program that can't compile is one the compiler doesn't know how to turn into something that runs.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
When I try to call Console.KeyAvailable I get the error measage:
Can not see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Why?
I haven't redirected it from a file or anyting.
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
It's a console app, right ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yepp
For the real problem I wrote in another thread. (Small UI prob)
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
guys can anyone can help me to do my assignment?? i'm abit confused in here..
i could't not attach the file in here..
so anyone can help me..please leave your email address thanks..
|
|
|
|
|
No - no-one will do your homework for you, and they would not be helping you if they did.
Try to do it yourself, and then ask SPECIFIC questions. You'll find we're keen to help if people are willing to try it themselves.
Also, no-one will give you an email address, if you want to communicate, do it here. We get enough spam.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
sorry..i didn't mean like that..i need the email to attach the code..because it's kinda along (i only give the error code and the command error) that's it..
i do by myself..but sometimes it's complicated to say it through forum..
|
|
|
|
|
If you can't narrow down which bit of code is causing the error, to post it here, then you need to look at it closer yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think i did narrowed down which bit of code that has error on it..hoaa..you're too fussy man! be cool!! i'm asking you thought that you can help me..and i'm not begging you to do al my assignment man!, i do my best, but when i'm stuck is it wrong if i'm asking you? and i'm not pushing u to answer my questions man! there's alot people can help me!aniwe. thans for ur suggestion..c'ya
|
|
|
|
|
nume wrote:
you're too fussy man! be cool!! i'm asking you thought that you can help me
I *can* help you, I answer at least 20 questions a day. However, it's generally rude to appear on a forum, and ask people for email contact. The forum is here for you to contact us. If you have worked out where the problem is, by all means post the code so we can try and help.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
I am intending to encrypt my C# application exe file by wrapping it in another exe file. Thereafter, at run-time, I want to decrypt this exe file and then run it. Now, my question is as under:
Is it possible to create the decrypted exe file ONLY IN MEMORY (i.e., without decrypting it in the form of a physical file on the disk) and then run it from there on the user machine? Secondly, will it be a stable process if I try to run the application in this manner ONLY FROM MEMORY.
Regards and thanks in advance.
|
|
|
|
|
I've seen this question a couple of times now...
There's 2 way that I remember now.
Eather place the whole memmory in
the memmory and then assembly jump
to it.
The other way is to use the program
loader that loads the program usualy
and do something with it.
Here's a link they found on it:
http://msdn.microsoft.com/msdnmag/issues/02/03/Loader/default.aspx
also here:
part 1:
http://msdn.microsoft.com/msdnmag/issues/02/02/PE/default.aspx
part 2:
http://msdn.microsoft.com/msdnmag/issues/02/03/PE2/default.aspx
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
I'd like to read all properties, and methods' name of a class for some use, but don't know how... plz help!
|
|
|
|
|
|
Hey All...
So I was working through a directX tutorial and i came across this:
<br />
try <br />
{<br />
state = this.keyboard.GetCurrentKeyboardState();<br />
<br />
break;<br />
}<br />
catch (Microsoft.DirectX.DirectInput.InputException)<br />
{ <br />
Application.DoEvents();<br />
<br />
try<br />
{ <br />
keyboard.Acquire(); <br />
}<br />
catch (Microsoft.DirectX.DirectInput.InputLostException)<br />
{ <br />
continue; <br />
}<br />
catch(Microsoft.DirectX.DirectInput.OtherApplicationHasPriorityException)<br />
{ <br />
continue; <br />
}<br />
}<br />
}<br />
<br />
<br />
However, the compiler says that all exceptions have to be derived from System.Exception. What can I do?
Thanks a lot,
Jim
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
|
Apologies for what will proove to be a vague title.
I have a C# windows service that performs client SNTP sync calls. Depending on the configuration this polling can occur on any frequency. This all works well and I am more than happy with it.
I have been asked to add some additional functionality, which has me stumped. I need the service to perform a poll when another application needs it to happen.
For example, the client PC is running the sync service with a 2 hour frequency, the last poll was 30 minutes ago. The client is running another application that will run "some code" that will force the sync service to perform a sync. This application could be written in any of the major languages out there.
I am under the impression that, under Windows, it is possible to raise a system event, that can be caught in the service, from there I would launch a sync request.
Does anybody have any suggestions on how I could go about this?
|
|
|
|
|
So you want client applications to trigger some operation on the service? Remoting is one option. And if you are talking about kernel level events, yes they are available under the System.Threading namespace. Look for AutoResetEvent and ManualResetEvent .
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I know just how to set a form transparent and make an irregular shape form but what i need is add a shadow to the image i use as my own shape.
so i've tried to draw it together the shape image and save it as png to get trasparent background and semitrasparent color for the shadow.
The problem is a form background or a panel or picturebox doens't support semitransparent image or trasparent image if i don't set a defined color as that to avoid to draw.
How can i load an image with more semi transparent color and set it as the shape form image?
|
|
|
|
|
Hi
I'm trying to write a simple client/server program in c# were the server only needs to deal with one client at a time.
I wanted to create a new thread to listen for and proccess incoming clients (on the server side).
The thread would look somthing like:
private void serverThread()
{
while(true)
{
tcpClient = tcpListener.AcceptTcpClient();
//create streams and other stuff...
do
{
//get data from the client(read from a stream)
}
while(dataReceived!= clientWantsToDisconnect)
//disconnect and be ready for a new connection
}
}
That is, theres a never ending loop that waits for clients and an inner loop that gets data from them.
If the client sends data indicating he wants to end the connection, theres no problem.
But if the client just disconnects (some kind of an error on the client side or a connection problem), how would i know of it ?
The server would just wait on the line that reads from the stream forever.
How can i know the moment the client is disconnected ?
What i'm looking for is some exception/event that would tell me the connection was severed.
I remember the winsock control in vb6 had events for anything that happend with the connection (I'm trying to write a class that will be similer to that using delegates)
It also had an event that was raised the second it was disconnected, how can i achieve that ?
Thanks for bearing with me...
Ronen.
|
|
|
|
|
When the client disconnects, the call to get data from the client will return with 0 bytes of data. The problem is that, even during normal data transfer, the 0 bytes condition might occur. So what I did was, if I got zero bytes of data, I'd send a "ping" like command, which the client must respond to. If the client got disconnected, sending the "ping" will fail and you'll know the client has disconnected for sure.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
In IIS, to seperate our web app from other, we can create application pools for them.
I don't know how can I use C# to get the identity of those application pools?
Thanks,
Tommy.
|
|
|
|