Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Allowing only specific suffixes for an app

Posted on 1998-03-09
2
Medium Priority
?
152 Views
Last Modified: 2012-05-05
Hi
      I am writing a graphical editor for LaTeX documents. Therefore I want my app to only be able to open files with a '.tex' suffix. Is there an easy way to do this?
      Thanks, Nik.
0
Comment
Question by:NikWhit
2 Comments
 

Accepted Solution

by:
wtamviset earned 40 total points
ID: 1360295
In Open file Method
Procedure OpenFile(FileName :String);
Var Ext :String;
Begin
     Ext := UpperCase(ExtractFileExt(FileName));
    If  Ext =  '.TEX'  then
   Begin
        // Process Open File Here
   End
   Else
     ShowMessage('Error: Can't open TEX file only');
End;
0
 
LVL 1

Author Comment

by:NikWhit
ID: 1360296
cheers, just what i needed!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question