Results 1 to 2 of 2

Thread: Question about Strings, Integers, and Pictures...

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    12

    Post Question about Strings, Integers, and Pictures...

    *I know, I am probably asking an easy question*
    You know how there are strings and integers? I don't know what those are called, but I am asking something about them.
    Is there a picture one for that group? (You can set a variable as a string, and integer; what i am asking is if you can set it as a picture)
    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Question about Strings, Integers, and Pictures...

    When you declare a variable you specify it's type and you can then assign values/objects of that type to the variable. String is a class. Integer is a structure. Form, Button, TextBox are all classes too. Double, Date and Boolean are all structures too. It depends on the sort of application you're building as to what type you would use to refer to a picture but, most likely, you'll be creating a Windows Forms application. In that case, you would most likely use the Image class to represent a picture, so you can declare a variable of type Image. One common way to create an Image object is from a file like this:
    Code:
    Dim myImage As Image = Image.FromFile(filePath)
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

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