- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
13 Posted Topics
I'm trying to encrypt a tif file using RijndaelManaged. Initially I was getting "Padding is invalid and cannot be removed" error. Got that fixed by adding FlushFinalBlock() to my Encryption method. Now, however, when I try to decrypt a file that has been encrypted in a different application (they both … | |
Re: assuming the table you query for the password has a loginname and password columns, write you sql statement like this. SELECT LOGINNAME FROM USERTABLE WHERE LOGINNAME = @login AND PASSWORD = @pwd; The parameters you will pass in are @login and @pwd. You should run this as a procedure. | |
Re: you want to use the click event [code] private void listBox1_Click(object sender, EventArgs e) { Car car = (Car)listBox1.SelectedItem; txtMake.Text = car.getMake(); txtModel.Text = car.getModel(); txtPrice.Text = car.getPrice(); txtYear.Text = car.getYear(); } } [/code] also, you do not want to create a car object in your constructor. Instead create it … | |
Re: Split is a function of string. But it needs a consistent characater. What Mono was saying was, add a space between each character then you can split on the space character. You could do it like this [code] string val = "4+5-3-6+7"; StringBuilder sb = new StringBuilder(); for(int i = … | |
Re: If you can, look at using a UserControl. You can build your layout and tie all your events together inside the control. To access the internal data from the outside, use public properties. To publish internal events and data, use delegates and events. If you cant or don't want to … | |
Re: you might want to do something like this. separate the methods into two separate classes. In each class have a delegate and event to notifyofprogress. Then when you create the class, tie the event to a local method that reports progress. Here is some pseudo-code [code] public class DoMethod1 { … | |
Re: here is a code snippet that shows the number of days to Christmas [code] DateTime dt1 = DateTime.Now; DateTime dt2; DateTime.TryParse("12/25/2010", out dt2); TimeSpan ts = dt2.Subtract(dt1); int daysToChristmas = ts.Days; [/code] | |
Re: The code is fine. The only issue I see is if you are nesting it too deep. I mean a panel with some controls including another panel with controls including an additional panel, etc. We do need to see your error. Also, I'm curious why you would choose to make … | |
Re: You've failed to initialize a needed part of the MailMessage. Obviously, you have the ToAddresses down or the recipients would not get it. Without know how you are building the MailMessage, my suggestion is to take a look at the classes where you are adding the body or attachments or … | |
Re: You can't. The SqlDataReader is read forward only. The RecordsAffected property is only accurate [B]after[/B] calling Close. If you must have a count, then use the Count function as Rohand said. If the query is using indexed fields in the where clause for the count, it will be fast enough. | |
Re: I think the event you will want to use is CellEndEdit. here is an example where the datagridview is named dgvMetrics. [code] private void dgvMetrics_CellEndEdit(object sender, DataGridViewCellEventArgs e) { DataGridViewRow dgvr = dgvMetrics.Rows[e.RowIndex]; dgvr.Cells["chkbx"].Value = true } [/code] you can reference the cell by its index position or it name … | |
Re: Yes you will need a delegate and an event. I wouldn't recommend passing the conn object. Instead do it this way. put these two lines in your ProgressForm (I put mine at the top because its easy to find that way [code] public delegate void delNotifyOfCancel(); public event delNotifyOfCancel NotifyOfCancel; … | |
Re: here are a couple of suggestions to help you. But first a disclaimer. I'm writing all this in VS2008, it appears you are using VS2005. So while these are correct for my version, I haven't checked for yours. However they should be correct. First, as mentioned above, use the web … |
The End.