Click here to Skip to main content
15,881,769 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a text file available in My.resources in vb.net
I want to transfer the content of this file to richtextbox.
But it shows error if i type following codes

What I have tried:

'myfile is a textfile
Dim ax As String
ax = File.ReadAllText(my.resources.myfile)
RichTextBox1.Text = ax
Posted
Updated 19-Apr-20 6:02am
Comments
Richard MacCutchan 19-Apr-20 11:41am    
"But it shows error"
What error?

1 solution

Try this:
VB
Dim ax As String
ax = my.resources.myfile
RichTextBox1.Text = ax
 
Share this answer
 
Comments
CodeMine 20-Apr-20 2:42am    
Thank u very much
I have tried this code
And this is working nice
thank u
CodeMine 20-Apr-20 2:42am    
Thank u very much
I have tried this code
And this is working nice
thank u

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900