About an error with FotoVision

RugalMKing

New member
Joined
Aug 3, 2005
Messages
1
Programming Experience
Beginner
I was downloaded this source code example from msdn

http://msdn.microsoft.com/smartclient/codesamples/fotovision/default.aspx?pull=/library/en-us/dnne

And open it with Visual Basic Express Edition Beta but...

I found this errors:

Error 1:

Error 34 Specified access 'Public' for 'Settings' does not match the access 'Friend' specified on one of its other partial types. D:\Dev\NET\VisualBasic8\FotoVision\DeskTop\1.0\VB\Desktop\Source\util\Settings.vb 22 14 FotoVisionDesktop

Code:



VB.NET:
 Public Class Settings '<--------- Here!! 
 
' internal members
 
Private _list As New Hashtable
 
Private _filePath As String = ""
 
Private _autoWrite As Boolean = True
 
Private _defaultValues As String()()
 
' properties
 
' specifies if the settings file is updated whenever a value 
 
' is set, if false, you need to call Write to update the 
 
' underlying settings file
 
Public Property AutoWrite() As Boolean
 
blah... blah... blah...
Error 2:

Error 3 'Settings' cannot expose type 'Settings' outside the project through class 'Global'. D:\Dev\NET\VisualBasic8\FotoVision\DeskTop\1.0\VB\Desktop\Source\Global.vb 46 51 FotoVisionDesktop

Code:



VB.NET:
Public Shared ReadOnly Property Settings() As Settings '<------- Here!!
 
Get 
 
Return _settings
 
End Get
 
End Property

how I can solve this??

And... 79 warnings!! for example...

Warning 1 'Public Overridable Property AutoScaleBaseSize() As System.Drawing.Size' is obsolete: 'This property has been deprecated. Use the AutoScaleDimensions property instead. http://go.microsoft.com/fwlink/?linkid=14202' D:\Dev\NET\VisualBasic8\FotoVision\DeskTop\1.0\VB\Desktop\Source\DeletePhotoForm.vb 95 3 FotoVisionDesktop

Warning 4 Access of shared member or nested type through an instance; qualifying expression will not be evaluated. D:\Dev\NET\VisualBasic8\FotoVision\DeskTop\1.0\VB\Desktop\Source\panes\PhotosPane.vb 567 5 FotoVisionDesktop

Warning 16 Variable 'tempFile' is used before it has been assigned a value. A null reference exception could result at runtime. D:\Dev\NET\VisualBasic8\FotoVision\DeskTop\1.0\VB\Desktop\Source\MainForm.vb 1951 12 FotoVisionDesktop

Warning 35 'DoubleBuffer' is obsolete: 'This enumeration value has been deprecated. Use OptimizedDoubleBuffer instead. http://go.microsoft.com/fwlink/?linkid=14202' D:\Dev\NET\VisualBasic8\FotoVision\DeskTop\1.0\VB\Desktop\Source\panes\BasePane.vb 47 15 FotoVisionDesktop


What I can do to slove this warnings without causing more errors??

 
1. VS 2005 now includes partial classes, i.e. classes that can de defined in more than one file. Each partial definition must have the same access level because they will be compiled into a single class. You need to change one of the definitions to match the access level of the other. You may need to select the "Show all files" option in the solution explorer to see every file that contains a partial definition.

2. Deprecated means that the object, member or whatever still exists for compatibility but should not be used in new code. The project will still compile but it is best to use the new replacement that the warning message suggests instead.

3. Shared members or nested types should be qualified with the name of the class, not the name of a variable of that type.

4. It is good practice to initialise all variables. If you know that you want this variable to be Nothing up to that point then assign Nothing to it when you declare it, which will clear the warning.

5. See 2.
 
Back
Top