Home arrow Delphi-Kylix arrow Page 2 - Creating Chat Application with Borland Delphi/Indy: The Client
DELPHI-KYLIX

Creating Chat Application with Borland Delphi/Indy: The Client


In this third article in a series on building a chat application, you will learn how to build the user interface, how to create code to deal with messages sent from the server, how to send a request to the server, and more.

Author Info:
By: Jacques Noah
Rating: 5 stars5 stars5 stars5 stars5 stars / 26
January 09, 2006
TABLE OF CONTENTS:
  1. · Creating Chat Application with Borland Delphi/Indy: The Client
  2. · Building the User Interface
  3. · The Code – Dealing with messages sent from the Server
  4. · The TLog/TReading Classes
  5. · Sending a request to the Server

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Creating Chat Application with Borland Delphi/Indy: The Client - Building the User Interface
(Page 2 of 5 )

 

First, let’s build the UI. Again, this is just a guide; please build the interface in any way you like. Fire up Delphi, create a new application, and drop an idtcpclient component. Rename it ‘tc’, and put 3 edits, 4 buttons,4 statictext, a listbox and a memo on the form. To create a menu on the form, you can use a mainmenu component. I’ve used a actionmainmenubar and action manager, because it gives an overall XP look. Now, double click on actionmanager or the mainmenu component (whichever one you’ve choosen), create a menu item called Configure, and add sub menu items, Connection Settings and Exit.  Arrange them to your liking. This is what my UI looks like so far:

 

Add 3 more forms and call the associated units: sendfile, showpic and setup.

On the form that you will use to send a file add the following components:

  • edit rename to ‘edfn’
  • 2 statictext, 
  • 2 buttons -- rename one of the buttons to btSendfile, 
  • progressbar -- rename to 'prog'
  • an opendialogbox -- rename to 'op'
  • a combobox -- rename to 'cb.'                      

This is what my send file form looks like so far:

This is how you send a file

On the form that you will use to view screenshot add the following component:

Image – Available from the Additional Components Tab

On the setup form add the following components:

  • 2 edit renamed edport and edip respectively
  • 2 static text
  • 1 button renamed btSetup


blog comments powered by Disqus
DELPHI-KYLIX ARTICLES

- Loading an XML Document into the DOM
- Delphi Wrapper Classes and XML
- Delphi and the DOM
- Delphi and XML
- Internet Access: Client Service
- Finishing the Client for an Internet Access ...
- The Client for an Internet Access Control Ap...
- User Management for an Internet Access Contr...
- Important Procedures for an Internet Access ...
- Server Code for an Internet Access Control A...
- Constructing the Interface for an Internet A...
- Building a Server Application for an Interne...
- Building an Internet Access Control Applicat...
- Client Dataset: Working with Data Packets an...
- Using the Client Dataset in an N-Tiered Appl...

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 2 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials