Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default LoadPicture fails

Hi,

I have an image control on a Form and load the pictures with
the command:

Form1.img1.Picture = LoadPicture(MyPicture)

A click on the form correctly assigns the
next picture filename (and Path) to MyPicture and you see each picture
in succession.

However, if the image is clicked on, the next picture(s) isn't shown.
The code still executes, with all the correct parameters for MyPicture
but the LoadPicture instruction just seems to be ignored. I can step
through and see this, and it occurs every time.

There's no click event (or anything else) coded for the img1 control.

Anyone know what's happening here? !!

Thanks - Kirk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default LoadPicture fails

after loading the picture do

Me.Repaint

Regards,
Peter T

<kirkm wrote in message ...
Hi,

I have an image control on a Form and load the pictures with
the command:

Form1.img1.Picture = LoadPicture(MyPicture)

A click on the form correctly assigns the
next picture filename (and Path) to MyPicture and you see each picture
in succession.

However, if the image is clicked on, the next picture(s) isn't shown.
The code still executes, with all the correct parameters for MyPicture
but the LoadPicture instruction just seems to be ignored. I can step
through and see this, and it occurs every time.

There's no click event (or anything else) coded for the img1 control.

Anyone know what's happening here? !!

Thanks - Kirk



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default LoadPicture fails

On Thu, 16 Apr 2009 12:45:07 +0100, "Peter T" <peter_t@discussions
wrote:

after loading the picture do

Me.Repaint

Regards,
Peter T


Thanks for the suggestion, Peter. I ttried that
and also a 'full path'
frmOne.img1.Picture.Repaint

.... but neither make any difference. It does
seem odd. I'm going to make a new workbook
with just that routine by itself. Maybe you
could run that and see what you get? Perhaps I'm
making a mistake somehow that's causing the glitch.

Cheers - Kirk
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default LoadPicture fails

On Thu, 16 Apr 2009 12:45:07 +0100, "Peter T" <peter_t@discussions
wrote:

after loading the picture do

Me.Repaint

Regards,
Peter T


Peter, you're quite right - thank you.

Originally I could get this to work but it does now!

Cheers - Kirk
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
LoadPicture(FileName) with size? Charlotte E. Excel Programming 2 September 16th 08 11:33 AM
LoadPicture compile error Jim[_7_] Excel Programming 1 December 20th 07 11:17 PM
LoadPicture for a ControlButton help micmacuk Excel Programming 7 May 30th 06 08:44 PM
conditional compile for LoadPicture? RB Smissaert Excel Programming 2 March 27th 06 04:37 PM
LoadPicture - how to keep .jpg compression No Name Excel Programming 0 May 25th 04 08:14 AM


All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"