CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1

    Here's an easy one

    What do you define a picture box as if you want to pass it to a sub routine?


  2. #2

    Re: Here's an easy one

    Stupid post. I figured it out. Nevermind. Sorry.


  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Here's an easy one

    Not really a stupid post - it depends on whether you just want access to the picture or all the other properties / methods that a picturebox allows.

    The internal vb type 'StdPicture' allows you to pass around 'Picture' objects throughout your VB code without the overhead / hassle of passing around the rest of the control also.

    Dr_Michael from this forum has a new article on the cg site that shows how to capture any window running (including forms in your program) and return them as a StdPicture object (these can then be saved with the SavePicture vb command).

    If you're interested, take a look at http://codeguru.developer.com/vb/articles/1998.shtml


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  4. #4

    Re: Here's an easy one

    Well, It had to do with the code for placing an icon in the system tray. I was merely going through and making more of my code modular. Do know of a good source on writing controls?


  5. #5
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Here's an easy one

    >Do know of a good source on writing controls?

    Yep, Me ;-)

    The MSDN has quite a few examples buried somewhere. It also depends on the type of control you want to make. If you are making a control out of several others (textboxes/labels etc) then it's quite simple. If you want to do all the drawing yourself it get's rather more complicated. There are several examples of each on the CodeGuru website.






    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

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

Featured