Re: Weird Error Occuring!
OK I can shed some more light on this one. Basically in the got focus of my bottom textbox I call this sub routine:-
Code:
Public Sub MoveControls(ByVal InputPanel As Microsoft.WindowsCE.Forms.InputPanel, ByRef Panel As System.Windows.Forms.Panel, ByVal iHeight As Integer)
Dim iControlCount As Integer
For iControlCount = 0 To Panel.Controls.Count - 1
If InputPanel.Enabled Then
Panel.Controls(iControlCount).Top = Panel.Controls(iControlCount).Top - iHeight
Else
Panel.Controls(iControlCount).Top = Panel.Controls(iControlCount).Top + iHeight
End If
Next
End Sub
Which basically passes the current panel in and move the controls up and on the lost focus it calls it again and moves them down again. If I then exit the form and go back in; as soon as I click on one of the text boxes I get that error?????
Help!!!!
Please!!!
Jiggy!
Re: Weird Error Occuring!
OK I now know what is happening. On the last control of my tab in the got focus I call the routine above which moves the controls up (GREAT). I then close the keyboard which calls the same routine but this time all the controls move down (GREAT). I then click on a finish button which prompt me to save; after selecting either yes or no it then sets focus back to my last control so it call the routine again. Basically I think it is getting into a look causing memory problems. Is there a simple way to not allow focus back to that control once I have tabbed away from it.
Thank you for any help,
Jiggy!
Re: Weird Error Occuring!
How about in the finish button, just before the selection of yes vs no, set the focus explicitly to something safe. Then after the selection is made, focus should return to that safe control.
Re: Weird Error Occuring!
Hi Mate,
Thanks for the reply, I have stopped it happening by disposing the inputpanel as when they click on the finish it closes the form anyway. But the weird thing is that when the form has unloaded the keyboard still pops up on my menu form.
Jiggy!
Re: Weird Error Occuring!
EDIT: Oops, wrong thread.