Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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,357 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