how can i Enable the F2 or f3 in my keyboard when i press the F1 in my keyboard??

btw this is my code

i want to enable the F2 when i press F1......I've got an error when i press the F2 first before the F1....sorry for my stupidity it is because i'm a newbie in vb6

If KeyCode = vbKeyF1 Then
search_click
If KeyCode = vbKeyF2 Then
delete_click
End If

just make the code looks like this :-

If KeyCode = vbKeyF1 Then
search_click
delete_click
If KeyCode = vbKeyF2 Then
delete_click
End If

You can provide a variable(maybe a boolean) to store if you've pressed F1 in your keyboard and then check it when your pressing F2..

You need to check if F1 has already been pressed which pressing F2 key. It is always recommended to avoid using F1 and F10 key.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.