<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=66&amp;t=20546&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2018-04-03T20:22:34+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=66&amp;t=20546&amp;mode</id>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2018-04-03T20:22:34+01:00</updated>
<published>2018-04-03T20:22:34+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206438#p206438</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206438#p206438"/>
<title type="html"><![CDATA[Re: Pomoc przy zapisie ListBox do pliku ini]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206438#p206438"><![CDATA[
<div class="quotetitle">Jaglarz napisał(a):</div><div class="quotecontent"><br />Właśnie zrobiłem  <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" />   <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><br /></div><br /><img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /> aaaa rozumiem, że to ty pod innym nickiem założyłeś ten wątek <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /> <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /> to ok <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /><br /><br />-- 1 minucie --<br /><br />wracając do meritum i pytania autora <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /><br /><br />[syntax=delphi]ListBox.Items.SaveToFile( 'ścieżka_i_nazwa_pliku' );[/syntax]<br /><br />więc już chyba nie muszę mówić o odwrotnej funkcji<br /><br />[syntax=delphi]ListBox.Items.LoadFromFile....[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 3 kwi 2018, o 20:22</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jaglarz]]></name></author>
<updated>2018-04-03T17:58:07+01:00</updated>
<published>2018-04-03T17:58:07+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206435#p206435</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206435#p206435"/>
<title type="html"><![CDATA[Re: Pomoc przy zapisie ListBox do pliku ini]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206435#p206435"><![CDATA[
Właśnie zrobiłem  <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" />   <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=471">Jaglarz</a> — 3 kwi 2018, o 17:58</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2018-04-03T17:57:21+01:00</updated>
<published>2018-04-03T17:57:21+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206434#p206434</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206434#p206434"/>
<title type="html"><![CDATA[Re: Pomoc przy zapisie ListBox do pliku ini]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206434#p206434"><![CDATA[
<span style="color: #FF0000">panie kolego - najpierw to edytuj swój post i sformatuj odpowiednio kod - tym bardziej że masz poradnik na forum jak to zrobić: <!-- l --><a class="postlink-local" href="http://forum.atnel.pl/topic7402.html" >topic7402.html</a><!-- l --> - tylko dlatego, że kolega jest nowy na forum - to nie udzielam warna ok?</span><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 3 kwi 2018, o 17:57</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[zimol81]]></name></author>
<updated>2018-04-03T15:54:24+01:00</updated>
<published>2018-04-03T15:54:24+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206431#p206431</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206431#p206431"/>
<title type="html"><![CDATA[Pomoc przy zapisie ListBox do pliku ini]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=20546&amp;p=206431#p206431"><![CDATA[
Proszę o pomoc przy zapisie ListBox do pliku ini<br />Oto kod programu <br /><br />[syntax=delphi]unit Unit4;<br /><br />interface<br /><br />uses<br />  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,<br />  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Buttons, sBitBtn,<br />  sListBox, sSkinProvider, sSkinManager,ShellAPI,IniFiles;<br /><br />type<br />  TForm4 = class(TForm)<br />    sknmngr1: TsSkinManager;<br />    sknprvdr1: TsSkinProvider;<br />    ListBox: TsListBox;<br />    OpenDialog1: TOpenDialog;<br />    sbtbtn1: TsBitBtn;<br />    sbtbtn2: TsBitBtn;<br />    sBitBtn1: TsBitBtn;<br />    procedure sbtbtn1Click(Sender: TObject);<br />    procedure sbtbtn2Click(Sender: TObject);<br />    procedure sBitBtn1Click(Sender: TObject);<br />    procedure FormCreate(Sender: TObject);<br />    procedure FormDestroy(Sender: TObject);<br />    procedure ListBoxDblClick(Sender: TObject);<br />  private<br /> <br />    { Private declarations }<br />  public<br /><br />    { Public declarations }<br />  end;<br /><br />var<br />  Form4: TForm4;<br />  Ini:TIniFile;<br />implementation<br /><br />{$R *.dfm}<br /><br />procedure TForm4.FormCreate(Sender: TObject);<br />//Odczyt ini<br />var<br /> i, max: Integer;<br /> sTmp: String;<br />begin<br />ini := tinifile.Create(ExtractFilePath(Application.ExeName) + 'Ulubione programy.ini');<br />try<br />  max := ini.ReadInteger('Ulubione programy','dir',-1);<br />  ListBox.Items.Clear;<br />  for i := 0 to max do<br />  begin<br />    sTmp := ini.ReadString('Ulubione programy','dir' + IntToStr(i), '');<br />    if sTmp &lt;&gt; '' then ListBox.Items.Add(sTmp);<br />  end;<br />finally<br />  FreeAndNil(ini);<br />end;<br /><br />end;<br /><br />procedure TForm4.FormDestroy(Sender: TObject);<br />//zapis ini<br />var<br />i: Integer;<br />begin<br />ini := tinifile.Create(ExtractFilePath(Application.ExeName) + 'Ulubione programy.ini');<br />try<br /> ini.WriteInteger('Ulubione programy','dir',ListBox.Items.Count-1);<br /> for i:=0 to ListBox.Items.Count-1 do<br />   ini.WriteString('Ulubione programy', 'dir'+ IntToStr(i),ListBox.Items&#91;i&#93;);<br />finally<br /> FreeAndNil(ini);<br /><br />end;<br />end;<br /><br />procedure TForm4.ListBoxDblClick(Sender: TObject);<br />begin<br />with ListBox do if ItemIndex &gt;-1 then ShellExecute(Self.WindowHandle,'open',PChar(Items&#91;ItemIndex&#93;),nil,nil,SW_SHOWNORMAL);<br />end;<br /><br />procedure TForm4.sBitBtn1Click(Sender: TObject);<br />begin<br />if Opendialog1.execute then<br />ListBox.Items.Add(ExtractFileName(OpenDialog1.FileName));<br />end;<br /><br />procedure TForm4.sbtbtn1Click(Sender: TObject);<br />begin<br />with ListBox do if ItemIndex &gt;-1 then ShellExecute(Self.WindowHandle,'open',PChar(Items&#91;ItemIndex&#93;),nil,nil,SW_SHOWNORMAL);<br /><br />end;<br /><br />procedure TForm4.sbtbtn2Click(Sender: TObject);<br />begin<br />ListBox.Items.Delete(ListBox.ItemIndex);<br /><br />end;<br />end.[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=19288">zimol81</a> — 3 kwi 2018, o 15:54</p><hr />
]]></content>
</entry>
</feed>