c# - how to insert multiple bitmaps into imagelist? -


hello friends want convert second form in bitmap , load imagelist when run application displaying blank image in place of , here goes code

     int nextimagenumber = 1;      private void button1_click(object sender, eventargs e)     {          panel3.controls.clear();         var ofd = new openfiledialog();         ofd.filter = "dicom files (*.dcm;*.dic)|*.dcm;*.dic|all files (*.*)|*.*";         ofd.multiselect = true;         if (ofd.showdialog() == dialogresult.cancel)             return;         openfile(ofd.filename);         var = new displayform(_file);         a.formborderstyle = system.windows.forms.formborderstyle.none;          int abc = 1000;         thread.sleep(abc);          bitmap bm = new bitmap(a.size.width, a.size.height);        a.drawtobitmap (bm, new rectangle(0, 0, a.size.width, a.size.height));        string name = nextimagenumber.tostring();        imagelist1.images.add(name, bm);        var listviewitem = listview2.items.add("patient name:" + label1.text + "\n" + " id:" + label2.text + " , " + " age:" + label3.text);         listviewitem.imagekey = name;         nextimagenumber++;      } 


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -