15,894,017 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Gary_Corbell (Top 8 by date)
Gary_Corbell
16-Mar-21 14:47pm
View
Reply
I did Maciej. I just posted that as an example. Sorry I should have posted exactly what I tried which was this: Dim HelperPath = Helper.My.Resources When I type it in, I get the error message posted above.
Thanks for taking time to help me out. I really do appreciate it.
Gary
Gary_Corbell
16-Mar-21 14:43pm
View
Deleted
I did Maciej. I just posted that as an example. Sorry I should have posted exactly what I tried which was this: Dim HelperPath = Helper.My.Resources When I type it in, I get the error message posted above.
Thanks for taking time to help me out. I really do appreciate it.
Gary
Gary_Corbell
16-Mar-21 10:08am
View
Thanks for taking time to respond, Maciej. Appreciate it.
However, when I changed your suggestion to Dim ProjBRes = ProjectBName.My.Resource, I get an error message:
"ProjectBName.My.Resource is a Namespace and cannot be used as an expression."
Maybe I need to explain myself better. I don't have any problem with using the resources of each project. But my ProjectB resources contain Files that I am trying to write to during debug. After getting the path to the file I am trying to write to, I alter the file using Streamwriter. But to do so I need to know the exact path to the resources for ProjectB. Getting that exact path at both debug and runtime is my problem. Hope this helps.
Anyway thanks again for your response.
Gary_Corbell
15-Mar-21 13:06pm
View
Thanks for reply, Richard...OriginalGriff, below, gave me the answer I needed.
Gary_Corbell
15-Mar-21 13:03pm
View
Thanks OG......great advice and accepted. Appreciate your time.
Gary_Corbell
8-Mar-21 18:37pm
View
I tried your suggestion but no go. However, I then found my problem. The rich text box had a bitmap of a red line (used for separation of topics)at the very bottom of the richtextbox and on the next line after the text ended. When I removed that or when I put two new blank lines between the last text and the line, the text did not disappear. At least now I know. Thanks for your input.
Gary_Corbell
8-Mar-21 17:49pm
View
Ok I will give that a try and let you know......thanks for replying.
Gary_Corbell
8-Mar-21 14:42pm
View
Thanks for you reply, Gerry......yes that is what I tried. I inserted Refresh is several places in the code and still no luck. Here is the code:
If RTB1.Text.Length > 0 Then
Dim SpellCheckWords As String() = Nothing
///Invoke Microsoft Word Spell Checker routine
Dim objWord As Object = CreateObject("Word.Application")
Dim objDoc As Object = objWord.documents.add
'Hide the Word Application
objWord.Visible = False
///Show Spell Checker Window and load Spell Checker RichTextBox with RTF data from Helper
Check.Visible = True
Check.RTB1Check.Rtf = RTB1.Rtf
///Split the Rich Text into single words
sSpellCheckWords = Check.RTB1Check.Text.Split(CChar(" "))
///Check spelling of each word
Dim oldstart As Integer = -1
Dim OldLength As Integer = -1
For Each sWord As String In sSpellCheckWords
If objWord.CheckSpelling(sWord) = False Then
dEventFlag = True
///Find location and length of first misspelled word
Check.RTB1Check.SelectionStart = Check.RTB1Check.Find(sWord)
Check.RTB1Check.SelectionLength = sWord.Length
//Scroll to the next misspelled word.
Check.RTB1Check.ScrollToCaret()
///Set color of misspelled word to red
Check.RTB1Check.SelectionColor = Color.Red
///Keep track of selection start and selection length
oldstart = Check.RTB1Check.SelectionStart
OldLength = sWord.Length
/Get and add possible suggestions to the listbox for user viewing and use.
Dim oWordSuggestions As Microsoft.Office.Interop.Word.SpellingSuggestions
oWordSuggestions = objWord.GetSpellingSuggestions(sWord)
Dim n As Integer = 1
Do While n <= oWordSuggestions.Count
Check.ListBox1.Items.Add(oWordSuggestions.Item(n).Name)
n = n + 1
Loop
///Wait for user to select the correct spelling. The listbox1 indexchanged event sets the dEventFlag to false to continue
Do While dEventFlag = True
/// process messages from UI
Application.DoEvents()
Loop
///Replace the misspelled word with user selected word
Check.RTB1Check.SelectionStart = oldstart
Check.RTB1Check.SelectionLength = OldLength
Check.RTB1Check.SelectionColor = Color.Black
If Check.ListBox1.SelectedItem IsNot Nothing Then
Dim GetNewSpelling = Check.ListBox1.SelectedItem.ToString
Check.RTB1Check.SelectedText = ""
Check.RTB1Check.SelectedText = GetNewSpelling
End If
///clear the listbox and prepare to find and display next misspelling.
Check.ListBox1.Items.Clear()
End If
///After misspelled word is correct, reset the text color to black
Check.RTB1Check.SelectionColor = Color.Black
Next sWord
objDoc.close()
objWord.quit()
MessageBox.Show("Spell Check Complete")
///Transfer correct RTF to Main RichTextBox
RTB1.Rtf = Check.RTB1Check.Rtf
Check.Close()
End If
Me.Cursor = Cursors.Default
RTB1.Focus()
Me.Cursor = Cursors.Default
Me.BringToFront()
Show More