importing images?

Is it possible to import images? ex have one image box imgCard, and assign 1 of 52 cards to it depending on a condition
thnx

Comments

  • : Is it possible to import images? ex have one image box imgCard, and assign 1 of 52 cards to it depending on a condition
    : thnx
    :

    Yeah, set up a combo box with each item listed etc, then have a case structure set up under each item or however you are having it set up.

    Private Sub imgCard_Click
    Select Case (imgCard.Text)
    Case "1"
    imgCard.Picture = LoadPicture(App.Path + "images1.gif")
    Case "2" etc......
  • : : Is it possible to import images? ex have one image box imgCard, and assign 1 of 52 cards to it depending on a condition
    : : thnx
    : :
    :
    : Yeah, set up a combo box with each item listed etc, then have a case structure set up under each item or however you are having it set up.
    :
    : Private Sub imgCard_Click
    : Select Case (imgCard.Text)
    : Case "1"
    : imgCard.Picture = LoadPicture(App.Path + "images1.gif")
    : Case "2" etc......
    :

    Use something like comprehensive filenames. Like:
    strFile = "C:My PicturesCard " & intCardNumber & ".jpg"

    Or something like that. Make sure you'r application can easily create the filenames with a single statement... You don't want to make an entire select case statement for 52 different cards!


    Greets...
    Richard

  • : :
    : : Private Sub imgCard_Click
    : : Select Case (imgCard.Text)
    : : Case "1"
    : : imgCard.Picture = LoadPicture(App.Path + "images1.gif")
    : : Case "2" etc......
    : :
    :
    : Use something like comprehensive filenames. Like:
    : strFile = "C:My PicturesCard " & intCardNumber & ".jpg"
    :
    : Or something like that. Make sure you'r application can easily create the filenames with a single statement... You don't want to make an entire select case statement for 52 different cards!
    :
    :
    : Greets...
    : Richard

    If I use comprehensive filenames how will it affect it when i make it stand alone, and transfer it to other computers? Will the user have to put all the files into a certain folder with the whatever name i used in the code??
    thnx, Mike
  • : : :
    : : : Private Sub imgCard_Click
    : : : Select Case (imgCard.Text)
    : : : Case "1"
    : : : imgCard.Picture = LoadPicture(App.Path + "images1.gif")
    : : : Case "2" etc......
    : : :
    : :
    : : Use something like comprehensive filenames. Like:
    : : strFile = "C:My PicturesCard " & intCardNumber & ".jpg"
    : :
    : : Or something like that. Make sure you'r application can easily create the filenames with a single statement... You don't want to make an entire select case statement for 52 different cards!
    : :
    : :
    : : Greets...
    : : Richard
    :
    : If I use comprehensive filenames how will it affect it when i make it stand alone, and transfer it to other computers? Will the user have to put all the files into a certain folder with the whatever name i used in the code??
    : thnx, Mike
    :

    Yes and no. The user will have to put it in a specific path. Fortunately, the App.Path property exists. This will tell you from which path your application is run. Then you can choose what to do. You can put all the images in the same path as the app. You can also insist on the creation of a subdirectory for the images like:
    "C:Program FilesYourApp DirImages"

    For example. These things are done usually with a setup utility.

    Good luck!


    Greets...
    Richard

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories