<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=410521&amp;view=findpost&amp;p=3712743</guid>
        <pubDate>Thu, 23 Mar 2017 04:06:47 +0000</pubDate>
        <title>Создание ярлыка</title>
        <link>https://forum.sources.ru/index.php?showtopic=410521&amp;view=findpost&amp;p=3712743</link>
        <description><![CDATA[bogdanchek: Вопрос решился по средствам морт скрипта. Морт скрипт копирует файл в озу и запускает мою прогу.]]></description>
        <author>bogdanchek</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=410521&amp;view=findpost&amp;p=3712446</guid>
        <pubDate>Tue, 21 Mar 2017 16:52:59 +0000</pubDate>
        <title>Создание ярлыка</title>
        <link>https://forum.sources.ru/index.php?showtopic=410521&amp;view=findpost&amp;p=3712446</link>
        <description><![CDATA[bogdanchek: Ситуация немного прояснилась, если файл находится на флешке/флеш карте/флеш памяти устройства, классы File, Directory, Reader-ы с ним не работают, если на рабочем столе - все работает]]></description>
        <author>bogdanchek</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=410521&amp;view=findpost&amp;p=3712232</guid>
        <pubDate>Mon, 20 Mar 2017 19:37:32 +0000</pubDate>
        <title>Создание ярлыка</title>
        <link>https://forum.sources.ru/index.php?showtopic=410521&amp;view=findpost&amp;p=3712232</link>
        <description><![CDATA[bogdanchek: Этот вопрос решился, файл ярлыка(.lnk) просто текстовый файл с путем к запускаемой программе:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">string s = @&quot;\Flash\Terminal CE\Terminal CE.exe&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int beginFileName = s.LastIndexOf(@&quot;\&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int endFileName = s.LastIndexOf(&quot;.&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string fileName = s.Substring(beginFileName + 1, endFileName - beginFileName - 1);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string shortCutName = string.Format(&quot;{0}.lnk&quot;, fileName);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string pathToDesktop = @&quot;\Windows\Desktop\&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string fullPath = string.Format(&quot;{0}{1}&quot;, pathToDesktop, shortCutName);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//File.Create(fullPath);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int pathLength = s.Length;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;using (StreamWriter file = new StreamWriter(fullPath, true))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;file.WriteLine(string.Format(&quot;{0}#\&quot;{1}\&quot;&quot;, pathLength + 2/*+кавычки*/, s));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;catch(Exception ex)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MessageBox.Show(&quot;Error writing&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
Появился другой вопрос: не могу читать из текстового файла, в вин се иконки на нем нет, поэтому, подозреваю, надо тхт расширение через реестр регистрировать, в общем не понятно пока]]></description>
        <author>bogdanchek</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=410521&amp;view=findpost&amp;p=3711815</guid>
        <pubDate>Sat, 18 Mar 2017 10:15:19 +0000</pubDate>
        <title>Создание ярлыка</title>
        <link>https://forum.sources.ru/index.php?showtopic=410521&amp;view=findpost&amp;p=3711815</link>
        <description><![CDATA[bogdanchek: Здравствуйте.<br>Недавно понадобилось написать приложение под вин це 5.0 на C#, одна из функций которого создавать ярлыки на рабочем столе. Так вот у меня никак не получается это сделать. Нашел пару примеров создания ярлыков:<br>1. с ком объектом. но в приложения для вин це ком объекты добавить невозможно(в самой студии)<br>2. без ком объекта. но приложения под вин це не поддерживают один из интерфейсов, используемых в данном примере(System.Runtime.InteropServices.ComTypes.IPersistFile).<br>Как быть ?]]></description>
        <author>bogdanchek</author>
        <category>Windows CE/Mobile/Phone</category>
      </item>
	
      </channel>
      </rss>
	