Results 1 to 5 of 5

Thread: [RESOLVED] how to use string parameter having spaces

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    54

    Resolved [RESOLVED] how to use string parameter having spaces

    Hi all

    please help me to find solution

    following is the function i used to show the tif images on form, My problem is if there are spaces between the image name it generates the error,

    can anybody please suggest me what should i do


    Code:
    	
    
    		bool displayimage(string imgname)
    		{
    			string imgpath;
    			imgpath = this.textBox2.Text.Trim();
    			imgname = imgpath +@imgname;
    			Bitmap oSourceBitmap, oThumbBitmap;
    			oSourceBitmap = new Bitmap (imgname);  
    			oThumbBitmap = new Bitmap (oSourceBitmap,751,355);
    			this.pictureBox1.Image  = oThumbBitmap;
    		return true ;
    		}
    Last edited by newmember; Oct 20th, 2005 at 07:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width