lord_of_pop
New member
- Joined
- Jul 24, 2006
- Messages
- 3
- Programming Experience
- Beginner
hi guys
i am in the middle of converting a big project from c# to vb.net
and iam facing this problem
in c# the integer type (UInt32) is implemented and can be used
but in vb.net its not implemented
and its giving me "value of type integer cannot be converted to PrinterErrors" in this line :
Private m_Error As PrinterErrors = PrinterErrors.OK
i have this code portion
i have enum in C# declared as UInt32
PrinterErrors.ok =0
PrinterError.readError=20
.
.
.
i tried to make my own enum in vb.net
as follows
Public Enum PrinterErrors As Integer
AccessDenied = 5
CannotConfigSerialPort = 800
CannotOpenSerialPort = 842
DirectoryFull = 8
DirectoryUnmovable = 7
DiskFull = 13
EndOfFile = 14
EndOfPaper = 847
FileNotFound = 2
FilePositionError = 9
end enum
but it seems that the application uses a delegate which must receive a parameter of the kind of the PrinterError (UInt32)
AddHandler Me.m_Printer.ScriptPrinter.Error, AddressOf TriggerPrinterError
Private Sub TriggerPrinterError(ByVal sender As Object, ByVal MyError As PrinterErrors, ByVal Line As System.UInt32, ByVal FileName As String)
Me.m_Error = MyError
End Sub
not sam signature
so my conversion to Integer was not ok
i am in the middle of converting a big project from c# to vb.net
and iam facing this problem
in c# the integer type (UInt32) is implemented and can be used
but in vb.net its not implemented
and its giving me "value of type integer cannot be converted to PrinterErrors" in this line :
Private m_Error As PrinterErrors = PrinterErrors.OK
i have this code portion
i have enum in C# declared as UInt32
PrinterErrors.ok =0
PrinterError.readError=20
.
.
.
i tried to make my own enum in vb.net
as follows
Public Enum PrinterErrors As Integer
AccessDenied = 5
CannotConfigSerialPort = 800
CannotOpenSerialPort = 842
DirectoryFull = 8
DirectoryUnmovable = 7
DiskFull = 13
EndOfFile = 14
EndOfPaper = 847
FileNotFound = 2
FilePositionError = 9
end enum
but it seems that the application uses a delegate which must receive a parameter of the kind of the PrinterError (UInt32)
AddHandler Me.m_Printer.ScriptPrinter.Error, AddressOf TriggerPrinterError
Private Sub TriggerPrinterError(ByVal sender As Object, ByVal MyError As PrinterErrors, ByVal Line As System.UInt32, ByVal FileName As String)
Me.m_Error = MyError
End Sub
not sam signature
so my conversion to Integer was not ok