PC Review


Reply
Thread Tools Rate Thread

How do I keep main form richedit caret flashing when pressing button in 2nd form

 
 
Claire
Guest
Posts: n/a
 
      16th Jan 2007
I'm writing an application with custom skinned controls.
I have a text editor form with a rich edit control. Because there's no
toolbuttons in the skinned control set, I have to use normal ones for
Bold/Italic/Underline etc. Because they're normal buttons, they grab focus
from the rich edit. So to prevent losing the caret Ive used the Validating
event to cancel focus loss. This works great.
The application can be run in either terminal or desktop mode.
In terminal mode ie no physical keyboard, I have had to write a small
keyboard window to allow the user to enter text/symbols.
When I switch to the 2nd form, the rich edit is still the ActiveControl on
the main form but the caret vanishes from view.

Am I able to do anything similar here? The keypad window needs to behave in
the same way they do in compact framework.

thanks


 
Reply With Quote
 
 
 
 
pigeonrandle
Guest
Posts: n/a
 
      16th Jan 2007
Hi,

You could try passing a reference of your rich edit to your 2nd form
and then calling RichEdit.Focus() when one of your form2 buttons is
clicked? I suspect that if that works, you will find form 2 loses focus
so users will have to double click a button on form2 to get it to fire
a click event (once to give focus to form2 and another to click the
button).

You could also created an inherited RichEdit that displays the caret
whether it has focus or not. Im sure there's an API to draw a caret.

The problem you face is the fact that the caret indicates where data is
being entered, and clicking on something else means you are setting
input to another control.

Sorry i couldn't help more.

James Randle.


Claire wrote:
> I'm writing an application with custom skinned controls.
> I have a text editor form with a rich edit control. Because there's no
> toolbuttons in the skinned control set, I have to use normal ones for
> Bold/Italic/Underline etc. Because they're normal buttons, they grab focus
> from the rich edit. So to prevent losing the caret Ive used the Validating
> event to cancel focus loss. This works great.
> The application can be run in either terminal or desktop mode.
> In terminal mode ie no physical keyboard, I have had to write a small
> keyboard window to allow the user to enter text/symbols.
> When I switch to the 2nd form, the rich edit is still the ActiveControl on
> the main form but the caret vanishes from view.
>
> Am I able to do anything similar here? The keypad window needs to behave in
> the same way they do in compact framework.
>
> thanks


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: HELP: Pressing Buttons in SubForm from a Main Form Klatuu Microsoft Access 0 24th Apr 2008 03:10 PM
RE: HELP: Pressing Buttons in SubForm from a Main Form Klatuu Microsoft Access Forms 0 24th Apr 2008 03:10 PM
RE: HELP: Pressing Buttons in SubForm from a Main Form Klatuu Microsoft Access Form Coding 0 24th Apr 2008 03:10 PM
Refresh / requery form called from button on main form =?Utf-8?B?a2FzYWI=?= Microsoft Access Form Coding 9 2nd Jan 2006 09:32 PM
=> Open Subform on Main Form initiated by button on Main Form Rhonda Fischer Microsoft Access Form Coding 1 8th Dec 2003 05:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:20 AM.