|
-
Jul 10th, 2012, 12:16 AM
#1
Thread Starter
Member
[RESOLVED] Open file in read-only (ShellExecute API)
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|