CFanatic

Go Back   CFanatic > Programming > C# Programming

Join CFanatic Forum Now

HideCaret() Windows API function doesn't work properly topic posted under C# Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2007, 09:14 AM
Junior Member
 
Join Date: Oct 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
cygnusX is on a distinguished road
| More
HideCaret() Windows API function doesn't work properly

I want to hide the caret in the RichTextBox control and do that with the win api function HideCaret(),but it doesn't work.The cursor is still visible and blinking.Where i should call the function.I tried in the Enter event of the control but doesn't work again.As far as i know i should call the HideCaret() when the RichTextBox gets the focus.Is that right?
Here is the code:

[DllImport("User32.dll")]
static extern Boolean HideCaret(System.IntPtr hWnd);

private void richTextBox1_Enter(object sender, EventArgs e)
{
HideCaret(richTextBox1.Handle);
}
Reply With Quote
  #2  
Old 05-30-2008, 02:58 PM
Banned
 
Join Date: May 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
KaiyureBoy is on a distinguished road
| More
Angry Yep, thanks, thats good idea.

I tried some possibilities ( etc.) but with no success.

Last edited by shabbir; 05-31-2008 at 05:35 AM. Reason: Link dropped
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C#/C++/TGE(A) programmers for indie gamedev, remote work, royalty pay BirdDog Looking to hire 8 05-08-2008 04:08 AM
Windows api linking amaldevc Win32 Programming 1 06-06-2007 06:18 PM
Windows Programming using C++ HK Win32 Programming 1 06-05-2007 09:38 PM
WaitFor function Angus C++ Programming 0 11-11-2006 10:11 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 02:59 AM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board