Solved

Allowing only specific suffixes for an app

Posted on 1998-03-09
2
142 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 10 total points
Comment Utility
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
Comment Utility
cheers, just what i needed!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now