음.. 왜그럴까...검색하다가 보니 이런내용이 있군요. 그런데 98년도 글이라 -_-;;;; 신빙성?! -_-;;;
안해봐서 잘 모르겠네요... 그런데 왜 그런지에 대한 내용은 들어있네요.
뭐... 이번기회에 소리바람님께서 SWF 를 완벽(?)하게 사용하는 예제를 만들어서 뿌려주심이~~~~~~~
출처 :
http://luizvaz.freezope.org/articles/delphi/components/shockwav_html
Macromedia Flash Resizing - A easy way
Reading the code of a program that i was written in 1998, i found a fix to the glitch that occurs when a Flash control is resized inside a delphi application!
The Problem:
- I lost some time searching about the control don?t receive any notification about changes that modify itself.
The fact is that, after it was dropped in a form or any parent control, it loses the perception of any changes made, because it expect that the parent send this message to him (Using some OLE method?s).
- Starting at the concept that "when the control is created at runtime it obey the first shape" i looked for a malfunction in one CreateWindow function call.
Voila!
The Solution:
- Overriding the resize method of TControl i could notify the control about the correct container size. It force the TOleControl to redraw the content properly!
The Code:
- After importing the Flash Control (SWFLASH.OCX) to a Delphi unit you can apply this patch:
{Shockwave Control}
TShockwaveFlash = class(TOleControl)
private
...
protected
...
{Resize Error Workaround}
procedure Resize; override;
...
end;
{Implementation}
procedure TShockwaveFlash.Resize;
begin
{Sync flash bounds after move}
DoObjectVerb(OLEIVERB_SHOW);
end;
You can download the unit shockwav.pas to read more about this!
Obs:
Don?t press Ctrl+Shft+C at TShockwaveFlash to use Class Completion to declare the implementation for you!
It will redefine a large number of procedures that are inherited of TOleControl and don?t exists at this time!
So write it manualy!!!!
The End:
- I hope that it was usefull to something!!!
황경록 님이 쓰신 글 :
: 좋은 예제 감사드립니다. ^^...
:
: 다음기회에 사용해 봐야겠군요~ 강좌라도~
:
: 원하시는 답변이 맞아야 할텐데요 ^^...
:
: FormResize Event 핸들러 루틴에
:
: 예제를 기준으로
:
: Panel1->SetFocus();
: MySWF->SetFocus();
:
: 이 두라인만 추가해 주시면 됩니다.
:
: 10분걸렸네요;;;;;; T.T;;;;
:
: 왜 그런지는;;;; 그냥 침묵속으로~ 즐빌하세요!
:
:
: 소리바람.OJ 님이 쓰신 글 :
: : 어제에 이어 오늘도 Flash로 고민하고 있습니다.
: :
: : 회사에서 제작된 프로그램의 UI가 못 마땅해서 Flash로 구현하고 핸들링을 하면 된다고 제안을 자신있게 했는데,
: : 잘 알지도 못하는 것을 건드린 것 같아 고민입니다.
: :
: : Flash Movie는 Web browser에서는 폼의 크기에 따라 다시 화면에 그려집니다.
: : 그러나, 어찌된 영문인지 Application의 폼에 위치시키고 크기를 조절하면 반영이 되지 않습니다.
: : Desktop의 배경이 폼에 잔상으로 남습니다.
: : 당연히, align를 client로 맞추어 두었습니다.
: :
: : 간단한 예제 프로그램을 올리겠습니다.
: : 아시는 분의 도움이 필요합니다. 꾸벅~
: :
: :
: : 오늘도 모든이의 건승을 빕니다.