Konu: Form Üzerinde Html Sayfada Döviz Kurları Gösterimi
Arkadaşlar kendimde kullanmayı düşündüğüm bir sey geliştirdim sizlerlede paylaşmak istedim
PUBLIC odaily_currency
odaily_currency=NEWOBJECT("daily_currency")
odaily_currency.Show
RETURN
**************************************************
*-- Form: daily_currency (d:\soykan\mysoftware\depomatik\form\daily_currency.scx)
*-- ParentClass: form
*-- BaseClass: form
*-- Time Stamp: 02/15/10 11:35:04 AM
*
DEFINE CLASS daily_currency AS form
Top = 0
Left = 0
Height = 410
Width = 211
DoCreate = .T.
Tag = "daily_currency"
BorderStyle = 0
Caption = "Döviz Kurları"
MaxButton = .F.
MinButton = .F.
Movable = .F.
Icon = "..\static\vs_ico.ico"
Name = "daily_currency"
ADD OBJECT oie AS olecontrol WITH ;
Top = 0, ;
Left = 0, ;
Height = 410, ;
Width = 210, ;
Name = "OIE",;
OleClass = 'Shell.Explorer'
PROCEDURE Destroy
ERASE 'doviz.htm'
ERASE 'NoDoviz.htm'
ENDPROC
PROCEDURE Init
Local lcDovizHtml,lcNoDovizHtml
lcDovizHtml = Sys(5)+Curdir()+'doviz.htm'
lcNoDovizHtml = Sys(5)+Curdir()+'Nodoviz.htm'
Local lcURL
lcURL=[http://www.google.com/]
Declare Integer InternetCheckConnection In Wininet.Dll String Url, Long dwFlags, Long Reserved
If InternetCheckConnection(lcURL, 1, 0) != 0
*Return .T.
TEXT TO m.lcDoviz TEXTMERGE noshow
<script type="text/javascript" src="http://www.doviz.com/script/widget.js">
</script>
<script type="text/javascript">_dovizCurrency('USD_EUR','','http://www.doviz.com/')</script>
<div style="width:100%;text-align:center;font-size:11px">
<a style="text-decoration:none;color:#000000" href="http://www.doviz.com/" title="Döviz, Dolar, Euro, Sterlin" target="_blank">
</a>
</div>
ENDTEXT
If ! File('doviz.htm')
Strtofile(m.lcDoviz,m.lcDovizHtml)
Endif
With Thisform.OIE
.Navigate2('file://'+m.lcDovizHtml)
Do While .ReadyState # 4 && Wait for ready state
Enddo
Endwith
Else
*Return .F.
*Messagebox('bla bla',16,_Screen.Caption)
Local NoInternetImage
NoInternetImage = 'static/internet-main_full.jpg'
TEXT TO m.lcNoDoviz TEXTMERGE noshow
<html>
<head>
<title>Doviz Kurları</title>
<style type="text/css">
.Soykan {
font-family:,Georgia,ms trebuchet,tahoma,Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
font-weight: bold;
color:Red;
text-align:center;
}
.GreyBox {border: 1px solid #CCCCCC;}
#fox4um
{
width:160px;
height:330px;
padding:1px;
}
</style>
</head>
<body>
<div id="fox4um"class="GreyBox">
<span class="Soykan">Internet Baglantiniz Yok !!! </span>
<br />
<img src= "static/internet-main_full.jpg" width="159" height="329" /></img>
</div>
</body>
</html>
ENDTEXT
If ! File('NoDoviz.htm')
Strtofile(m.lcNoDoviz,m.lcNoDovizHtml)
Endif
With Thisform.OIE
.Navigate2('file://'+m.lcNoDovizHtml)
Do While .ReadyState # 4 && Wait for ready state
Enddo
Endwith
Endif
With This As Form
.Width = .OIE.Width
.Height = .OIE.Height
.Left = (Sysmetric(1)-.Width)-10
Endwith
ENDPROC
ENDDEFINE
*
*-- EndDefine: daily_currency
**************************************************