473,804 Members | 3,182 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 5984
You need to use the Win32 Caret API as imported by the following code...

[DllImport("User 32.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("User 32.dll")]

protected static extern int ShowCaret(

System.IntPtr hWnd // handle to window with caret

);

[DllImport("User 32.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********@dis cussions.micros oft.com> wrote in message
news:54******** *************** ***********@mic rosoft.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
1732
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. When a call is queued, I wish to make that Agent's Table row, flash.
2
6056
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 know how do do this? The only one's i've found animate the title text, which isn't what i'm going for. Thanks :)
9
2757
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 is minimised the task bar will flash! msie however doesn't do this, it will happily put the alert box up infront of all your other windows. My question is: Is there any way to tie this box down to this window so a minimised msie window will flash...
2
5894
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 user having to click into the first textbox with their mouse. Please note that my forms are created dynamically so I won't know the given name of the first textbox so some form of index would be better.
2
4672
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
1742
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 inside a specific cell. This is starting to appear impossible to do but I'm not convinced yet. The end goal is when a new row is added, the cursor is placed inside cell 0,0. Please help! Thanks in advance.
4
12454
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 this: can Access create the document and place it as an OLE object to the relevant table? Any help is greatly appreciated. Ricky
0
1537
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 Update and On Got Focus) to display info on the list box of the form. The info is correct. The problem that I am having pertains to the screen continues to flash as the cursor moves over certain other items on the form (i.e. Command Buttons / Text...
0
1923
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 ATTACHING A SAMPLE PROCEDURE IT WAS NOT WORKING PERFECTLY. HELP ME --exec SP_Generate_Insert_Statements tbl_Attachment,1 --select * from tbl_Attachmenttesting --exec SP_Generate_Insert_Statements tbl_Attachmenttesting,1 ALTER PROCEDURE .
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9140
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4295
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 we have to send another system
3
2990
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.