473,382 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Key Processing Question

Hi all, I've been working on a little app some friends and I need to
help us enter a lot of XML data. There are a few places where html
code is entered in, and it's silly to keep typing <b>, </b> etc. My
plan was to set it up where you could just hit ctrl+b/ctrl+i (for
<i></i>) and it would toggle between the open and close tags, OR if
there is text selected, will return that text enclosed by the
appropriate tags.

It works. Sort of...

The problem is that the bold key works perfectly, exactly what I
wanted. Meanwhile, the italics key, which uses the EXACT SAME CODE as
the bold key, inserts a bunch of spaces/tabs or something, and erases
text in the box when it does it. I notice that in an empty textbox or
richtextbox, hitting Ctrl+I seems to do a long tab (about 8 spaces or
so).

Is this Ctrl+I something I'm not going to be able to override? I've
been googling for about an hour now and still haven't come up with a
solution for this. If anyone can help, I'd greatly appreciate it.

May 15 '06 #1
4 1245
Well, Ctrl-I is the standard keystroke for Tab. (As defined in the
original ASCII standard, circa 1960)

Where (into what?) are you entering the text, and how are you capturing
the Ctrl-I ?

May 15 '06 #2
On 15 May 2006 13:44:39 -0700, "ja**********@gmail.com"
<ja**********@gmail.com> wrote:
Well, Ctrl-I is the standard keystroke for Tab. (As defined in the
original ASCII standard, circa 1960)

Where (into what?) are you entering the text, and how are you capturing
the Ctrl-I ?


Into a textbox control on a windows form, and capturing it with
OnKeyUp. Is there some simple way I can cancel the default behavior of
this keystroke? I know it's possible because most word processors do
it...

May 15 '06 #3
hi. OnKeyUp takes a single parameter of type KeyEventArgs. have a look in the
documentation at KeyEventArgs.Handled and KeyEventArgs.SupressKeyPress.

for example if you do the following you can "swallow" and Ctrl+I key presses..

if (e.KeyCode == Keys.I && e.Control)
e.Handled = true;

May 16 '06 #4
On Tue, 16 May 2006 00:20:01 -0700, Kevin Hector
<ke*********@newsgroups.nospam> wrote:
hi. OnKeyUp takes a single parameter of type KeyEventArgs. have a look in the
documentation at KeyEventArgs.Handled and KeyEventArgs.SupressKeyPress.

for example if you do the following you can "swallow" and Ctrl+I key presses..

if (e.KeyCode == Keys.I && e.Control)
e.Handled = true;


I'd been looking at the Handled thing, but I still can't get it to
work. Using your example there, would I put that before or after the
code I want executed when you hit Ctrl+I?

Thanks for the replies everybody, by the way.

Gene
May 18 '06 #5

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

Similar topics

1
by: Eric Linders | last post by:
Hello, I have a Web form that is filled out on my company's web site. When the submit button is pressed, the form data is posted to a PHP page that (in the background) inserts their information...
1
by: Danny Anderson | last post by:
Hola, PHP folk! I have a php page that contains a self-processing form. The form holds search results. The search terms originally came from the previous page, but the user can repeatedly...
2
by: Ralf Wahner | last post by:
Dear Masters of XSLT Could I ask you for a clue on the following question? I'd like to use XSLT to transform an XML source file to LaTeX. In the following small example the <para> Element...
6
by: soren juhu | last post by:
Hi, I am developing a C Program for reading over a million files of size 1 kilobytes each and sending the contents to another program using some middle ware. I need some help on designing the...
2
by: Wilfried Mestdagh | last post by:
Hi, In traditional win32 programming, if for example I have to parse a large bunch of data where I only need some fragments out, I should create a class with a hidden window wich post a message...
8
by: Raed Sawalha | last post by:
I have form with progress bar ,when application begin processing and progress bar moving if I minimized the form and try to restore it ,it is not showing until the processing completed ,how can I...
2
by: Danny A. | last post by:
I am in the process of writing the middle tier for an application. This application will grab records, runn them through a process and save them in a table. In going through this process I'll have...
1
by: Rob | last post by:
Hi, I've developed a basic dialog program using the MFC foundation wizard. Upon pushing one of the buttons, a time consuming processing is invoked, during which the user cannot access the...
3
by: birensubudhi | last post by:
hey guys,can anyone tell me what is image processing, how to do it using C. IN KSHITIJ 2007 held at IIT kgp a que by INFOSYS is asked, they hav given an image then cut in different orientation...
5
by: whisk3rs | last post by:
Hello, I have a conceptual question. I need to write a program that will take as input a list of images and then process each image individually (extract useful features from the image) ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.