473,508 Members | 2,233 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to create a flashing text cursor


I want to add a flashing text cursor to my selfmade user control.
Is there an existing class availible for this problem or do I have to write
a thread, which flashs the cursor?

THX for your help

Thilo
Nov 16 '05 #1
1 5969
You need to use the Win32 Caret API as imported by the following code...

[DllImport("User32.dll")]

protected static extern int CreateCaret(

System.IntPtr hWnd, // handle to owner window

System.IntPtr hBitmap, // handle to bitmap for caret shape

int nWidth, // caret width

int nHeight // caret height

);

[DllImport("User32.dll")]

protected static extern int ShowCaret(

System.IntPtr hWnd // handle to window with caret

);

[DllImport("User32.dll")]

protected static extern int HideCaret(

System.IntPtr hWnd // handle to window with caret

);

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Thilo Frank" <Th********@discussions.microsoft.com> wrote in message
news:54**********************************@microsof t.com...

I want to add a flashing text cursor to my selfmade user control.
Is there an existing class availible for this problem or do I have to
write
a thread, which flashs the cursor?

THX for your help

Thilo

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1718
by: rikesh | last post by:
Hi Does anyone know how to make a table row flash in a certain colour, depending on a DB value? I have a helpdesk application listing statuses of Agents and the calls queued on the system. ...
2
6036
by: Phillip Parr | last post by:
I've made a chat page using php and javascript. Which is nice. But I'd really like the title bar to flash when a new message appears for users who have minimised the window, like msn. Does any body...
9
2739
by: Phillip Parr | last post by:
Hello, I know there is no way in Javascript to make the task bar flash when your window is minimised. However, I found out recently that if a javascript alert is sent to netscape when the window...
2
5864
by: Xam | last post by:
Hello Everybody Can you let me know of a javascript/dom routine that will automatically put the flashing cursor in the first text box in my form so that it is ready for entry rather than the...
2
4648
by: DzemoT. | last post by:
how to make flashing label (or other text control) depending of label's text example: if label.text="Hello" then 'flash else 'dont flash end if tnx
0
1705
by: chatelain | last post by:
I'm using vb.net's datagrid in a windows application. So far I have not found any successful code to select a specific cell, select the text inside a specific cell or simply place the flashing cursor...
4
12413
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
0
1507
by: GeoffT | last post by:
I have encountered a problem with the data that is displayed in the list boxes that are located on a tab control access form (2003 version). This form uses several combo boxes as filters (After...
0
1911
by: ramuygl | last post by:
want to create store procedure that. want to send the table name as argument and retrive the data of that argument. and want to store data in temperary table using the insert query. HERE I AM...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7383
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.