N
Nathan Franklin
ok paul i have sent you a copy through...
when it ried to email it to the list outlook express errored and said binary
not allowed on a non-binary list...
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%[email protected]...
when it ried to email it to the list outlook express errored and said binary
not allowed on a non-binary list...
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%[email protected]...
You should be able to post binary attachments to the list with no problem,
if you're using a regular NNTP reader. If you're using the Web interface
at microsoft.com, you can't. If you look at the return address on my
message and remove "space" "no spam" "no" and "no spam", you'll get the
address.
Paul T.
Nathan Franklin said:Paul
could you please email me your email address off list as this list does
not allow binary content...
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:[email protected]...Still some items missing there, too, I think. InitializeComponent?
Just ZIP up the whole project and post it. It won't come through to
those using the Web interface, but I'll get it fine.
Paul T.
Paul
I have built a new project and reproduces the error here is a copy of
all my code
Please note that on form2 the toolbarbuttonclick sub never gets
fired...
thanks so much for taking the time to look at this!
nathan
module1.vb
Imports OpenNETCF.Windows.Forms
Imports Microsoft.WindowsCE.Forms
Module Module1
Public NavFilter As OpenNETCF.Windows.Forms.NavFilter
Sub Main()
NavFilter = New OpenNETCF.Windows.Forms.NavFilter
Application2.AddMessageFilter(NavFilter)
Application2.Run(New Form1)
If Not NavFilter Is Nothing Then
Application2.RemoveMessageFilter(NavFilter)
NavFilter = Nothing
End If
End Sub
End Module
form1.vb
Imports OpenNETCF.Windows.Forms
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim f As Form2
f = New Form2
Application2.ShowDialog(f, False)
f.Dispose()
f = Nothing
End Sub
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
End Class
Form2.vb
Public Class Form2
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e
As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles
ToolBar1.ButtonClick
MsgBox("here")
End Sub
End Class
NavFilter.vb
Imports OpenNETCF.Windows.Forms
Imports Microsoft.WindowsCE.Forms
Namespace OpenNETCF.Windows.Forms
Public Enum WinMsg As Integer
WM_CLOSE = &H10
WM_PAINT = &HF
WM_KEYDOWN = &H100
WM_KEYUP = &H101
End Enum
Public Delegate Sub KeyEvent(ByRef hwnd As Integer, ByRef e As
KeyEventArgs)
' this class handles all the nav keydown events
' there is a global variable ActivePanel which we look at when we
navigate around our form
' if any controls are not on the active panel we wont navigate to them
' if a control is out of view we set the scrolling position so the
control is in view...
Public Class NavFilter
Implements IMessageFilter
Private mHwnds As ArrayList
Public Event KeyDown As KeyEvent
Sub New()
mHwnds = New ArrayList
End Sub
Public Property Hwnds() As ArrayList
Get
Return mHwnds
End Get
Set(ByVal value As ArrayList)
mHwnds = value
End Set
End Property
Public Function PreFilterMessage(ByRef m As
Microsoft.WindowsCE.Forms.Message) As Boolean Implements
IMessageFilter.PreFilterMessage
If mHwnds.Contains(m.HWnd.ToInt32) Then
If m.Msg = WinMsg.WM_KEYDOWN Then
Dim keyArgs As New KeyEventArgs(m.WParam.ToInt32)
If keyArgs.KeyValue = Keys.Up Or keyArgs.KeyValue = Keys.Down Or
keyArgs.KeyValue = Keys.Left Or keyArgs.KeyValue = Keys.Right Then
' this is where we need to process our nav...
' we raise the event because we will hanbdle everything else in ModMain
' this just keeps things clean in here
RaiseEvent KeyDown(m.HWnd.ToInt32, keyArgs)
' only handle this if we can.. else this will be sent through the
normal processing system
If keyArgs.Handled Then
Return True
End If
End If
End If
End If
Return False
End Function
End Class
End Namespace
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message You'd want to actually try to build a new project from scratch, so
that you can send *all* of the code. Copy and paste is just going to
create more failure points.
Paul T.
Paul
Thanks for your reply
Code in modMain (gets called to start off the program)
HardKeyWatcherHandler.NavFilter = New
OpenNETCF.Windows.Forms.NavFilter
Application2.AddMessageFilter(HardKeyWatcherHandler.NavFilter)
Application2.Run(New frmMain)
frmMain.Dispose()
frmMain = Nothing
In frmMain this code is the code that handles loading up the new form
Dim dr As DialogResult
Dim frmSearch As frmReportSearch
frmSearch = New frmReportSearch
Cursor.Current = Cursors.Default
dr = Application2.ShowDialog(frmSearch)
Cursor.Current = Cursors.WaitCursor
ReportID = frmSearch.ReportID
frmSearch.Dispose()
frmSearch = Nothing
Another thing that I have found out is that if i run (as the main
startup form) frmReportSearch with Application2.Run the form works
with no problems, its only after I call it with ShowDialog that the
problems start...
Do you need any more code? Im not sure if you do, but just let me
know
thanks again
Nathan
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no
spam DOT com> wrote in message
I suspect that you're going to have to build the smallest possible
example that shows the problem and post the source...
Paul T.
another thing you may wish to know is when the second form loads up
I have a label at the top of the form which seems to only appear
when the SIP is visisble? maybe some sort of repaint?? im not sure
as soon as push the sip button to hide it the label disappears
again
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no
spam DOT com> wrote in message
The SDK does *not* control what is supported on the device. The
device OEM and, maybe, extra items added to the device later do
that. Anything that is only in the WM5 SDK and not in the 2003 SDK
should *not* be assumed to be present!
It's at least somewhat likely that counting on things to be
present which are not or counting on things to work one way when
they don't is responsible. Try the correct SDK and see what you
get.
Paul T.
the CE 5 sdk has alot of extra stuff not included in the ppc2003
sdk... everything has worked fine up until this....
is this the cause of my problem??
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no
spam DOT com> wrote in message
Huh? You're using a Windows CE 5 SDK but with a device running
Windows CE 4.2? Why wouldn't you use the PPC2003 SDK to develop
for that device?
Paul T.
I should mention I am using Windows CE 5 SDK with PPC2003
Dear List,
I am having a few problems with the ShowDialog method of the
Application2 (ApplicationEx) class of the OpenNetCF package.
When I call the ShowDialog Method, everything works good
except for the toolbar on the new form. Its kinda like the
toolbar is disabled. I can click on the SIP and bring it up
but when i try and click on the toolbar nothing happens. It
doesnt respond to any events or anything like that.
Here is a copy of my code
First of all in modMain to start the app
HardKeyWatcherHandler.NavFilter = New
OpenNETCF.Windows.Forms.NavFilter
Application2.AddMessageFilter(HardKeyWatcherHandler.NavFilter)
Application2.Run(New frmMain)
Then to open the new form
Dim frmSearch As frmReportSearch
frmSearch = New frmReportSearch
dr = Application2.ShowDialog(frmSearch, False)
Any help would be appreciated.. thanks
Nathan