Results 1 to 7 of 7

Thread: How can I create a picture "object" ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70
    I made this bitmap and saved as a seperate file using a form and a picturebox control, but how am I supposed to do this on a console environment such as the Internet? Theoretically, I judge that I have to create a picture object by createobject statement and use its methods to form the image. Which object should that be ? Any other ideas ?
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    I'm confused... wouldn't you just put it into a <IMG> tag? Or do you not mean a web page when you say on the internet?

    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70

    The problem is..

    If I use a normal application with a form in it and run it on server side, every form load and unload events will heap up the memory. But, a console (formless) application wouldn't. However, in order to use drawing methods like circle, line, etc. I need to have a picturebox control. And a control requires a form as parent. So without having to use a form I may have to create an object like CreateObject("AdobeImage.Picture") and use its methods instead. What might this object be, from which DLL could it be referred.
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    You can create your variables with IPictureDisp data type to store your images in.
    Code:
    Dim picMyPicture As IPictureDisp
    
    Set picMyPicture = LoadPicture("C:\MyFile.bmp")
    
    'Do your stuff with this picture
    
    'Free up memory
    Set picMyPicture = Nothing
    IPictureDisp is an object data type so you have properties and methods like you have in any other object.
    Code:
    Properties
         Handle
         Height
         hPal
         Type
         Width
    
    Methods
         Render
    If you ever want to show this image in the PictureBox then you can easily assign this image to the PictureBox like:

    Set Picture1 = picMyPicture

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    I guess I'm just not getting why you would want to draw on the server where nobody would see it.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70

    The image is going to be displayed on client side!

    Monte96:
    The image will be formed on server according to some parameters recieved from the user. The image will then be saved as a image file and then the image will be displayed on the client's browser.

    Serge:
    I need to draw circles, lines and stuff into the image..Thus, I have to create such an object with these methods.Is render method capable of doing such tasks?
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  7. #7
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    I think your going to need a form....
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

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