Function DUNDialDefault(Hide : Boolean) : Boolean; <br>// Show or hide the dial-up dialog <br>var Reg : TRegistry; <br>var TempResult : Boolean; <br>var Name, con : String; <br>var ASW : Integer; <br>begin <br>Reg := TRegistry.Create; <br>Reg.RootKey := HKEY_CURRENT_USER; <br>if Reg.OpenKey('/RemoteAccess', False) then <br> begin <br> TempResult := True; <br> Name := Reg.ReadString('Default'); <br> end <br>else begin <br>tempresult := False; <br>end; <br>Reg.Free; <br>if TempResult = True then <br> begin <br> if Hide = True then ASW := SW_HIDE <br> else ASW := SW_SHOWDEFAULT; <br> con := 'rnaui.dll,RnaDial ' + Name; <br> ShellExecute(0, nil, 'rundll32.exe' , PChar <br> (con), 'C:/windows/', ASW); <br>end; <br>Result := tempResult; <br>end;