|
DocH0liday wrote: ...long, drawn out explanation
And? So what if you can catch and modify packets that exploit the Messengers functionality.
There's still nothing you can do about it. You absolutely cannot change the port numbers without breaking the connection with the remote client.
Even if you could change the port number, that still won't stop you from getting flooded by bad packets. Your machine will still see the packets hitting your NIC. The only difference is that your application won't be listening anymore. Since your still getting flooded by bad packets, your real conversation gets drowned out.
It's just TCP/IP basics...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is thier any other Solutions to this kind of problem??
|
|
|
|
|
Yes, there is, but you can't implement it. The messenger application must support secured communications, both on the clients and the server. Only the manufacturer can add that support.
This way, noone can grab a packet and modify it to take advantage on the client functionality. Once the packet is modified, the security envelope is no longer valid, discarding the packet.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
After I unloaded an image from a picture box like that:
<br />
if (pictureBox.Image != null){<br />
pictureBox.Image.Dispose();<br />
pictureBox.Image = null;<br />
}<br />
but when the application is still running, I cannot overwrite this image.
How can overwrite it while application is still running? Thanks a lot!
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
I would hope that the picturebox takes care of it's own memory, and you can just assign another image.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Maybe my description has some confusions for you.
I don't want to load another image to the pictrue box, I want my program can overwrite the image which I just have unload from the picture box.
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
Are you saying that the picturebox continues to hold a reference to the image, and the image on disc cannot be overwritten as a result ?
That seems odd to me, I don't think that Bitmap.FromFile keeps the file open.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Extractly!
But I don't use Bitmap.FromFile, I used pictureBox.Load().
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
The picture box is crap. I dunno why so many people use it. First step, use Bitmap.FromFile, and pass that bitmap in, instead. Then, I don't see you having any issues.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I will try as your recommendation. Thank you!
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
The Bitmap class inherits from Image and uses Image's FromFile method, which calls a GDI+ Flat API function in GDIPlus.dll (curiously, something you're NOT supposed to do), called GdipLoadImageFromFile to load the image file. It looks like the resulting file handle is never closed so long as the GDI+ Image object exists.
As you probably know, the usual workaround was this[^] little article on MSDN. This eventually uses the GdipLoadImageFromStream GDI+ function, which does not hold a handle to the original image stream.
In 2005, the PictureBox.Load method calls the static Image.FromStream method, no matter what the actual source of the image is, so locking the image file is not a problem.
But, to answer his question, PictureBox.Image = null; should work no problem. I didn't have any at least...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello!
On the graph display we have many overlapped text. Is there any good algorithms to resolve this problem, so that we have a readable layout ?
Thanks
|
|
|
|
|
Please don't post to every forum.
You can request the metrics of the test in C# and also C++, and use that to work out if items overlap. You're basically talking about overlapping rectangles, no fancy algorithms are needed.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
My appology for posting to two forums.
The problems is: overlapped label inside a densed polygon on map. Each polygon has a label (ex. town name). The label should be placed to ensure readability while still reside in that polygon.
Your comments woulds be very helpful.
|
|
|
|
|
OK - that's a bit harder In that case, I guess you could start by centering the text over the point that denotes the location, then check if any overlap, and if they do, then decide on a solution. Your only options will be to change the font size, move the text about, or put some text below the dot and some above, as far as I can see.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Does anyone know how in C# to test for the state of the Scroll Lock key?
Thanks,
David
|
|
|
|
|
If you use .NET 2.0, you can use the call Control.IsKeyLocked( Keys.Scroll ) call to get a bool that indicates the value for which you look.
If you use .NET 1.0 or 1.1, you need to look at GetKeyState[^].
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Curtis,
Thanks for the info I knew there had to be a way, just could not find it in the doc's of 1.1.
|
|
|
|
|
is there any way to intercept and control what to do based on the Content-Type of the page with the WebBrowser control? I am trying to capture and save the asx file instead of automatically opening and playing in media player. I have tried to intercept it on DownloadComplete, Navigating, Navigated events and none of them worked.
Any suggestions is welcome!!
|
|
|
|
|
|
|
Are there any examples out there that I can take a look at the usage of this function? I tried using the function and it resulted in build errors.
Also, does this function allow me to put in my own code to handle the content for a specific content-type? I got a bit confused reading the doc.
Thanks for the help!
|
|
|
|
|
|
In a windows form I have a textbox and a button. Initially the text box contains "Enter ID" as the default text. I enter some ID and click the button which saves the ID to an XML. After that, the text in the textbox should revert back to "Enter ID" as before.
Right now my code is a below...
// Windows Form Designer generated code
// First time I intialize the dafault text
this.txtbox1.Text = "Enter ID";
// Button_click
private void button1_Click(object sender, System.EventArgs e)
{
//Write To File and reset all textboxes on the form for default text
SaveToXML();
ResetAllTextBoxes();
}
// Reset all text boxes on the window
private void ResetAllTextBoxes()
{
this.textbox1.Text = "Enter ID";
....
....
this.textbox10.Text = "There has to be some another way"
}
I'm not satisfied with this implementation because if I have 10 textboxes I need to have 20 lines of code doing the same. 10 lines in the Windows Form Designer generated code and 10 in ResetAllTextBoxes() method.
I tried the textbox1.ResetText() method but instead of reseting it to default text such as "Enter ID" it resets to blank.
Is there a better solution.
Thanks
----------
Venus Patel
http://patelsinc.blogspot.com/
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
-- modified at 17:25 Tuesday 10th January, 2006
|
|
|
|
|
No. You have to write the code to change the values, and the auto generated code will stay the same. Personally, I would not set the values in the forms designer, but just in a method, and call the method after InitializeComponents is called, just to put it all in one place.
Christian Graus - Microsoft MVP - C++
|
|
|
|