Results 1 to 11 of 11

Thread: delete button dont work

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    12

    delete button dont work

    my delete button on my keyboard stopped working in all applications.is there a way in vb to see if its even getting through when i press it?

  2. #2
    Hyperactive Member
    Join Date
    Mar 2003
    Location
    Greece, Salonica
    Posts
    473
    Yep.
    Put this code into a form:
    VB Code:
    1. Private Sub Form_KeyDown(KeyAscii As Integer)
    2. MsgBox KeyAscii
    3. End Sub
    Try clicking delete...
    You should get a msgbox with a number.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    12
    When i try to run that code i get
    Compile Error:
    Procedure declaration does not match description of event or precedure having the same name
    ???????????

  4. #4
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    If it is VB6 then try this:


    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    4.  
    5.     MsgBox KeyCode
    6.    
    7. End Sub
    8.  
    9. Private Sub Form_Load()
    10.  
    11.     KeyPreview = True
    12.    
    13. End Sub


    Not sure but think that Delete key is 46...

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    VB Code:
    1. Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
    2.        
    3. MessageBox.Show(e.KeyCode)
    4.  
    5.     End Sub

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    12
    Thanks NoteMe, your code worked, the others didnt.and was the others wrote for .net? and whats the differance?

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by toogogtobetrue
    .and was the others wrote for .net? and whats the differance?
    .NET is a new programming technology, but this topic is outside the scope of this thread.



    Uh-oh... I'm talking like an author now.

  8. #8

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    12
    sheesh, im just now starting to learn vb6, thats the only compiler i got.if i learn vb6, will i have to start all over to learn .net?seems that way, might as well stop now and go buy a .net compiler and start all over huh.

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by toogogtobetrue
    sheesh, im just now starting to learn vb6, thats the only compiler i got.if i learn vb6, will i have to start all over to learn .net?seems that way, might as well stop now and go buy a .net compiler and start all over huh.
    If you start off on VB.NET without knowing VB6 first, you'll have a better learning curve than if you knew VB6 previously.

  10. #10
    Banned DiGiTalErRoR's Avatar
    Join Date
    Sep 2002
    Posts
    68
    Originally posted by toogogtobetrue
    sheesh, im just now starting to learn vb6, thats the only compiler i got.if i learn vb6, will i have to start all over to learn .net?seems that way, might as well stop now and go buy a .net compiler and start all over huh.
    If you're gonna bother, learn C++.

    VB6 is still plenty powerful. .NET has yet to prove itself as viable(25 MB run-time files makes VB6's runtimes relatively nothing). Some call it a failure already.

  11. #11
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Originally posted by DiGiTalErRoR
    If you're gonna bother, learn C++.

    VB6 is still plenty powerful. .NET has yet to prove itself as viable(25 MB run-time files makes VB6's runtimes relatively nothing). Some call it a failure already.
    LOL, we are doing C++ in Software Design & Development and we did a class vote on whether to continue with C++ (Only making console apps currently, would go onto Forms and stuff) or goto VB, it was a unanimous decision to goto VB.

    VB.NET is quite nice, stick to it, it makes life very easy i found in many situations, accessing the registry is dead simple with .NET, with 6, you needed the API stuff and nice things such as the Cryptography classes are nice and handy, pitty it's confusing to actually use.

    With future service packs, the .NET framework will be bundled with Windows so that's not an issue, it is very viable and Microsoft is putting all it's attention into .NET because apparently, Longhorn is built using .NET, at least the early builds were.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width