by
28. ottobre 2009 15.54
Imports System.Collections.Generic
Private Shared Function FindControlIterative(ByVal root As Control, _
ByVal id As String) As Control
Dim ctl As Control = root
Dim ctls As LinkedList(Of Control) = New LinkedList(Of Control)
Do While (ctl IsNot Nothing)
If ctl.ID = id Then
Return ctl
End If
For Each child As Control In ctl.Controls
If child.ID = id Then
Return child
End If
If child.HasControls() Then
ctls.AddLast(child)
End If
Next
ctl = ctls.First.Value
ctls.Remove(ctl)
Loop
Return Nothing
End Function
by
23. ottobre 2009 14.35
Nel convertire un progetto .NET 1.x alla versione 2.0 o superiore, ci si imbatte quasi sempre in questo criptico errore. "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level This error can be caused by a virtual directory not being configured as an application in IIS." Il problema è che la conversione crea una cartella Backup con all'interno un file web.config che va in conflitto con quello presente nella cartella principale.
Cancellando la cartella Backup il problema viene risolto.
by
13. ottobre 2009 11.53
Come trovare il path dell'applicazione corrente su Windows Mobile?
Public Function AppPATH() As String
Return Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules(0).FullyQualifiedName)
End Function
c0757c8e-d1a4-4efc-a298-11d9f031c625|0|.0
Tags:
by
13. ottobre 2009 11.34
Come riuscire a rilevare la versione del sistema operativo installato sul proprio palmare?
If System.Environment.OSVersion.Version.Major < 5 Then
MessageBox.Show("Versione 2003")
Else
MessageBox.Show("Versione 5.0")
End If