<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Accessing the Windows API in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232700#M84289</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;modified from something found on the internet. remember to allow system access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Sub GetDisplayConfiguration&lt;BR /&gt; strComputer = "."&lt;BR /&gt; Set objWMIService = GetObject("winmgmts:\\" &amp;amp; strComputer &amp;amp; "\root\cimv2")&lt;BR /&gt; Set colItems = objWMIService.ExecQuery("Select * From Win32_DisplayConfiguration")&lt;BR /&gt;&lt;BR /&gt; For Each objItem in colItems&lt;BR /&gt; msgbox("Name: " &amp;amp; objItem.DeviceName)&lt;BR /&gt; msgbox("Color depth: " &amp;amp; objItem.BitsPerPel)&lt;BR /&gt; msgbox("Horizontal resolution: " &amp;amp; objItem.PelsWidth)&lt;BR /&gt; msgbox("Vertical resolution: " &amp;amp; objItem.PelsHeight)&lt;BR /&gt; Next&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 May 2010 17:49:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-05T17:49:18Z</dc:date>
    <item>
      <title>Accessing the Windows API</title>
      <link>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232699#M84288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: bold"&gt;Is it not possible to use this in a VBScript macro?&lt;/P&gt;&lt;P&gt;Declare Function GetDesktopWindow Lib "User32" () As Long&lt;BR /&gt;Declare Function GetWindowRect Lib "User32" (ByVal hWnd As Long, rectangle As RECT) As Long&lt;/P&gt;&lt;P&gt;&lt;B&gt;What I want is a macro that will query Windows to determine the current screen resolution. This is simple in VB but I don't see how it can be done from within QlikView.&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 17:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232699#M84288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-05T17:36:23Z</dc:date>
    </item>
    <item>
      <title>Accessing the Windows API</title>
      <link>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232700#M84289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;modified from something found on the internet. remember to allow system access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Sub GetDisplayConfiguration&lt;BR /&gt; strComputer = "."&lt;BR /&gt; Set objWMIService = GetObject("winmgmts:\\" &amp;amp; strComputer &amp;amp; "\root\cimv2")&lt;BR /&gt; Set colItems = objWMIService.ExecQuery("Select * From Win32_DisplayConfiguration")&lt;BR /&gt;&lt;BR /&gt; For Each objItem in colItems&lt;BR /&gt; msgbox("Name: " &amp;amp; objItem.DeviceName)&lt;BR /&gt; msgbox("Color depth: " &amp;amp; objItem.BitsPerPel)&lt;BR /&gt; msgbox("Horizontal resolution: " &amp;amp; objItem.PelsWidth)&lt;BR /&gt; msgbox("Vertical resolution: " &amp;amp; objItem.PelsHeight)&lt;BR /&gt; Next&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 17:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232700#M84289</guid>
      <dc:creator />
      <dc:date>2010-05-05T17:49:18Z</dc:date>
    </item>
    <item>
      <title>Accessing the Windows API</title>
      <link>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232701#M84290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian,&lt;/P&gt;&lt;P&gt;Here is a little macro I use that fetches screen height/width&lt;/P&gt;&lt;P&gt;sub ZoomToFitWindow&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.WaitForIdle&lt;BR /&gt; If ActiveDocument.GetApplication.ScreenWidth = 1280 and ActiveDocument.GetApplication.ScreenHeight = 1024 then&lt;BR /&gt; set thisSheet=ActiveDocument.ActiveSheet&lt;BR /&gt; set sp=thisSheet.GetProperties&lt;BR /&gt; sp.ZoomFactor = 1.0&lt;BR /&gt; thisSheet.SetProperties sp&lt;BR /&gt; else&lt;BR /&gt; ActiveDocument.ActiveSheet.FitZoomToWindow&lt;BR /&gt; end if&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 17:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232701#M84290</guid>
      <dc:creator />
      <dc:date>2010-05-05T17:54:13Z</dc:date>
    </item>
    <item>
      <title>Accessing the Windows API</title>
      <link>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232702#M84291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 18:13:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accessing-the-Windows-API/m-p/232702#M84291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-05T18:13:03Z</dc:date>
    </item>
  </channel>
</rss>

