<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fatih Ekrem Genç'in blogu &#187; Visual Basic 6.0</title>
	<atom:link href="http://fatihgenc.com/category/genel-programlama/visual-basic-60/feed/" rel="self" type="application/rss+xml" />
	<link>http://fatihgenc.com</link>
	<description>İyiliği emret kötülüklerden sakındır ..</description>
	<lastBuildDate>Wed, 28 Jul 2010 13:02:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Visual basic 6.0 öldü allah rahmet eylesin</title>
		<link>http://fatihgenc.com/2005/12/21/visual-basic-60-oldu-allah-rahmet-eylesin/</link>
		<comments>http://fatihgenc.com/2005/12/21/visual-basic-60-oldu-allah-rahmet-eylesin/#comments</comments>
		<pubDate>Wed, 21 Dec 2005 18:46:52 +0000</pubDate>
		<dc:creator>Fatih Ekrem Genc</dc:creator>
				<category><![CDATA[Visual Basic 6.0]]></category>

		<guid isPermaLink="false">http://www.fatihgenc.com/?p=10</guid>
		<description><![CDATA[Aldigim istihbaratlara göre MS visual basic 6.0&#8242;i 1.5 sene daha destekliyecekmis. lakin simdiden bazi funksiyonlari windowsxp üzerinde degisiklik yapmaya aciz kaliyor. VB6.0 zamanlanmis görevler kismina bir görev eklemeye calistim muaffak oldum evelallah.Ama görev tam tandimanli calismadi. hatta bu islem icin kullandigim create funksiyonunun bazi atributlari calismiyor. Kullanici olusan objekt üzerinde degisiklik yapabilsin diye bir atribute [...]]]></description>
			<content:encoded><![CDATA[<p>Aldigim istihbaratlara göre MS visual basic 6.0&#8242;i 1.5 sene daha destekliyecekmis.<br />
lakin simdiden bazi funksiyonlari windowsxp üzerinde degisiklik yapmaya aciz kaliyor.<br />
VB6.0 zamanlanmis görevler kismina bir görev eklemeye calistim muaffak oldum evelallah.Ama<br />
görev tam tandimanli calismadi. hatta bu islem icin kullandigim create funksiyonunun bazi atributlari calismiyor. Kullanici olusan objekt üzerinde degisiklik yapabilsin diye bir atribute var.<br />
<strong>dektopinterface</strong> gibi bisey olucakti onu <strong>true</strong> yapmama ragmen   calismadi. görev saati geldiginde program tam haklarla calistirilamadigi icin görevini yerine getiremedi. Hulasil kelam VB6.0 ile siz siz olun yeni bir projeye baslamayin.<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_scheduledjob.asp">Bahsi gecen visual basic yada visual basic script koduna bu linkden ulasabilirsiniz</a> vesselam&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://fatihgenc.com/2005/12/21/visual-basic-60-oldu-allah-rahmet-eylesin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Active Desktop üzerinde duvar kagidi degistirme</title>
		<link>http://fatihgenc.com/2005/12/18/5/</link>
		<comments>http://fatihgenc.com/2005/12/18/5/#comments</comments>
		<pubDate>Sun, 18 Dec 2005 21:33:41 +0000</pubDate>
		<dc:creator>Fatih Ekrem Genc</dc:creator>
				<category><![CDATA[Visual Basic 6.0]]></category>

		<guid isPermaLink="false">http://www.fatihgenc.com/?p=5</guid>
		<description><![CDATA[Aslinda windows üzerinde duvarkagidini degistirmek okadar elzem bir is degildir. Etkin hale getirmek istediginiz duvarkagidi bmp formatinda oldugu sürece. Asagidaki funksiyonu googlede bulacaginiz bir cok örneginde oldugu gibi kullanirsaniz sorun cözülmüs olur. Lakin duvarkagidi olarak kullanmak istediginiz dosya jpg,html gibi aktivedesktop gerektiren bir dosya ise. bu makaleyi okumaya devam edin. SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, imageLocation,_ SPIF_UPDATEINIFILE Or [...]]]></description>
			<content:encoded><![CDATA[<p>Aslinda windows üzerinde duvarkagidini degistirmek okadar elzem bir is degildir.<br />
Etkin hale getirmek istediginiz duvarkagidi bmp formatinda oldugu sürece. Asagidaki  funksiyonu<br />
googlede bulacaginiz bir cok örneginde oldugu gibi kullanirsaniz sorun cözülmüs olur.<br />
Lakin duvarkagidi olarak kullanmak istediginiz dosya jpg,html gibi aktivedesktop gerektiren bir dosya ise. bu makaleyi okumaya devam edin.<br />
<span id="more-5"></span></p>
<p><code lang="vb" >  SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, imageLocation,_<br />
 SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)<br />
</code></p>
<p>
örnek link:<a href="http://www.devx.com/tips/Tip/21380">http://www.devx.com/tips/Tip/21380</a></p>
<p>
 Bu kod asagidaki linkten alinip turkcelestirilmistir&#8230;<br />
<a href="http://www.vbarchiv.net/archiv/tipp_details.php?pid=1339">http://www.vbarchiv.net/&#8230;.php?pid=1339<br />
</a></p>
<p><strong>Modul modWallpaper</strong></p>
<p><code lang="vb">Option Explicit</p>
<p>' Benötigte API-Deklarationen<br />
Private Declare Function IIDFromString Lib "ole32" ( _<br />
  ByVal lpszIID As Long, _<br />
  iid As Any) As Long</p>
<p>Private Declare Function CoCreateInstance Lib "ole32" ( _<br />
  rclsid As Any, _<br />
  ByVal pUnkOuter As Long, _<br />
  ByVal dwClsContext As Long, _<br />
  riid As Any, _<br />
  ByVal ppv As Long) As Long</p>
<p>Private Declare Function CallWindowProcA Lib "user32" ( _<br />
  ByVal addr As Long, _<br />
  ByVal p1 As Long, _<br />
  ByVal p2 As Long, _<br />
  ByVal p3 As Long, _<br />
  ByVal p4 As Long) As Long</p>
<p>Private Declare Sub RtlMoveMemory Lib "kernel32" ( _<br />
  pDst As Any, _<br />
  pSrc As Any, _<br />
  ByVal dlen As Long)</p>
<p>Private Const CLSCTX_INPROC_SERVER  As Long = 1&#038;<br />
Private Const CLSID_ActiveDesktop   As String = _<br />
  "{75048700-EF1F-11D0-9888-006097DEACF9}"</p>
<p>Private Type GUID<br />
  data1                   As Long<br />
  data2                   As Integer<br />
  data3                   As Integer<br />
  data4(7)                As Byte<br />
End Type</p>
<p>Private Type IActiveDesktop<br />
  ' IUnknown<br />
  QueryInterface          As Long<br />
  AddRef                  As Long<br />
  Release                 As Long<br />
  ' IActiveDesktop</p>
<p>  ApplyChanges            As Long<br />
  GetWallpaper            As Long<br />
  SetWallpaper            As Long<br />
  GetWallpaperOptions     As Long<br />
  SetWallpaperOptions     As Long<br />
  GetPattern              As Long<br />
  SetPattern              As Long<br />
  GetDesktopItemOptions   As Long<br />
  SetDesktopItemOptions   As Long<br />
  AddDesktopItem          As Long<br />
  AddDesktopItemWithUI    As Long<br />
  ModifyDesktopItem       As Long<br />
  RemoveDesktopItem       As Long<br />
  GetDesktopItemCount     As Long<br />
  GetDesktopItem          As Long<br />
  GetDesktopItemByID      As Long<br />
  GenerateDesktopItemHtml As Long<br />
  AddUrl                  As Long<br />
  GetDesktopItemBySource  As Long<br />
End Type</p>
<p>Private Enum AD_APPLY<br />
  AD_APPLY_SAVE = &#038;H1<br />
  AD_APPLY_HTMLGEN = &#038;H2<br />
  AD_APPLY_REFRESH = &#038;H4<br />
  AD_APPLY_ALL = &#038;H7<br />
  AD_APPLY_FORCE = &#038;H8<br />
  AD_APPLY_BUFFERED_REFRESH = &#038;H10<br />
  AD_APPLY_DYNAMICREFRESH = &#038;H20<br />
End Enum</p>
<p></code><br />
<code lang="vb"></p>
<p>Public Function ActiveDesktopSetWallpaper( _<br />
  ByVal strFile As String) As Boolean</p>
<p>  Dim vtbl         As IActiveDesktop<br />
  Dim vtblptr      As Long</p>
<p>  Dim classid      As GUID</p>
<p>  Dim IID_IUnknown As GUID</p>
<p>  Dim obj          As Long<br />
  Dim hRes         As Long</p>
<p>  With IID_IUnknown<br />
    .data4(0) = &#038;HC0<br />
    .data4(7) = &#038;H46<br />
  End With</p>
<p>  ' CLSID String  strukter yapisina dunusturelim (nedemekse)<br />
  hRes = IIDFromString(StrPtr(CLSID_ActiveDesktop), classid)<br />
  If hRes <> 0 Then<br />
    Debug.Print "IDD ye cevirme basarisizlikla sonuclandi"<br />
    Exit Function<br />
  End If</p>
<p>  ' IActiveDesktop Instanz olustu<br />
  hRes = CoCreateInstance(classid, 0, &#038;H1, IID_IUnknown, VarPtr(obj))<br />
  If hRes <> 0 Then<br />
    Debug.Print " IActiveDesktop Instanz olusturulmasi basarisizlikla sonuclandi"<br />
    Exit Function<br />
  End If</p>
<p>  ' VTable den  Instanz kopyala<br />
  RtlMoveMemory vtblptr, ByVal obj, 4<br />
  RtlMoveMemory vtbl, ByVal vtblptr, Len(vtbl)</p>
<p>  ' SetWallpaper den VTable  cagiralim<br />
  hRes = CallPointer(vtbl.SetWallpaper, obj, StrPtr(strFile), 0)<br />
  If hRes <> 0 Then<br />
    Debug.Print "yeni wallpaperi yerlestirilemedi"<br />
  Else<br />
    ActiveDesktopSetWallpaper = True<br />
  End If</p>
<p>  ' ApplyChanges aus VTable aufrufen<br />
  hRes = CallPointer(vtbl.ApplyChanges, obj, AD_APPLY_ALL Or AD_APPLY_FORCE)<br />
  If hRes <> 0 Then<br />
    Debug.Print "masa usutu aktualize edilemedi"<br />
  End If</p>
<p>  ' Instanz zerstören<br />
  CallPointer vtbl.Release, obj<br />
End Function</p>
<p>Private Function CallPointer(ByVal fnc As Long, ParamArray params()) As Long<br />
  Dim btASM(&#038;HEC00&#038; - 1)  As Byte<br />
  Dim pASM                As Long<br />
  Dim i                   As Integer</p>
<p>  pASM = VarPtr(btASM(0))</p>
<p>  AddByte pASM, &#038;H58                  ' POP EAX<br />
  AddByte pASM, &#038;H59                  ' POP ECX<br />
  AddByte pASM, &#038;H59                  ' POP ECX<br />
  AddByte pASM, &#038;H59                  ' POP ECX<br />
  AddByte pASM, &#038;H59                  ' POP ECX<br />
  AddByte pASM, &#038;H50                  ' PUSH EAX</p>
<p>  For i = UBound(params) To 0 Step -1<br />
    AddPush pASM, CLng(params(i))     ' PUSH dword<br />
  Next</p>
<p>  AddCall pASM, fnc                   ' CALL rel addr<br />
  AddByte pASM, &#038;HC3                  ' RET</p>
<p>  CallPointer = CallWindowProcA(VarPtr(btASM(0)), 0, 0, 0, 0)<br />
End Function</p>
<p>Private Sub AddPush(pASM As Long, lng As Long)<br />
  AddByte pASM, &#038;H68<br />
  AddLong pASM, lng<br />
End Sub</p>
<p>Private Sub AddCall(pASM As Long, addr As Long)<br />
  AddByte pASM, &#038;HE8<br />
  AddLong pASM, addr - pASM - 4<br />
End Sub</p>
<p>Private Sub AddLong(pASM As Long, lng As Long)<br />
  RtlMoveMemory ByVal pASM, lng, 4<br />
  pASM = pASM + 4<br />
End Sub</p>
<p>Private Sub AddByte(pASM As Long, bt As Byte)<br />
  RtlMoveMemory ByVal pASM, bt, 1<br />
  pASM = pASM + 1<br />
End Sub</p>
<p>Code zum Testen:</p>
<p>If ActiveDesktopSetWallpaper("C:\wallpaper.jpg") Then<br />
  MsgBox "yeni duvar kagidi yerlestirildi"<br />
Else<br />
  MsgBox "yeni duvar kagidi yerlestirilemedi"<br />
End If</code></p>
]]></content:encoded>
			<wfw:commentRss>http://fatihgenc.com/2005/12/18/5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
