DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How To Prohibit "Control+Shift+L"

  1. #1
    Join Date
    Nov 2006
    Posts
    9

    Exclamation How To Prohibit "Control+Shift+L"

    hi i've got a rich text box and every time i press "Control+Shift+L" in inserts a bullet point in it. i dont want it to do that. Is there anyway of disabling it?
    I tried looking for these characters in ascii but i could only find "Control+L" (ascii code decimal 12).

    i have also tried

    If (((keycode = vbKeyL) And (shift = vbShiftMask + vbCtrlMask))) Then...

    It still puts the bullet points in . Please Help

  2. #2
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    Private Sub RichTextBox1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 76 Then KeyCode = 0
    End Sub
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  3. #3
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    Amahdy, you code disables all the 'L'
    you must check for the value of Shift as well:

    If KeyCode = vbKeyL And Shift = (vbCtrlMask + vbShiftMask) Then
    KeyCode = 0
    End If

    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  4. #4
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    Ah yea I'm sorry, I have tested this by printing the keycode to the form and the result was 76 .
    But I havn't thinked about this value , yes it's greater than a normal keycode value .
    Thanks Marco
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

Similar Threads

  1. Shift Up & Down Help
    By abcat in forum ASP.NET
    Replies: 5
    Last Post: 05-29-2005, 11:43 AM
  2. Replies: 1
    Last Post: 05-03-2002, 04:43 AM
  3. Replies: 76
    Last Post: 04-13-2002, 04:56 PM
  4. Shift TreeView nodes inside TreeView window
    By Valentin Bakhov in forum VB Classic
    Replies: 0
    Last Post: 02-12-2001, 09:03 AM
  5. Shift TreeView nodes inside TreeView window
    By Valentin Bakhov in forum VB Classic
    Replies: 0
    Last Post: 02-12-2001, 09:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center