Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {=============================== EmbedWebpage ================================}
- (100, 1000, 1000, 100)
- (
- Address Text;
- )
- [
- Thumbnail = "Bitmaps\Icons\Globe icon.bmp";
- Title = "Embed Webpage";
- BrowserObj;
- Loaded;
- Img;
- L; B; R; T;
- W; H;
- Color = "<FFFA1414>";
- ]
- Init [
- If 1 Preview;
- [
- UnTransform(Self());
- Img = MakeBitmap(\LibX\FindFile(Thumbnail), 0);
- ]
- ]
- Preview [
- If !ParentWindow()\Editing && !\IsDrawMethodPreview() Main;
- [
- Loaded = FALSE;
- ]
- L = GetXformRefBox(Self(), 0);
- B = GetXformRefBox(Self(), 1);
- R = GetXformRefBox(Self(), 2);
- T = GetXformRefBox(Self(), 3);
- W = BitmapInfo(Img, 0);
- H = BitmapInfo(Img, 1);
- GUIRectangle(0, 1, 1, 0,
- 1-L, B, R, 1-T, 1, 0, 0, 1, 0, 0, 0, 0,
- 248, -1);
- GUIBitmap(0, 1, 1, 0,
- 1 - (L+R-W)/2, (T+B+H)/2, (L+R+W)/2, 1 - (T+B-H)/2, 1,
- 0, 0, 1, 0, 0, 0, 0,
- Img);
- ]
- Main [
- If ParentWindow()\Editing || \IsDrawMethodPreview() Preview;
- L = GetXformRefBox(Self(), 0);
- B = GetXformRefBox(Self(), 1);
- R = GetXformRefBox(Self(), 2);
- T = GetXformRefBox(Self(), 3);
- If Watch(0, L, B, R, T, Address) Preview;
- GUITransform(0, 1, 1, 0,
- 1-L, B, R, 1-T, 1, 0, 0, 1, 0, 0, 0, 0,
- BrowserObj = ActiveX(L, B, R, T, "Shell.Explorer"));
- If Timeout(Valid(BrowserObj) && !Loaded, 0.1);
- [
- BrowserObj\Navigate(Address);
- Loaded = TRUE;
- ]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement