Pocket PC applcation-Vb.net error

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 6
Reputation: harrybern is an unknown quantity at this point 
Solved Threads: 0
harrybern harrybern is offline Offline
Newbie Poster

Pocket PC applcation-Vb.net error

 
0
  #1
Nov 20th, 2008
Hi All

I am getting this error message when i run my pocket pc application using active sync on my PDA. i get this message when I am using threading in my application otherwise the code works but application crashes when i am trying to access the menus while the main loop is running. Any ideas would be much appreciated.

Many Thanks

ERROR

System.NotSupportedException was unhandled
Message="An error message cannot be displayed because an optional resource assembly containing it cannot be found"
StackTrace:
at Microsoft.AGL.Common.MISC.HandleAr()
at System.Windows.Forms.Control.get_Text()
at DeviceApplication1.Form1.rsvp()


My code is as following
Imports System.IO
Imports System
Imports System.Threading
Imports System.Windows.Forms


Public Class Form1
Public Sub rsvp()
Dim readcontents As String = TextBox1.Text

Dim textdelimiter As String

textdelimiter = (" ")
Dim splitout() As String = Split(readcontents, textdelimiter)
Dim i As Integer
For i = 0 To UBound(splitout)


Label1.Text = splitout(i)

Label1.Refresh()


System.Threading.Thread.Sleep(200)
Next
End Sub
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim dlg As OpenFileDialog = New OpenFileDialog()
dlg.Filter = "txt files (*.txt)|*.txt"
'dlg.ShowDialog()
'
If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then

Dim filestream As StreamReader = New StreamReader(dlg.FileName)


Dim readcontents As String
readcontents = filestream.ReadToEnd()
TextBox1.Text = readcontents



filestream.Close()


End If
End Sub




Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click
Dim value As Boolean = False
'Control.CheckForIllegalCrossThreadCalls = value

Dim t As Thread

t = New Thread(AddressOf rsvp)
t.Start()

End Sub
End Class
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC