Solved

Read Registry for Default Image Editor

Posted on 2000-04-29
9
166 Views
Last Modified: 2011-09-20
// Hello,

// I need some code for reading the registry for the defualt image editor

procedure ThankYou(TOject: Sender);

// :)
0
Comment
Question by:fibdev
  • 5
  • 4
9 Comments
 
LVL 1

Accepted Solution

by:
King_David earned 25 total points
Comment Utility
function CheckAssociatedFileType(FileType: AnsiString): String;
// Example: ShowMessage(CheckAssociatedFileType('.bmp'));
var
  Reg: TRegistry;
  Str: String;
begin
  Reg := TRegistry.Create;
  Result := '';
  with Reg do
    begin
    RootKey := HKEY_CLASSES_ROOT;
    if not OpenKey('\'+FileType, False) then Exit;
    Str := ReadString(''); // '' reads the default.
    if not OpenKey('\'+Str+'\Shell\Open\command', False) then Exit;
    Result := ReadString(''); // '' reads the default.
    end;
  Reg.Free;
end;
0
 
LVL 3

Author Comment

by:fibdev
Comment Utility
How do I take the variable off the end of the string?

example:

c:\WINNT\paint.exe %1
0
 
LVL 1

Expert Comment

by:King_David
Comment Utility
If it includes spaces than " is your delimiter
else
the space is your delimiter.
0
 
LVL 3

Author Comment

by:fibdev
Comment Utility
Please explain?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 3

Author Comment

by:fibdev
Comment Utility
Question wasn't answered completely, no activity for at least 2 weeks.

Sorry
0
 
LVL 3

Author Comment

by:fibdev
Comment Utility
This question has a deletion request Pending
0
 
LVL 1

Expert Comment

by:King_David
Comment Utility
This question no longer is pending deletion
0
 
LVL 1

Expert Comment

by:King_David
Comment Utility
You asked for some code for reading the registry for the defualt image editor - I gave you.
For 25 points I can not do more than you first asked!

Regards, David.

0
 
LVL 3

Author Comment

by:fibdev
Comment Utility
I'm not going to bicker over 25 points, but my problem wasn't solved, I ended up solving it myself.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
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…

772 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

15 Experts available now in Live!

Get 1:1 Help Now