Click here to Skip to main content
15,905,912 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Problem with passing UDT array from Excel VBA to C++ dll Pin
Dave Kreskowiak17-Feb-09 3:40
mveDave Kreskowiak17-Feb-09 3:40 
QuestionHow can i get the reference file (dll) information from the other application (exe) file Pin
kvelu.d16-Feb-09 18:52
kvelu.d16-Feb-09 18:52 
AnswerRe: How can i get the reference file (dll) information from the other application (exe) file Pin
Steven J Jowett17-Feb-09 1:26
Steven J Jowett17-Feb-09 1:26 
AnswerRe: How can i get the reference file (dll) information from the other application (exe) file Pin
Dave Kreskowiak17-Feb-09 1:36
mveDave Kreskowiak17-Feb-09 1:36 
QuestionCheck Box Save Pin
cwscotty16-Feb-09 12:00
cwscotty16-Feb-09 12:00 
AnswerRe: Check Box Save Pin
Paul Hasler16-Feb-09 14:03
Paul Hasler16-Feb-09 14:03 
GeneralRe: Check Box Save Pin
cwscotty16-Feb-09 19:49
cwscotty16-Feb-09 19:49 
QuestionBest Way To Override Keyboard On Form Pin
Ryan Fleming16-Feb-09 9:08
Ryan Fleming16-Feb-09 9:08 
I am working on a project where I detect HID USB devices, in particular a barcode scanner. I have successfully gotten code the monitors WNDPROC and returns me a value when a particular HID device registers a keypress. I have tried with no success to "handle" events in WNDPROC, but they still make it to the form. The following are a few snippets to show what I have tried

Protected Overloads Overrides Sub WndProc(ByRef message As Message)
If id IsNot Nothing Then
if id.ProcessMessage(message)
End If

If id.Ignore = True Then 'This Is Set To True Only When A Known HID Device Registers A Key Pressed
message.Result = New IntPtr(0)
End If
MyBase.WndProc(message)
End Sub

The following code does work for all controls when I set the KeyPreview on the Form To True

Public Class frmMain
Private Ignore as Boolean = false

Protected Overloads Overrides Sub WndProc(ByRef message As Message)
If id IsNot Nothing Then
if id.ProcessMessage(message)
End If

Ignore = id.ignore
MyBase.WndProc(message)
End Sub

Private Sub frmMain_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If Ignore = True Then e.Handled = True
End Sub
end Class


This Method might be the only way, but to me since it occurs in WndProc first, then I should be able to cancel the message at that point rather than wait further down the line. Any help would be greatly appreciated

Ryan
AnswerRe: Best Way To Override Keyboard On Form Pin
Dave Kreskowiak16-Feb-09 14:10
mveDave Kreskowiak16-Feb-09 14:10 
GeneralRe: Best Way To Override Keyboard On Form Pin
Ryan Fleming17-Feb-09 3:15
Ryan Fleming17-Feb-09 3:15 
GeneralRe: Best Way To Override Keyboard On Form Pin
Dave Kreskowiak17-Feb-09 3:39
mveDave Kreskowiak17-Feb-09 3:39 
GeneralRe: Best Way To Override Keyboard On Form Pin
Ryan Fleming17-Feb-09 5:07
Ryan Fleming17-Feb-09 5:07 
GeneralRe: Best Way To Override Keyboard On Form Pin
Dave Kreskowiak17-Feb-09 5:34
mveDave Kreskowiak17-Feb-09 5:34 
GeneralRe: Best Way To Override Keyboard On Form Pin
Ryan Fleming17-Feb-09 6:09
Ryan Fleming17-Feb-09 6:09 
GeneralRe: Best Way To Override Keyboard On Form Pin
Dave Kreskowiak17-Feb-09 6:54
mveDave Kreskowiak17-Feb-09 6:54 
Questionhow to get Pin
Farzad Ahmadzadeh16-Feb-09 9:04
Farzad Ahmadzadeh16-Feb-09 9:04 
AnswerRe: how to get Pin
todda200816-Feb-09 9:06
todda200816-Feb-09 9:06 
AnswerRe: how to get Pin
Christian Graus16-Feb-09 11:50
protectorChristian Graus16-Feb-09 11:50 
GeneralRe: how to get Pin
Jon_Boy17-Feb-09 4:18
Jon_Boy17-Feb-09 4:18 
AnswerRe: how to get Pin
Dave Kreskowiak16-Feb-09 14:06
mveDave Kreskowiak16-Feb-09 14:06 
AnswerRe: how to get Pin
EliottA16-Feb-09 15:25
EliottA16-Feb-09 15:25 
AnswerRe: how to get Pin
Eddy Vluggen16-Feb-09 21:35
professionalEddy Vluggen16-Feb-09 21:35 
AnswerRe: how to get Pin
Steven J Jowett17-Feb-09 1:19
Steven J Jowett17-Feb-09 1:19 
GeneralRe: how to get Pin
Eddy Vluggen17-Feb-09 3:04
professionalEddy Vluggen17-Feb-09 3:04 
AnswerRe: how to get Pin
Agus Budianto17-Feb-09 3:58
Agus Budianto17-Feb-09 3:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.