-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 4 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 4 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
taz50Offline
Location:
Post subject: Hubungan ComBoBox dengan File Ekstensi Ini  PostPosted: 27/Jan/2009 15:19
onNewBie


Joined: 27-Jan-2009
Posts: 3

Status: Offline
Saya bingung dengan coding berikut:

procedure TForm1.FormShow(Sender: TObject);
Var
myIniFile:TIniFile;
i:integer;
TempStr:string;
begin
try
myIniFile:=TIniFile.Create(Setup_config);
ComBoBox1.ItemIndex:= myIniFile.ReadInteger('com','comname',0);
ComBoBox2.ItemIndex:= myIniFile.ReadInteger('com','combaudrate',1);
finally
myIniFile.Free;
end;
end;

yang mau saya tanyakan tentang Combox1, di prosedur Combox1 tidak ada detail tentang TCP, com1, com2.. tp programnya bs muncul kayak gini..




yg mau saya tanyakan:
1. hubungan TIniFile dengan Tcombox sehingga bisa tampil seperti gambar di atas?
2. Itu simpen data TCP, USB, Com1, Com2, untuk yg ditampilin di Combox disimpan dmn?


Trimakasih
 
 View user's profile Send private message  
Reply with quote Back to top
DelphiExpert
Location:
Post subject: RE: Hubungan ComBoBox dengan File Ekstensi Ini  PostPosted: 27/Jan/2009 15:53
onMage


Joined: 06-Feb-2006
Posts: 2401

dibagian lain pasti ada code utk menampilkan list tsb (TCP/IP, USB, COM1 ...), coba check di event onCreate, atau di event dimana form tersebut dibuat Very Happy

1. Ini file menyimpan seting terakhir (ItemIndex dari combox tsb)
2. Mungkin tidak perlu disimpan, kebanyakan baca langsung dari konfigurasi system (misal: apakah system support TCP/IP, USB, baca berapa banyak COM-port yang terinstall dll)

_________________
Dude, if you don't understand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find a different field.
http://delphiexpert.wordpress.com
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
supermuamOffline
Location:
Post subject: RE: Hubungan ComBoBox dengan File Ekstensi Ini  PostPosted: 27/Jan/2009 15:56
onKnowledgeable


Joined: 20-Feb-2008
Posts: 131

Status: Offline
kayaknya itu script buat mbaca ini file kemudian dimasukan ke dalam combobox.
isi data nya mungkin ada di file setup_config.biasanya inifile disimpan dalam satu folder dengan exe.

_________________
....No Pain No Gain...
 
 View user's profile Send private message  
Reply with quote Back to top
ichan29Offline
Location:
Post subject: Re: Hubungan ComBoBox dengan File Ekstensi Ini  PostPosted: 27/Jan/2009 16:31
onProfessional


Joined: 23-Feb-2007
Posts: 603

Status: Offline
      taz50 wrote:
Saya bingung dengan coding berikut:
procedure TForm1.FormShow(Sender: TObject);
Var
myIniFile:TIniFile;
i:integer;
TempStr:string;
begin
try
myIniFile:=TIniFile.Create(Setup_config);
utk bagian diatas, terutama yg diwarnai, keliatannya anda salah tulis atau gimana, karena TIniFile.Create --> harusnya String
sy yakin klo dicompile itu akan error.
bisa seperti ini: myIniFile:=TIniFile.Create('Setup_config.ini');

Trus semua itu muncul karena configurasi isi dari nama2com itu ditulis difile setup_config itu bisa extention ini atau yg lainnya.
 
 View user's profile Send private message  
Reply with quote Back to top
ichan29Offline
Location:
Post subject: RE: Re: Hubungan ComBoBox dengan File Ekstensi Ini  PostPosted: 27/Jan/2009 16:33
onProfessional


Joined: 23-Feb-2007
Posts: 603

Status: Offline
bisa saja ditulis spt itu tp dg catatan, Setup_config: adalah variable String yg sudah didefinisikan sebelumnya.
 
 View user's profile Send private message  
Reply with quote Back to top
taz50Offline
Location:
Post subject:   PostPosted: 27/Jan/2009 16:47
onNewBie


Joined: 27-Jan-2009
Posts: 3

Status: Offline
maap2

utk Setup_config coding diatasnya ada const seperti ini

const
Setup_config = '..Demo_config.ini';


Tp yg untuk string '..Demo_config.ini' saya cari2 di codingnya gk ada lg..

'..Demo_config.ini' itu maksudnya apa ya?
 
 View user's profile Send private message  
Reply with quote Back to top
DelphiExpert
Location:
Post subject:   PostPosted: 27/Jan/2009 16:52
onMage


Joined: 06-Feb-2006
Posts: 2401

itu nama file ini nya mas Very Happy

_________________
Dude, if you don't understand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find a different field.
http://delphiexpert.wordpress.com
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
taz50Offline
Location:
Post subject:   PostPosted: 27/Jan/2009 16:59
onNewBie


Joined: 27-Jan-2009
Posts: 3

Status: Offline
nanya lg nih..

file ini-nya itu muncul ketika sedang dieksekusi kemudian hilang
atau
file ini-nya di tempat tertentu

soalnya saya cari2 file ini-nya gk ada
 
 View user's profile Send private message  
Reply with quote Back to top
heruxOffline
Location: Kediri
Post subject:   PostPosted: 27/Jan/2009 17:11
onProfessional


Joined: 13-Jul-2006
Posts: 668
Location: Kediri
Status: Offline
Nah tuh dah dapat !
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
ImanD
Location: BeDeGe
Post subject:   PostPosted: 28/Jan/2009 09:39
onElite


Joined: 09-Oct-2005
Posts: 1313
Location: BeDeGe
      taz50 wrote:
nanya lg nih..

file ini-nya itu muncul ketika sedang dieksekusi kemudian hilang
atau
file ini-nya di tempat tertentu

soalnya saya cari2 file ini-nya gk ada


file tidak di temukan berarti saat setelah file INI di-CREATE dan berakhir di FREE itu tidak ada penulisan data pada file tersebut. dan lokasi pada file yg di create itu berada pada WINDOWS directory (misal C:\WINDOWS) kenapa ? karena create file INI jika tidak di sertakan path-nya maka akan otomatis tercipta di WINDOWS directory

coba ini u/ memperlihatkan posisi file tersebut :
code : pascal
  1. const
  2. Setup_config = '..Demo_config.ini';
  3.  
  4. procedure TForm1.FormShow(Sender: TObject);
  5. Var
  6. myIniFile:TIniFile;
  7. i:integer;
  8. TempStr:string;
  9. begin
  10. try
  11. myIniFile:=TIniFile.Create(Setup_config);
  12. ComBoBox1.ItemIndex:= myIniFile.ReadInteger('com','comname',0);
  13. ComBoBox2.ItemIndex:= myIniFile.ReadInteger('com','combaudrate',1);
  14. myIniFile.WriteInteger('com','comname',2);
  15. if FileExists('C:\WINDOWS\' Setup_config) then
  16. ShowMessage('Found File: C:\WINDOWS\' Setup_config)
  17. else
  18. ShowMessage('File Not Found !');
  19. finally
  20. myIniFile.Free;
  21. end;
  22. end;
Parsed in 0.005 seconds, using GeSHi

_________________

website: http://darusmanaiman.net/
e-mail:
darusmanaiman@programmer.net
programmer@darusmanaiman.net
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |