Jump to content
Xtreme .Net Talk

AdeHall

Members
  • Posts

    11
  • Joined

  • Last visited

AdeHall's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I'm sure there is a very good reaon for the standard .NET Rich Text Box not having a double click event :confused: but I'm using one in readonly mode and want to allow the user to double click to launch another form. Does anyone know a workaround for this?
  2. Thanks for your reply. I assume by looping backwards it stops the dsMyDataSet.MyTable.Rows.Count changing from confusing the value of i? Ade
  3. Thanks - looks like a simple solution Ade
  4. Thanks Toni I will try your suggestion. I wish there was a slghtly neater solution though! Regards Ade
  5. Hi Could someone tell me what the best approach is to the following situation? I am looping through the rows in a table within a dataset using a foreach statement. Depending on criteria I want to delete the current row and continue through the row colelction. As soon as I delete the row I get an error. foreach ( DataRow dr in dsMyDataSet.MyTable.Rows ) { if ( shouldbedeleted ) dr.Delete(); } I think I undersand why the error occurs but I don't know the proper way of achieving what I want. Any suggestions please? Ade
  6. Thanks both of you. I was developing a solution using the WM_NCITTEST which was fine until you started docking panels to the bottom fo the form. However with donnacha's information I think I have it sorted - thanks again.
  7. I am creating a form that I want the user to be able to resize. However I don't want the normal Windows Title bar displayed at the top. If I set the Borderstyle to none to get rid of the title bar I of course loose the size grip control. I suppose I have two options: Find a way of not displaying the Windows title bar on a sizeable form. or Add my own size grip control to a borderless form ( my preferred option ). I have tried the latter but I think the form is refusing to be resized manually because it is set to borderless. Can any one offer some advice please?
  8. Thanks Divil The memory as you say is looking after itself better. However, it is still taking 45 seconds to load and dispose of 145 jpgs. Do you think 1/3 of a second is a long time to open and load a 700k file from disk?
  9. This is a little benchmark prog I tried, to make sure that it was the IO that was taking the time before I do anything with the image. I ended up forcing the garbage collector because as you say I was running out of memory. When you use one of the commercial photo apps out there they seem to be able to read in and convert the same images in a fraction of the time. Surely .NET can't be making that much difference can it? if ( openFileDialog1.FileNames != null ) { DateTime StartTime = DateTime.Now; System.Diagnostics.Debug.WriteLine( "Start:" + StartTime.ToLongTimeString()); int i=0; foreach ( string FileName in openFileDialog1.FileNames ) { i++; Bitmap _bitmapNew; _bitmapNew = (Bitmap)Image.FromFile( FileName, false ); _bitmapNew = null; GC.Collect(); GC.WaitForPendingFinalizers(); } DateTime EndTime = DateTime.Now; System.Diagnostics.Debug.WriteLine( "End:" + EndTime.ToLongTimeString()); System.Diagnostics.Debug.WriteLine( "Loading " + i.ToString() + " Photos took " + (EndTime - StartTime) ) ; } }
  10. I'm trying to load multiple jpegs from disk to create thumbnails. I've tried various ways but the Image.FromFile( path ) or Bitmap aBitmap = new Bitmap( path ) methods seem very slow. The jpegs are about 750k each but it is taking approx 30-40 seconds to load 100. Are there any faster ways to load the data? Thanks Ade
×
×
  • Create New...