<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Определить размеры рабочего стола]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=4674&amp;type=atom" />
	<updated>2016-02-27T13:20:54Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=4674</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=101462#p101462" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>For Each I In GetObject(&quot;winmgmts:\\.\root\CIMV2&quot;).ExecQuery(&quot;SELECT ScreenWidth FROM Win32_DesktopMonitor&quot;) 
	With CreateObject(&quot;WScript.Shell&quot;)
    	If I.ScreenWidth &lt; 1024 Then .Run &quot;notepad&quot; Else .Run &quot;wordpad&quot;
	End With 
Next</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-02-27T13:20:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=101462#p101462</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=101461#p101461" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>DenisArK пишет:</cite><blockquote><p>Размер всего экрана можно определить так:<br /></p><div class="codebox"><pre><code>Set objWMIService = GetObject(&quot;winmgmts:\\.\root\cimv2&quot;)
Set colItems = objWMIService.ExecQuery(&quot;Select * from Win32_DesktopMonitor&quot;)
DeskHight = 0
DeskWidth = 0
For Each objItem in colItems
DeskHight = objItem.ScreenHeight
DeskWidth = objItem.ScreenWidth
Next

ВысотаНужнойЗоны= DeskHight - ВысотаПанелиЗадач</code></pre></div></blockquote></div><p>что нужно добавить в сей скрипт, чтобы в зависимости от разрешения экрана, запускались два разных приложения. В частности при разрешении менее 1024x768 запускалось одно, при равном или большем разрешении запускалось второе?</p>]]></content>
			<author>
				<name><![CDATA[onatra]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33721</uri>
			</author>
			<updated>2016-02-27T13:08:55Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=101461#p101461</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=41844#p41844" />
			<content type="html"><![CDATA[<p>без понятия, на моем компе что то странное творится....</p>]]></content>
			<author>
				<name><![CDATA[DenisArK]]></name>
			</author>
			<updated>2010-11-17T14:04:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=41844#p41844</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=41801#p41801" />
			<content type="html"><![CDATA[<p><strong>DenisArK</strong>, а что ж было?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-17T06:41:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=41801#p41801</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=41799#p41799" />
			<content type="html"><![CDATA[<p>на других компах тоже все нормально<br />это мои локальные проблемы</p><p>Всем спасибо, очень помогли!</p>]]></content>
			<author>
				<name><![CDATA[DenisArK]]></name>
			</author>
			<updated>2010-11-17T06:17:15Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=41799#p41799</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=41767#p41767" />
			<content type="html"><![CDATA[<p>У меня нормально; одинаково — сверху панель задач или снизу. Windows XP, пробовались темы классическая/Windows XP.<br /></p><div class="codebox"><pre><code>Option Explicit

Dim objHTMLDocument


Set objHTMLDocument = WScript.CreateObject(&quot;htmlfile&quot;)

With objHTMLDocument.parentWindow.screen
    WScript.Echo &quot;Разрешение:        &quot; &amp; .width &amp; &quot;x&quot; &amp; .height
    WScript.Echo &quot;Доступная область: &quot; &amp; .availWidth &amp; &quot;x&quot; &amp; .availHeight
End With

Set objHTMLDocument = Nothing

WScript.Quit 0</code></pre></div><div class="quotebox"><blockquote><div class="codebox"><pre><code>Разрешение:        1024x768
Доступная область: 1024x715</code></pre></div></blockquote></div>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-16T15:45:56Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=41767#p41767</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=41766#p41766" />
			<content type="html"><![CDATA[<p>Спасибо за ответы!<br />Попробовал.<br />Если панель задач внизу, скрипт дает размер зоны больше, чем в действительности, например, <br />.availHeight = 996, а в действительности примерно 974<br />в чем может быть проблема?</p>]]></content>
			<author>
				<name><![CDATA[DenisArK]]></name>
			</author>
			<updated>2010-11-16T15:20:47Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=41766#p41766</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=37367#p37367" />
			<content type="html"><![CDATA[<p>Точно! Я забыл про него.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-07-06T08:14:59Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=37367#p37367</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=37366#p37366" />
			<content type="html"><![CDATA[<p>Я бы порекомендовал вот так. Всё таки создание <strong>htmlfile</strong> меньше нагружает проц, чем создание целого IE. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>Dim document, info
set document = CreateObject(&quot;htmlfile&quot;)
With document.parentWindow.screen
    info = &quot;Разрешение:&quot; &amp; .width &amp; &quot;/&quot; &amp; .height &amp; vbCrlf
    info = info &amp; &quot;Доступная область:&quot; &amp; .availWidth &amp; &quot;/&quot; &amp; .availHeight
    MsgBox info
End With</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Xameleon]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=8836</uri>
			</author>
			<updated>2010-07-06T07:42:32Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=37366#p37366</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=37325#p37325" />
			<content type="html"><![CDATA[<p><img src="//forum.script-coding.com/img/smilies/yikes.png" width="15" height="15" /> я думал задача не решима...<br />однако...&nbsp; &nbsp;<img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Евген]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25253</uri>
			</author>
			<updated>2010-07-04T16:12:03Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=37325#p37325</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=37324#p37324" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>DenisArK пишет:</cite><blockquote><p>…как определить либо размер самой зоны…</p></blockquote></div><div class="codebox"><pre><code>Option Explicit

With WScript.CreateObject(&quot;InternetExplorer.Application&quot;)
    .Navigate &quot;about:blank&quot;
    
    Do
        WScript.Sleep 100
    Loop While .Busy
    
    With .Document.Script.Screen
        WScript.Echo .availWidth
        WScript.Echo .availHeight
    End With
    
    .Quit
End With

WScript.Quit 0</code></pre></div>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-07-04T15:55:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=37324#p37324</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=37216#p37216" />
			<content type="html"><![CDATA[<p><strong>DenisArK</strong>, на всякий случай замечу, что панель задач может располагаться и сбоку.</p>]]></content>
			<author>
				<name><![CDATA[Dmitrii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=13351</uri>
			</author>
			<updated>2010-07-02T09:47:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=37216#p37216</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: Определить размеры рабочего стола]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=37204#p37204" />
			<content type="html"><![CDATA[<p>Добрый день!</p><p>Необходимо получить размеры зоны рабочего стола без панели задач.</p><p>Размер всего экрана можно определить так:<br /></p><div class="codebox"><pre><code>Set objWMIService = GetObject(&quot;winmgmts:\\.\root\cimv2&quot;)
Set colItems = objWMIService.ExecQuery(&quot;Select * from Win32_DesktopMonitor&quot;)
DeskHight = 0
DeskWidth = 0
For Each objItem in colItems
DeskHight = objItem.ScreenHeight
DeskWidth = objItem.ScreenWidth
Next

ВысотаНужнойЗоны= DeskHight - ВысотаПанелиЗадач</code></pre></div><p><span style="color: green">Используйте <a href="http://forum.script-coding.com/help.php#bbcode">тэг «code»</a></span></p><p>Подскажите как определить либо размер самой зоны, либо как определить высоту панели задач?</p>]]></content>
			<author>
				<name><![CDATA[DenisArK]]></name>
			</author>
			<updated>2010-07-01T12:33:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=37204#p37204</id>
		</entry>
</feed>
