Add Macromedia Flash Resizing II


First, set ShockwaveFlash1.Align := alClient. (at designtime)

Then, after runtime resizing is complete use Form1.SetFocus to take focus away from the ShockwaveFlash1 (if it has it) and then use ShockwaveFlash1.SetFocus to return focus to ShockwaveFlash1, this method seems to force the object to update.

That is what works best for me in Delphi 4. You may want to return focus to the component that had focus prior to the resize operation.

-CStoll


Example Code:
=============
procedure TForm1.FormResize(Sender: TObject);
begin
Form1.SetFocus;
Shockwaveflash1.SetFocus;
{return focus to previously focused object}
end;

Final Note:
===========
I have not found a way to make the flash objects resize properly during designtime. But, I personally do not care how it looks at designtime.
Related Discussions
  • HOW DO I STRETCH THE SIZE OF FORM WHEN SCREEN RES INCREASED? (2001-01-09 05:54:00)
    first of all i am not sure what is your requirement are u concerned with first time sizing of your form on initialization or do you want to...
  • YOUR FAVORITE BDE ALTERNATIVE? (2001-01-13 12:44:19)
    I joined the company I am currently working for three years ago. MsAccess databases were managed with the BDE. Since we ship our application to...
  • POPUPMENU (2001-01-16 13:38:57)
    http://www.delphipages.com/tips/thread.cfm?ID=80 This sounds like the solution to your question, but not sure, look at it and see. Yes, it is...
  • CONTAINER CONTROL (2001-01-18 17:10:55)
    Find and try the TStretchHandle component on either Torry's or DSP.
  • DELPHI COMPONENT (2001-01-21 17:55:08)
    Hey! All i can suggest you is a piece of code (really confusing one) but I think that will do the job. Well... here it is... a long one but...
  • INSTALLIN MACROMEDIA FLASH(SHOCKWAVE PLAYERS) ON COMP WITHOUT INTERNET (2003-04-02 19:24:42)
    Hi! I know this is a really late reply. But I was looking through all the topics I started... You have written a great article, I'll accept your...
  • INVOKING DELPHI APP FROM WEB PAGE WITH INPUT PARMS (2001-02-02 14:38:30)
    Many thank for persevering. The IE Browser does allow local PC exes to be started - as you probably know - it offers a download or run-as-is...
  • HOW CAN I PUT AN EXECUTABLE FILE IN MY PROGRAM ? (2001-01-31 08:34:36)
    This has already been asked and answered. See this post: http://www.delphipages.com/threads/thread.cfm?ID=18973&G=18961
  • HOW TO CHANGE THE SIZE OF A TJPEGIMAGE? (2001-02-01 09:27:02)
    Take a look at this site. http://www.melander.dk/delphi/resampler/ It has code showing resampling (resizing) of JPEGS.
  • SERIOUS RESIZE PROBLEM (2001-02-16 05:47:52)
    Check out this website it really helped me www.lynam.org.uk
Latest News
Submit News Form Past News
Latest Forum Entries