I've faced with a silly bug in Menu , I dont know if u had it or not, but I'll be thankful if could help me!
The problem is when u set ur menu Left to Right, & WindowState to Maximized every thing changed!
I mean when menu is Left to Right & windows should start in Maximized mode! even when its normal & the shortcut seted to Maximized!!!
I dont know how I can describe it, so please try it once & look what happend?!
Hi,i try to hold a number arraylists in a single main arraylist.But i think because of a referance problem, everytime i add a new arraylist, previous added lists became same with last added one;all items shown as the last arraylist's items.is anyone knows the solution or a different way to hold arraylists?
.NET security sample anyone? There's a good/short article from Code Project by "Manuel Permuy": http://www.codeproject.com/csharp/cryptography.asp
The sample illustrates how to encrypt/decrypt/retrieve certs using WSDK.
QUESTION: I can do all this without WSDK - using just System.Cryptography? I'm new to this and I am looking for nice/short .NET examples (otherwise, i'd be reading MSDN):
1. sign/hash/encrypt data
- both PPK and classic symmetric algo (DES for example).
2. Also want to know how to "publish" your public key so receiver decrypt payload and verify signature (in your sample, client and receiver on same machine/process.) So, am I talking about exporting key/key blob? A handle to a key is meaningless on a remote machine.
3. retrieve certificates from cert stores (covered in this article)
4. add cert (makecert.exe or MMC/3rd party: I'm alrite with this.)
Any good articles? I want to do this all .NET - but as you mentioned, you don't get .NET support in dealing with cert stores. Is that still true?
I try to send mail to the oher server ,but I cann't send it.Every time when I try, I have this kind of exception: Could not access 'CDO.Message' object.
I am sure that I had installed and runing SMTP service and CDO.
I'm trying to write a game in C# to learn the language.
It's a mini clone of civilization III.
The main game window is a map, drawn with tiles (20x20 tiles right now).
To draw the map, I have somewhere a Bitmap that I store as backbuffer, where I draw the tiles themselves. Then to animate the sprites I use this "map bitmap", and draw the sprites above it.
To draw a tile, I have canvas in memory, with all the braw bitmaps (they contains 9x9 tiles), I select the right tile (-> creation of a source rectangle, corresponding to the right tile in the canvas), then I draw it in my Bitmap, after having found the destination rectangle.
I have some problem with speed : rendering 20x20 tiles (each is 128x64) takes 950 ms. As I need to render it anytime I scroll (because the map is 200x200, but the viewport is only 20x20), it is not acceptable.
Is there a way to speed the process using only GDI+ and C#?
Try this approach:
Choose the graphics surface of a PictureBox control instead of drawing on a Bitmap object, I mean do your drawing in OnPaint event of PictureBox control(and use e.Graphics). This way you can use benefits of auto scrolling that PictureBox control has. And also speed is more acceptable than when you draw on a Bitmap object.
I hope this helps
I can' do this, because I want to precalculate the map backgrounds only when the user wants to scroll. Then moving sprites on the map doesn't need any change in the map itself, so I will use the precalculated bitmap.
I draw all the 400 tiles each times, because if the user clicks on the globalview "somewhere", I need to redraw all of it.
However, I do it only when the map change (scroll or editor change of terrain), no when things in the layers (a unit animation change).
I move them on screen in one move : I start by drawing them in a bitmap, which is stored, and then in the render function (with a timer), I draw the stored bitmap in the PictureBox.
This last part is fast. I don't understand why drawing the 400 128x64 tiles in the backbuffer is so much longer than drawing the whole image in a 1024x768 PictureBox?