PC Review


Reply
Thread Tools Rate Thread

creating click events to controls created in runtime

 
 
Timothy Taylor
Guest
Posts: n/a
 
      25th Sep 2003
Hello,
I need all the help I can get...
I am making a picture explorer program and I need to make a thumbnail view.
I plan on browsing for images in a certain folder and showing a thumbnail
view of them.
Here are my problems that I cannot figure out....

I want to create a new picturebox for every image in the directory chosen.
However I want to be able to have control. At least what I'm saying is I
need to after I create the pictureboxes I need to have a click event for
them. Can't I create a bunch of new pictureboxes, and then tell them all to
have a click event that goes to an already made function or sub?

Another way I could do it is to draw the images on the form or in a panel
using the drawing class. But I have a problem with that... I want to have
thumbnail, so I need to shrink the picture down!
Is there any VB.NET CF (what I'm working in) code to open a image into a
bitmap, but before drawing it on the screen or before inserting it into a
picture box for it to shrink it to be a certain size? I need a smaller
version of the image that is proportional to the real image. I also need to
do this instead of picture box that stretches the images because if my user
opens a folder with say...20 large images it's going to take forever to load
all the images full blown into pictureboxes! I need a smaller, quicker
solution.

Any suggestions, code, websites??

Any help is much appreciated!

Thanks so much in advance,

-Tim


 
Reply With Quote
 
 
 
 
Alex Yakhnin, eMVP
Guest
Posts: n/a
 
      25th Sep 2003
Here is the ready picture viewer program by Romuald Tisserand
with the source code:

http://www.codeppc.com/dotnet/index.htm

and the direct link:

http://www.codeppc.com/dotnet/programmes/pex/pex.zip

--
Alex Yakhnin, Microsoft Embedded MVP
IntelliProg, Inc.
http://www.intelliprog.com

"Timothy Taylor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
> I need all the help I can get...
> I am making a picture explorer program and I need to make a thumbnail

view.
> I plan on browsing for images in a certain folder and showing a thumbnail
> view of them.
> Here are my problems that I cannot figure out....
>
> I want to create a new picturebox for every image in the directory chosen.
> However I want to be able to have control. At least what I'm saying is I
> need to after I create the pictureboxes I need to have a click event for
> them. Can't I create a bunch of new pictureboxes, and then tell them all

to
> have a click event that goes to an already made function or sub?
>
> Another way I could do it is to draw the images on the form or in a panel
> using the drawing class. But I have a problem with that... I want to have
> thumbnail, so I need to shrink the picture down!
> Is there any VB.NET CF (what I'm working in) code to open a image into a
> bitmap, but before drawing it on the screen or before inserting it into a
> picture box for it to shrink it to be a certain size? I need a smaller
> version of the image that is proportional to the real image. I also need

to
> do this instead of picture box that stretches the images because if my

user
> opens a folder with say...20 large images it's going to take forever to

load
> all the images full blown into pictureboxes! I need a smaller, quicker
> solution.
>
> Any suggestions, code, websites??
>
> Any help is much appreciated!
>
> Thanks so much in advance,
>
> -Tim
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling events of controls created at runtime Klaus Jensen Microsoft ASP .NET 1 22nd Jun 2007 12:23 AM
Add events to array of controls created at runtime =?Utf-8?B?U3RldmUgTW9yZW5v?= Microsoft VB .NET 0 1st Feb 2006 04:55 PM
VB.NET: How to capture events of controls created at runtime =?Utf-8?B?QXJjb0NhdA==?= Microsoft Dot NET 1 19th Jul 2005 11:42 PM
Events for runtime created controls. Tym Microsoft VB .NET 16 8th Nov 2004 05:29 PM
Custom User Controls and dynamically created web controls events not firing Nicole Microsoft Dot NET Framework 0 25th Sep 2003 10:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:58 AM.