Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compact framework
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00765804
Message ID:
00765933
Vues:
15
Hi Randy,

I think the problem is in the first form displaying via ShowDialog. Try Show instead. You are making the first form modal which prevents you from accessing other forms.

>The first time a form loads on a PDA it takes a little bit of time. So after I load a form I usually just hide it until I need to use it again. I was hoping to load all my forms at the beginning of the program. The problem is when I try to access the second form, it shows but I cannot do anything. When the stylist touches the screen, the PDA beeps and that is it. Any suggestions or any comments on the best way to load forms? One tip, I normally create as few forms as possible, putting panels on the form for each screen and just move them to the 0,0 position when I need to access them. This way you could reduce 6 forms down to one for faster load times. Back to my problem. On my first form I use ShowDialog(), all the rest I just use Show(). In the load event of the first form is where I create the other forms. Below is the sample code. Thanks for the help.
>
>Private Sub frmLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
> Dim dblError As Double
> glngCourierID = 0
>
> Me.LoadCouriers()
> Me.LoadRouteNames()
> Me.pnlRouteNumbers.Left = 0
> Me.pnlRouteNumbers.Top = 0
> Me.pnlRouteNumbers.Visible = True
> objLogin = Me
>
> ' Load Forms
> objLog = New frmLog
> objLog.Show()
> objLog.Hide()
> objSpecimenAttribute = New frmSpecimenAttribute
> objSpecimenAttribute.Show()
> objSpecimenAttribute.Hide()
> objSpecimenTypes = New frmSpecimenTypes
> objSpecimenTypes.Show()
> objSpecimenTypes.Hide()
> objSpecimen = New frmSpecimen
> objSpecimen.Show()
> objSpecimen.bolLoadRoutes = True
> objSpecimen.Hide()
> ' End loading forms
>
> objLogin.BringToFront()
> objLogin.Refresh()
> End Sub
>
>Here is my calling code.
>
> Private Sub cmdContinue_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdContinue.Click
>
> ToggleSIPVisible(0)
>
> If IsNothing(objSpecimen) Then
> objSpecimen = New frmSpecimen
> End If
>
> objSpecimen.Show()
> ' If I move the hide before the show, then nothing appears on the PDA
> Me.Hide()
>
> End Sub
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform