whenever I'm using shellexecute I'm using it like this:
Shellexecute(hWnd,'open','filename',nil,nil,SW_NORMAL);
{open specifies the action needed to be taken, open or print}
are you sure your computer knows the filetype *.txt AND the viewer for this
type can be opened ? probably a stupid question but you never know.
HTH
Roel
Quote
bgil...@acm.org wrote:
: All,
: I'm having a horrendous time finding out why the ShellExecute calls I'm making
: from D1 work perfectly under Win 3.x and Win 95, but fail miserably under Win
: NT. Below is a list of calls I've tried, all to no avail. To the right of
: each statement is a summary of the error I'm getting.
: ShellExecute(hWnd, nil, 'c:\test.txt',
: nil, nil, SW_NORMAL); //return from ShellExecute -- file not found (2)
: ShellExecute(hWnd, nil, pChar('c:\test.txt'),
: nil, nil, SW_NORMAL); //compiler complaint -- invalid typecast
: NOTE: I saw the code above on a post on some newsgroup--I didn't
: think it'd compile . . . and . . . it didn't.
: ShellExecute(hWnd, nil, @sFileName[1],
: nil, nil, SW_NORMAL); //return from ShellExecute -- file not found (2)
: Does anyone have any idea what's going on here?
: Regards,
: Brian
: ~!@#$%^&*()_+|}{POIUYTREWQ
: -----== Posted via Deja News, The Leader in Internet Discussion ==-----
: http://www.dejanews.com/ Now offering spam-free web-based newsreading