guys how can i open a specific file in read-only state using ShellExecute? this is my code so far, but the SetAttr doesn't work. it opens the file but the user can edit it (coz it's not open in read-only)..

<code for Setting attributes>

Case "Open"
txtFile.Text = "\\192.168.0.215" + "\Public\iKnow attachments\" + frmDM.Label9.Caption
SetAttr txtfile.text,vbReadOnly
txtParameters.Text = ""
txtDirectory.Text = ""
cboShowStyle.ListIndex = STYLE_NORMAL
</code>


<code for opening file using ShellExecute>

result = ShellExecute(Me.hWnd, cboOperation.Text, txtFile.Text, txtParameters.Text, txtDirectory.Text, show_style)

</code>


need some help here...