Click to See Complete Forum and Search --> : Here's an easy one


wilton
January 10th, 2000, 01:20 AM
What do you define a picture box as if you want to pass it to a sub routine?

wilton
January 10th, 2000, 01:30 AM
Stupid post. I figured it out. Nevermind. Sorry.

Chris Eastwood
January 10th, 2000, 02:59 AM
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

wilton
January 10th, 2000, 04:28 AM
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?

Chris Eastwood
January 10th, 2000, 04:47 AM
>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