Results 1 to 3 of 3

Thread: prompting user for bitmap name

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    56

    prompting user for bitmap name

    i have a small question. I am using the following to save a bitmap

    VB Code:
    1. bmap.Save("name1.bmp")

    my problem is name1 is a variable name and not the name i want the bitmap to be saved under. So if the user enters ' circle1 ' in the textbox ( i.e name1 = circle1) i want the bitmap name to be circle1.
    Thank You
    Sam

  2. #2
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: prompting user for bitmap name

    Don't you have to give it the full path to save? Not just the name? Why not just use a SaveDialog? If you still want to use the textbox, then just use the textbox text property to get the text that was entered in..
    VB Code:
    1. 'replace directorypath with full path to the directory, textbox should be name without extension..
    2. bmap.Save(DirectoryPath & "\" & TextBox1.Text & ".bmp")

  3. #3
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Cool Re: prompting user for bitmap name

    The SaveDialog would be better.

    The first user that enters a ? or / in the textbox will cause the application to crash.
    ~Peter


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