16,012,223 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 .NET 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 Tejas Shastri (Top 60 by date)
Tejas Shastri
26-Oct-14 3:03am
View
Please leave an answer with the above link.. I will accept solution..
Tejas Shastri
26-Oct-14 3:02am
View
Thanks a lot for the link bill :) I fixed it.. :)
Tejas Shastri
26-Oct-14 2:57am
View
I'm using a thread because it takes too much time for the messagebox to show up.. response time is faster with a thread..
Tejas Shastri
25-Oct-14 16:51pm
View
var thread = new Thread(() => { //MessageBox.Show(pressedKey);
if(pressedKey.Equals("Space")||pressedKey.Equals("Tab"))
{
System.Windows.Forms.Clipboard.SetText(pressedKey);
IDataObject key = Clipboard.GetDataObject();
string mykey = key.GetData(DataFormats.Text).ToString();
MessageBox.Show(mykey);
}
});
new Thread.ApartmentState = ApartmentState.STA;
new Thread.Start();
Gives me error:
Error 1 A new expression requires (), [], or {} after type (this is for the line :newThread.ApartmentState = ApartmentState.STA;)
Error 2 'System.Threading.Thread.ApartmentState' is a 'property' but is used like a 'type'
Error 3 'System.Threading.Thread.Start(object)' is a 'method' but is used like a 'type'
Tejas Shastri
20-Oct-14 12:30pm
View
Can you please check my code and see if there's a way to pass the string pressedkey from the method HookCallback to ThisAddIn_Startup.. thats the only problem..
Tejas Shastri
20-Oct-14 11:17am
View
Thanks Bill(Hope I can call you that).. Will check it out..
Tejas Shastri
20-Oct-14 11:10am
View
the hook is working.. I've tested it.. I just need to get the string pressedkey from the method HookCallback to ThisAddIn_Startup.. thats the only problem..
Tejas Shastri
20-Oct-14 10:41am
View
this is why I did ot understand what you meant when you said 'create a static instance of ThisAddIn class...
What I am trying to do is as follows..
- I'm creating a Word Add-in.
- I need to read the keypress event so that when either the space bar or the Tab key is hit I can copy the last word of the document into a temp storage which will be later compared with a list of words in the db..
Tejas Shastri
20-Oct-14 10:25am
View
ignore the if conditon..
Tejas Shastri
20-Oct-14 10:25am
View
yes.. but its an MS word add-in.. I have not created any class..
Look at this..
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
if (1)
{
Word.Range rng = this.Application.ActiveDocument.Words.Last;
rng.Select();
rng.Copy();
String input = Clipboard.GetText(TextDataFormat.Text);
}
}
Tejas Shastri
20-Oct-14 7:21am
View
Deleted
How about creating an instance of Program, like
Program p = new program();
p.Application();
Tejas Shastri
20-Oct-14 7:11am
View
ok.. But Application is not available in static context. so I need to find an instance of CLASS that I can refer to?? How do I find that??
Tejas Shastri
20-Oct-14 6:10am
View
yeah.. one is used to modify static var's in a class and the other for non-static var's..
Tejas Shastri
20-Oct-14 5:48am
View
Deleted
and thanks for the help..
Tejas Shastri
20-Oct-14 5:47am
View
I'm still learning.. so too many jargons confuse me.. sorry
Tejas Shastri
20-Oct-14 5:39am
View
yeah I do..
Tejas Shastri
20-Oct-14 5:30am
View
no.. it didn't :/
Tejas Shastri
20-Oct-14 4:58am
View
And I have called the method directly..
private static HookProcedure procedure = HookCallback;
Tejas Shastri
20-Oct-14 4:56am
View
I'm sorry but I need to read the key event.. Is there another way to do it without using a hook? If there is one please let me know..
Tejas Shastri
20-Oct-14 4:41am
View
Error 1 An object reference is required for the non-static field, method, or property 'WordAddIn3.ThisAddIn.Application'
Tejas Shastri
20-Oct-14 4:41am
View
Deleted
Error 1 An object reference is required for the non-static field, method, or property 'WordAddIn3.ThisAddIn.Application'
Tejas Shastri
20-Oct-14 3:47am
View
gives another error.
Tejas Shastri
20-Oct-14 3:43am
View
Didn't fix it..
Tejas Shastri
20-Oct-14 0:16am
View
Is there a way to get info about the key state directly from the system?
Tejas Shastri
20-Oct-14 0:15am
View
can you check if this helps?
http://tech.pro/tutorial/760/winforms-accessing-mouse-and-keyboard-state
Tejas Shastri
19-Oct-14 13:42pm
View
I'm not even able to understand where the key code is mentioned.:/
Tejas Shastri
19-Oct-14 8:40am
View
I actually found a code.. can you help me modify the code to use for space bar?
Tejas Shastri
19-Oct-14 6:19am
View
There's no application event or document event which can detect keystrokes :( Please advice.. Can I create an event handler??
Tejas Shastri
19-Oct-14 5:50am
View
oh :( Then how will i read the keystroke? :(
Tejas Shastri
19-Oct-14 5:49am
View
no no.. As soon as i run the prog the MS word application launches and throws an error. FYI I'm using MS office 2013 and VS 2013 ultimate.
Tejas Shastri
19-Oct-14 5:49am
View
Deleted
no no.. As soon as i run the prog the MS word application launches and throws an error. FYI I'm using MS office 2013 and VS 2013 ultimate.
Tejas Shastri
19-Oct-14 3:55am
View
Deleted
@BillWoodruff please help
Tejas Shastri
19-Oct-14 3:34am
View
I dont understand How I can copy the last word of the document that is already open.. I'm not going to open the doc.. I want access to the document in the already active word file window.. Its an add-in
Tejas Shastri
19-Oct-14 1:06am
View
I need to know how to fetch the word into buffer for comparison as soon as the user types it in :( please help with that..
Tejas Shastri
19-Oct-14 1:06am
View
Deleted
I need to know how to fetch the word into buffer for comparison as soon as the user types it in :( please help with that..
Tejas Shastri
18-Oct-14 18:14pm
View
Thanks :) Helped :D
Tejas Shastri
18-Oct-14 17:55pm
View
haha :D thanks for the response.. But I know how to create new add-in project.. I need to know ow to access each word like the spell checker does.. btw i'm still googling.. :D
Tejas Shastri
17-Oct-14 13:40pm
View
yeah... there's this add-in express but it only has paid usage.. I wanted to know if its possible using the Visual studio express version..
Tejas Shastri
17-Oct-14 5:10am
View
I have seen this.. Is it enough if I mention
<pre>progressbar1.Maximum = arr.Length;</pre>
in the backgroundprocess1_DoWork()?
Tejas Shastri
17-Oct-14 4:42am
View
but is there a way to provide float value to progress.value??
Tejas Shastri
17-Oct-14 4:39am
View
oh.. foolish mistake.. my bad.. Thanks for the help
Tejas Shastri
17-Oct-14 4:15am
View
Runtime error: Value of '115' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.
Tejas Shastri
17-Oct-14 4:07am
View
This give values greater than 100 to Value(as in Progressbar1.value).
Tejas Shastri
17-Oct-14 2:35am
View
Ifixed it.. Thanks :)
Tejas Shastri
17-Oct-14 2:32am
View
tried it .. but now when I do this:
<pre>public ArrayList[] ReadMsWord(ArrayList searchtext_pass)
{....
return str;
}</pre>
it underlines ReadMsWord and says : not all code paths return a value..
Tejas Shastri
16-Oct-14 15:11pm
View
Thank you for the advice. :) but please suggest a good book on your mind. Thanks
Tejas Shastri
16-Oct-14 14:58pm
View
well the problem is I'm a student of the Internet and I'm trying to learn C# by building an app using C#.. So I'm learning each concept as and when it is necessary.. when I used ArrayList I didn't know there was generic list.. Please forgive my ignorance. :_ )
Tejas Shastri
16-Oct-14 14:54pm
View
I am not familiar with the generic List concept yet and I have already used the ArrayList throughout my program.. does the above prog apply to ArrayList too?
Tejas Shastri
16-Oct-14 14:48pm
View
Haha... I'm sorry.. I expected more similar replies though.. I haven't tried because I have no clue as to how.. I would appreciate a link which deals with this concept.. Thank you..
Tejas Shastri
16-Oct-14 14:44pm
View
I'm a newbie.. I'm using stuff I'm comfortable with.. Lot to learn..
Tejas Shastri
16-Oct-14 14:40pm
View
Please check the updated question. Really sorry for the delayed update..
Tejas Shastri
16-Oct-14 14:27pm
View
I have to pass one array list and another array list of array lists(ArrayList[] str= new arraylist[];) kind
Tejas Shastri
16-Oct-14 13:52pm
View
it worked.. Thank you.. I actually tried to pass it in a different way earlier but it hadn't worked.. Thanks :)
Tejas Shastri
16-Oct-14 13:49pm
View
Deleted
But now the message box (runworkercompleted) saying "Completed" isn't getting displayed for some reason..
Tejas Shastri
24-Sep-14 23:57pm
View
Error 1 Extension method must be defined in a top level static class; StringExtensions is a nested class
Tejas Shastri
24-Sep-14 12:24pm
View
I have not tried anything with the culture specific comparison because I didn't know how to handle the threading.
Does adding that statement to the code affect the comparison? isn't there a need to change that way the comparison is carried out?
Fulltext is the content of the rtb.
Tejas Shastri
21-Sep-14 9:04am
View
fixed it.. thanks :)
Tejas Shastri
21-Sep-14 8:21am
View
Now there's another error:
"Index was out of range. Must be non-negative and less than the size of the collection"
What index is the compiler talking about??
Tejas Shastri
15-Sep-14 12:34pm
View
this code is now not highlighting the actual searchtext when it appears in the fulltext.. its not an issue but i'm not able to figure out the reason for this. i want it to highlight the actual searchtext if it appears in the fulltext.
Tejas Shastri
14-Sep-14 3:21am
View
when the font is sent to 'Lohit kannada'(its a kannada font), the sample still shows in English.
Show More