.NET Framework - Vista x64 SP1
Asked By Nicolas Hinze
26-Mar-08 11:55 PM
Dear all,
I installed Vista SP1 on my Vista x64 Enterprise machine. Now my
Visual Basic 2005 (.Net 2) does not behave correctly. It appears that
'for loops' have a problem of some sort. For example, I have a 'for
loop' to fill a dropdown control with numbers from x to z. Now that
dropdown stays empty. This behavior did not happen before SP1. I do
not get any error messages. Everything works perfectly on WinXP.
Anyone has any idea if Vista SP1 break the .net 2.0 framework ?
Nick,
Windows XP
(1)
String.IsNullOrEmpty
(1)
MsgBoxStyle.Critical
(1)
IsNullOrEmpty
(1)
Vista
(1)
System.EventArgs
(1)
OpenMode.Input
(1)
LastIndexOf
(1)
Nicolas Hinze replied...
Actually, I pinpointed it to a change of behavior of the CurDir()
command. For some reason it is not returning the same between Vista
RTM and Vista SP1.
kimiraikkonen replied...
Is your framework 64-bit one?
FamilyTreeMik replied...
Can you post a small sample of code that shows this problem?
rowe_newsgroups replied...
What about My.Computer.FileSystem.CurrentDirectory?
Thanks,
Seth Rowe [MVP]
Nicolas replied...

