Click here to Skip to main content
15,881,803 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to launch application from Microsoft.WindowsCE.Forms.MessageWindow Pin
Richard MacCutchan11-Apr-13 21:35
mveRichard MacCutchan11-Apr-13 21:35 
GeneralRe: How to launch application from Microsoft.WindowsCE.Forms.MessageWindow Pin
dusty_dex11-Apr-13 22:40
dusty_dex11-Apr-13 22:40 
QuestiononMouseDownClickcount () event handler usage Pin
econy10-Apr-13 15:18
econy10-Apr-13 15:18 
AnswerRe: onMouseDownClickcount () event handler usage Pin
Bernhard Hiller10-Apr-13 22:18
Bernhard Hiller10-Apr-13 22:18 
GeneralRe: onMouseDownClickcount () event handler usage Pin
econy11-Apr-13 7:27
econy11-Apr-13 7:27 
QuestionWndProc does not work in Windows CE 5.0 Pin
Member 989133410-Apr-13 3:05
Member 989133410-Apr-13 3:05 
AnswerRe: WndProc does not work in Windows CE 5.0 Pin
dusty_dex10-Apr-13 4:26
dusty_dex10-Apr-13 4:26 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
Member 989133410-Apr-13 22:52
Member 989133410-Apr-13 22:52 
I tried to read an article, but I didn't find anything helpful. Problem is, that I am using VB for Windows CE and there is not supported WndProc. What can I do?

This is a fragment of code. What I am doing wrong? WndProc cannot be recognized od VB for Window CE.

<dllimport("coredll.dll", setlasterror:="True," charset:="CharSet.Auto)"> Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Function

<dllimport("coredll.dll", setlasterror:="True," charset:="CharSet.Auto)"> Private Shared Function SendMessage( _
ByVal hwnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32
End Function
<dllimport("coredll.dll", setlasterror:="True)"> _
Private Shared Function SetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer, ByVal dwNewLong As WndProc) As Integer
End Function

Public Shared Sub Main2()
Dim ip As IntPtr
ip = FindWindow(vbNullString, "Kvant 1.0")
If (ip <> 0) Then
MsgBox("Kuk!")
SendMessage(ip, &H10, 0, 0)
End If
End Sub

Dim GWL_WNDPROC As Long = -4
Dim lpPrevWndProc As Integer

Public Function SubClass(ByVal lHwnd As Long) As Boolean
Beep()
lpPrevWndProc = SetWindowLong(lHwnd, GWL_WNDPROC, AddressOf WndProc)
End Function

Protected Overrides Sub WndProc(ByRef recWinMessage As Microsoft.WindowsCE.Forms.Message)
MyBase.WndProc(recWinMessage)
End Sub

Shared Sub Main()
Application.Run(New AOutForm())
End Sub
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
dusty_dex11-Apr-13 0:42
dusty_dex11-Apr-13 0:42 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
Member 989133411-Apr-13 2:31
Member 989133411-Apr-13 2:31 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
dusty_dex11-Apr-13 3:05
dusty_dex11-Apr-13 3:05 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
Member 989133411-Apr-13 3:31
Member 989133411-Apr-13 3:31 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
dusty_dex11-Apr-13 3:42
dusty_dex11-Apr-13 3:42 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
Member 989133411-Apr-13 3:49
Member 989133411-Apr-13 3:49 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
dusty_dex11-Apr-13 4:09
dusty_dex11-Apr-13 4:09 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
Member 989133411-Apr-13 4:15
Member 989133411-Apr-13 4:15 
GeneralRe: WndProc does not work in Windows CE 5.0 Pin
dusty_dex11-Apr-13 4:55
dusty_dex11-Apr-13 4:55 
QuestionSaveFileDialog.ShowDialog() return value Pin
econy9-Apr-13 9:06
econy9-Apr-13 9:06 
AnswerRe: SaveFileDialog.ShowDialog() return value Pin
Eddy Vluggen9-Apr-13 9:36
professionalEddy Vluggen9-Apr-13 9:36 
GeneralRe: SaveFileDialog.ShowDialog() return value Pin
econy9-Apr-13 9:39
econy9-Apr-13 9:39 
GeneralRe: SaveFileDialog.ShowDialog() return value Pin
Eddy Vluggen9-Apr-13 9:59
professionalEddy Vluggen9-Apr-13 9:59 
GeneralRe: SaveFileDialog.ShowDialog() return value Pin
Johnny J.17-Apr-13 1:40
professionalJohnny J.17-Apr-13 1:40 
GeneralRe: SaveFileDialog.ShowDialog() return value Pin
Eddy Vluggen17-Apr-13 1:53
professionalEddy Vluggen17-Apr-13 1:53 
GeneralRe: SaveFileDialog.ShowDialog() return value Pin
Johnny J.17-Apr-13 1:54
professionalJohnny J.17-Apr-13 1:54 
AnswerRe: SaveFileDialog.ShowDialog() return value Pin
Richard MacCutchan9-Apr-13 9:46
mveRichard MacCutchan9-Apr-13 9:46 

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.