|
To be fair I was intentionally trying to reel you in with that which is why I originally left off the smiley.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: reel you in
In which context; like a fish or like a dog?
|
|
|
|
|
Hello,
i have a pictureBox. When i moving the mouse in the pictureBox, i want to draw a rectangle on the bitmap (that is on the pictureBox). I using the DrawRectangle-method for this. But i like, that there appears only one rectangle on the pictureBox. It should appear on the coordinates, where i moving the mouse at the moment. On this moment all rectangles are paintet on the pictureBox, at the coordinates where i have moved the mouse.
Thank you very much!
|
|
|
|
|
It sounds like you're getting multiple mouse moves and therefore multiple rectangles. You'll need to determine when the mouse has stopped moving (maybe a timer that is reset on each mouse move) and draw the rectangle then.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
you looking for a click drag style drawing?
if so then make a global rectangle, on mouse click set the .X and .Y locations of the rectangle. then with mouse mouse set the width and height of the rectangle based on the current mouse pos and the rectangle .X and .Y locations (mouse click point)
Then handle the onPaintEvent to draw the rectangle.
Oh you will need to force the picture box to repaint with each mouse move, i think PictureBox1.Invalidate() can do this for you
|
|
|
|
|
I am developing a windows application using c#. In this Application i need record some sensitive data such as user name and password. In this application i am not using database. Please tell me a way to manage these data in secure way. Please help me this is very argent.
Dushan Perera
|
|
|
|
|
What are the username and password used for?
If just logging in then you can create an MD5 hash and store as that.
if you need to be able to recall usernames/password then look at encryption
|
|
|
|
|
Encrypt the data before saving it to a User Settings file. Also, before distributing your application, make sure you obfuscate it with a decent obfuscation tool (the one that comes with VS is NOT adequate).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
The answer mainly depends on the architecture of the application. Will it be used by many different users that aren't on the same network, or within a local Intranet? What resources will be available to your application to hold that data? You'll have to take those considerations into account in order to determine what is the best option for persisting the data. Regardless of your choice, you are going to need persistent storage of some format to hold the data. Whatever option you decide to go with make sure you store a hash of password values. Personally, I use the .NET MD5 implementation (MD5CryptoServiceProvider) to hash passwords, but the .NET Framework includes a number of hash algorithm implementations. In practice, you should persist the hash rather than the actual password and when authenticating, you take the hash of whatever the user enters and compare it against the hash that was persisted; if it matches then they entered the correct password. It's not mathematically possible to get the original value from a hash. If you need to secure other data you can use some of the other .NET Cryptography classes to encrypt the data. Either way a number of Symmetric encryption algorithms (aka Secret Key) are included in the .NET framework (the .NET Rijndael implementation is what I usually use). You'll generally need to create your own binary Key and Initialization Vector (IV, for short and commonly referred to as the 'Salt'). The Key and IV lengths vary somewhat for the different algorithms so you'll need to read up on that as you decide on an encryption scheme that works for you. Symmetric encryption requires the same Key and IV be used for decryption as was used to encrypt the data, so it's common to choose a Key and IV for your application that are pretty much static. If you need more flexibility than that you can look into the Asymmetric encryption (aka Public key/Private key) but those generally require more complexity, however there are certainly situations that call for it.
Keep It Simple Stupid! (KISS)
|
|
|
|
|
Hi,
I am trying to display an email in the WebBrowser control.
Althoug it is displaying the body of the email correctly it doesn't display the additional information
like the sender info (From, To, Subject etc).
How can I manipulate the browser to add these information? (as it is available in the .eml file)?
Can I set additonal information in the WebBrowser.Document?
Many thanks!
|
|
|
|
|
A browser is not meant to display .eml files, but to display .htm.
You'll have to extract this information yourself, and display accordingly.
I are troll
|
|
|
|
|
Thanks for the information.
Do you know where I can find information on how to extract the information?
What do I use?
Thank you!
|
|
|
|
|
Open the email-file (*.eml) with Notepad. The method of extraction is a matter of taste, I'd go for the RegExes.
I are troll
|
|
|
|
|
Thank you!
|
|
|
|
|
How to centre a datarowview column heather?
thanks
|
|
|
|
|
do you mean center the text of the 'header' at the top of the of the grid view?
|
|
|
|
|
if so then:
dataGridView1.Columns[0].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
|
|
|
Ohh, yes, excuse me about the mistake. Thank you very much
|
|
|
|
|
What have you tried?
Maybe a code snippet from you will help us to point you in the right direction.
Otherwise try google.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
ArielR wrote: How to centre a datarowview column heather?
That's wonderful!
Welcome in the CP's members memorable quotes. [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
JA!, Thank you for the postulation, ..have hard fingers...
|
|
|
|
|
Didn't know that C# can be used to get heat too
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
lol maybe 'Datagridview' are an electrical appliance company and he stumbled on this forum while looking for tips on the layout of his house funiture
|
|
|
|
|
I have a binding to a datatable and want to return values from the columns for position zero without changing the binding position to do it.
How can i do this please?
|
|
|
|
|
simple, mydataset.mydatatable[0].mycolumnName....
|
|
|
|