Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

what wrong with this code


  • Please log in to reply

#1
akashlee

akashlee

    Member

  • Member
  • PipPipPip
  • 126 posts
Private Sub Command1_Click()
Print ""
Print ""
Print ""
Print "Book Review: Genre - Autobiography"
Print "Book: "
Print "Review Type: Proposed Idea, program"
Print ""
Print "Submitted By:"
Print "Adittya Akash"
Print "Room 204, 8A"
Print "# "
Print "Submitted to: Ms. Saunders"
Print "May 28, 2006"
End Sub

Private Sub Command2_Click()
Print ""
Print ""
Print ""
Print "Welcome To The Book Review"
Print "For this book review, I drew pictures to illustrate some chapters"
Print "from the book and wrote a small caption for each picture"
End Sub

Private Sub Command3_Click()
loadpicture([C:\akash\bbb.jpeg]) As IPictureDisp
End Sub


it doesn't load the picture for the the command 3
:help: :) :) :blink: :whistling:
  • 0

Advertisements


#2
Spike

Spike

    nOoB

  • Member
  • PipPipPipPip
  • 1,355 posts
How do you want to load the picture??? In the program itself???

Instead of loading it into the program at run time, do it at design time. Add an "Image" and put the picture in there. From there you can have:

Private Sub Form1_Load()
Image1.visible = False
End Sub

Private Sub Command3_Click()
Image1.visible = True
End Sub

If you have any more questions, please dont hesitate to ask also let me know if it works. Cool :whistling:
  • 0

#3
Hai Mac

Hai Mac

    Member

  • Member
  • PipPipPip
  • 260 posts
There's nothing wrong with loading pictures at runtime, though akashlee got the syntax wrong, but don't worry, instead of:
loadpicture([C:\akash\bbb.jpeg]) As IPictureDisp
use this:
image1.picture = LoadPicture("C:\akash\bbb.jpeg")

  • 0

#4
Hai Mac

Hai Mac

    Member

  • Member
  • PipPipPip
  • 260 posts
However, if you use only one image, then what spike_hacker_inc has advised you is actually better.
  • 0

#5
akashlee

akashlee

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 126 posts
i tried the code hai mac suggested but it gave me a run time error 424 :whistling:
  • 0

#6
akashlee

akashlee

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 126 posts
spike_hacker_inc, your code worked thanksssssssssssss
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP