How to Read dos environment variables?
Answer / Ajit Singh
To read DOS environment variables in Delphi, you can use the GetEnvironmentVariable function. Here's an example:nn```delphinfunction GetDosEnvVar(const VarName: string: string): string;nbeginn result := '';n var Len := Length(PChar(VarName)) + SizeOf(VarName);n if GetEnvironmentVariable(PChar(VarName), @Len, PChar(Result)) thenn SetLength(Result, Len)n end;nend;n``
| Is This Answer Correct ? | 0 Yes | 0 No |
How to Change the default width/height of the editor?
How to Get the printing margin of the page?
How to use the Lookup method to return values from multiple columns ?
How to Get the Windows version in code?
How to Create a Lookup field at runtime ?
What is the function of inheritance in delphi?
I'm using Delphi 4/5 and have am trying to fill a RichEdit control with both European characters and Thai characters - while I can change character colours the font stays with what was selected for the control:- reLangB.SelAttributes.Color :=dCol; reLangB.SelAttributes.Name :=FontName[dLang]; reLangB.SelAttributes.Charset :=FontChar[dLang]; reLangB.SelAttributes.Style :=[]; reLangB.Lines.Add(dText); The FontName and FontChar arrays contain the font info, and using a similar method for Captions and EditBoexes works! Anybody any ideas? Thanx in advance!
How to generate an error for SELECT statements that divide by zero?
What is the diff between IT Company & other companies?.
How to Change the owner of a component at runtime ?
what are Multiple Transports?
How to custom draw menu items?