The .Net Framework is the 2.0 32Bit. I develop on a WinXP 32Bit. I
just run my softweare on Vista 64Bit, because I can run more threads
and access more memory that way.
I was using CurDir() to get the directory that was opened with the
OpenFileDialog. Now I just use the substring of the opened filename.
There might be a more elegant option though. I was using CurDir,
because this sfotware was first developped in VB6. Here is my code:
Private Sub mnuFileOpenProject_Click(ByVal sender As Object, ByVal
e As System.EventArgs) Handles mnuFileOpenProject.Click
Dim sFile As String
Dim tempForm As Form
For Each tempForm In Forms
If tempForm.IsMdiChild =3D True Then
tempForm.Close()
End If
Next
Me.Text =3D "TSAM"
With OpenFileDialog1
.Title =3D "Open"
'ToDo: set the flags and attributes of the common dialog
control
.Filter =3D "All Files (*.prj)|*.prj*"
.ShowDialog()
If Len(.FileName) =3D 0 Then
Exit Sub
End If
sFile =3D .FileName
End With
If String.IsNullOrEmpty(sFile) =3D False And sFile <> "*.prj"
Then 'Skip if cancel is hit
Try
FileOpen(1, sFile, OpenMode.Input)
Input(1, ProjectName)
Input(1, ProjectDescription)
FileClose(1)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, Me.Text)
End Try
Project_Dir =3D sFile.Substring(0, sFile.LastIndexOf("\"))
'CurDir()
Me.Text =3D "TSAM - " + ProjectName
Call LoadIntro()
TreeView_Load()
End If
End Sub
Phill W. replied...
Can you?
I thought you had to specifically build your code to /target/ the x64
platform before you got any benefit from running on it - although I'd be
[very] happy to be proven wring on this. :-)
I'd fully expect this code to /miss/ some of your open forms.
Because it's updating the collection of forms as it goes along (by
closing some of them), the iterator on that collection is going to get
confused. When doing this sort of thing, always loop /backwards/
through the values; indexing into them is far more resilient than using
One for the next version wish-list, maybe?
For Each variable [As type] In *Reversed* values
??
HTH,
Phill W.
Nicolas replied...
Thanks for the coding tips Phill!
I'm running my 32Bit application on Vista 64Bit to be able to take
advantage of more memory. Now the application thread can only access
the standard 2GB or so. However, what I meant by threaded is that my
model can now call more .exe threads in the background and run much
faster. All is 32Bit, but when each of my .exe threads takes like 1 GB
each, I could only run a maximum of 2 or 3 threads in XP. Now in Vista
64Bit, with 8GB of RAM I can run 8 of those .exe threads at the same
time.
So to do this, you do not need to recompile in 64Bit.
Nick,
Phill W. replied...
You're welcome.
8GB of RAM? Ooooh; <shiver /> where can I get me one of those...?
;-)
Excellent.
OK, it may not be multi-/threading/ in the strictest sense, but with
that much space to run around in, your code ought to /fly/!
Regards,
Phill W.
duplicate the behavior of the operating system shortcut keys in my application? For example, my windows form has 5 controls (textboxes), the operating system will pickup which control has the focus for each control at form level. Any help is greatly appreciated. BD C# Discussions System.Windows.Forms.ToolStripProgressBar (1) System.Windows.Forms.KeyPressEventHandler (1) System.Windows.Forms.ToolStripStatusLabel (1) System.Windows.Forms.ToolStripMenuItem (1) System.Windows.Forms.ToolStripSeparator (1) System.Windows.Forms.KeyEventHandler (1) System.Windows.Forms.ToolStripItem (1) System.Windows.Forms.Keys.Control (1) I'm not sure you really
ContentAlignment (1) GraphicsUnit (1) EventHandler (1) FontStyle (1) CheckBox (1) TextBox (1) Is this a Windows Forms application? If so, there ishould be a region titled is not totally packed with InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InvoiceForm)); this.textBox17 = new System.Windows.Forms.TextBox(); this.textBox15 = new System.Windows.Forms.TextBox(); this.textBox7 = new System.Windows.Forms.TextBox(); this.textBox6 = new System.Windows.Forms.TextBox(); this.textBox5 = new System.Windows.Forms.TextBox(); this.textBox4 = new System Windows.Forms.TextBox(); this.textBox3 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms
Utf-8?Q?Depurando_aplicaci = C3 = B3n? = .NET Framework Hola a todos, tengo una aplicación windows vb.net vs 2005. Intento depurar la aplicación, pulsnado F5 para Debug, pero hasta que a. Saludos y gracias de antemano 'AdministradorWin.exe': Loaded 'D: \ DESA \ ExpedienteElectronico \ Nivel Cliente \ Presentacion Windows \ Administrador \ bin \ Debug \ AdministradorWin.exe', No native symbols in symbol file. 'AdministradorWin.exe': Loaded 'C: \ WINDOWS \ system32 \ ntdll.dll', No symbols loaded. 'AdministradorWin.exe': Loaded 'C: \ WINDOWS \ system32 \ mscoree.dll', No symbols loaded. 'AdministradorWin.exe': Loaded 'C WINDOWS \ system32 \ kernel32.dll', No symbols loaded. 'AdministradorWin.exe': Loaded 'C: \ WINDOWS \ system32 \ advapi32.dll', No symbols loaded. 'AdministradorWin.exe': Loaded 'C: \ WINDOWS \ system32 \ rpcrt4.dll', No symbols loaded. 'AdministradorWin.exe': Loaded 'C: \ WINDOWS \ system32 \ shlwapi.dll', No symbols loaded. 'AdministradorWin.exe': Loaded 'C: \ WINDOWS \ system32 \ msvcrt.dll', No
BMOkdWZ0IG5pY2h0IHVudGVyIFdJTjk4LCB3ZW5u (1) IG1pdCBWUzIwMDgga29tcGlsaWVydA (1) Visual Studio 2008 (1) Visual Studio 2005 (1) Visual Studio (1) Vista (1) KnownDLLs (1) APIs (1) Hallo Uwe, guck mal hier: http: / / msdn.microsoft.com / en Samples: http: / / www.codeproject.com Uwe <Uwe@> schrieb im Beitrag zum Wenn Du Kunden mit Windows 98 bedienen willst, dann mußt Du eben auch einen Compiler verwenden, der diese Platform unterstützt wieder jemand gesagt hat, VS 5.0 sei veraltet. . . Das ist kein Argument! Auch in Windows NT < = 4.0 gibt es genügend ganz 'normale' WIN32 PE-Anwendungen, die unter Windows 9x > nicht< laufen. Es ist halt einfach das Problem der in Teilen unterschiedlichen Technologie von Windows 9x und NT. - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Thorsten Albers albers(a)uni-freiburg.de - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Martin Richter [MVP] <martin.richter LOG vom Zielsystem: * ** ** ** ** ** ** ** ** ** ** ** ** ** ** | System Information Dependency Walker: 2.2.6000 (32-bit) Operating System: Microsoft Windows 98 (32-bit) OS Version: 4.10.2222 A (Second Edition) Processor: x86 Family 6 F File E Error (path not valid) * * * * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * The system's "KnownDLLs" list [F ] ADVAPI32 = c: \ windows \ system \ ADVAPI32.DLL [F ] CHOOSUSR = c: \ windows \ system \ CHOOSUSR.DLL [F ] COMCTL32 = c: \ windows \ system \ COMCTL32.DLL [F ] COMDLG32 = c: \ windows \ system
below) shows lot of messages Stepping over non-user code. Running in release mode from Windows this line speed is same (slow). How to speed up grid creation ? Using C# Express 2008 3.5 SP1 in Vista. Andrus. class Grid : System.Windows.Forms.DataGridView { internal void SetDataRetriever(DataRetriever<TEntity> dataRetriever) { . . . . . . SuspendLayout(); Enabled = false; int cnt = DataRetriever.RowCount if (!Enabled) return; . . . } } Debug output window contains: Step into: Stepping over non-user code 'System.Windows.Forms.DataGridView.RowCount.set' Step into: Stepping over non-user code 'System.Windows.Forms.DataGridViewColumn.CellTemplate.get' Step into: Stepping over non-user code 'System.Windows.Forms.DataGridView.CompleteCellsCollection' Step into: Stepping over non-user code 'System Windows.Forms.DataGridViewColumn.CellTemplate.get' Step into: Stepping over non-user code 'System.Windows.Forms.DataGridView.CompleteCellsCollection' Step into: Stepping over non-user code 'System.Windows.Forms.DataGridViewTextBoxCell.DataGridViewTextBoxCell