Converted C# Code To .net?
Oct 28, 2010
I have just converted my c# code to vb.net. And it is giving exception.c# code :private static short[] muLawToPcmMap;decoded[2 * i + 1] = (byte)(muLawToPcmMap[data[i]] >> 8);vb code :decoded(2 * i + 1) = CByte(muLawToPcmMap(data(i)) >> 8)Exception :Arithmetic operation resulted in an overflow.
View 4 Replies
ADVERTISEMENT
Jun 21, 2009
I was creating GTA SA save editer in c++ but due to less features in c++ I converted my whole code vb.net
Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
[Code]...
View 2 Replies
Oct 12, 2010
I had a code for getting the hdd id written in vb.netNow I need to re-write the code into c#. I have converted the vb.net code to c# but it is not compiling.Below is the vb.net code
Dim hdCollection As ArrayList = New ArrayList()
Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
[code].....
View 4 Replies
Mar 4, 2012
Can someone please explain to me what this error means? I am new to VB programming and don't understand this. Error : Type 'var' is not defined
Here's my code
[Code]...
View 4 Replies
Jul 21, 2009
General question: Is there any way to determine if a programming code has been converted from VB.Net to C#.
View 1 Replies
Jul 6, 2011
I used site to convert from C# to VB but converted code doesn't work. Can some one to convert that code to VB 2008.
private void TreeViewItem_Selected(object sender, RoutedEventArgs e)
{
ExpandToItem(sender as TreeViewItem);
}
void ExpandToItem(TreeViewItem i)
[Code]...
View 8 Replies
Feb 12, 2011
This code:
vb Dim s As String = strContents '<a global variable) Dim currentPos As Int64 = 0 Dim endPos As Int64 = strContents.Length - 1 '// A dictionary, used to count the frequencies Dim characterCounter As New Dictionary(Of [String], Int64)() While currentPos <> endPos '//
[CODE]...
Gives this error: Value of type 'System.Collections.Generic.KeyValuePair(Of String, Long)' cannot be converted to 'System.Collections.DictionaryEntry'.
View 2 Replies
Feb 12, 2011
Why do I get the error: Value of type System.Random' cannot be converted to an 'Integer'
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]....
View 14 Replies
May 10, 2012
Migrated application from vb6 to vb.net using visual studio and I am getting fallowing errors
1- Name 'App' is not declared. bool Flag = objForm1.ProjInit(form2, App)
2- 'SelStart' is not a member of 'System.Windows.Forms.Control'. Private Sub GetLeadingSpace(ByRef ctrl As System.Windows.Forms.Control, ByRef KeyAscii As Short)
[Code]...
View 4 Replies
Nov 9, 2011
I wish to convert the vbscript below to vb.net. Note: the functions from the script are also in a dll file but you can install the dsf runtime which comes with the windows ddk and just use the com component it installs from vb.net.
View 11 Replies
Jan 27, 2011
Vb.net 08 Private Function Reflect(mirrorId As String) As String
[Code]...
View 2 Replies
Oct 28, 2010
Here's my code
I seem to be getting an error SQL command cannot be converted to string with this code
Dim LogData2 As sterm.markdata = New sterm.markdata()
Dim query As New SqlCommand("Select * from openquery (db, 'SELECT * FROM table WHERE person=@person')")
query.Parameters.AddWithValue("@person", Session("number"))
[Code]...
View 4 Replies
Jan 17, 2009
Im trying to make it so that a user make a selection, with that selection is a IP address (192.168.1.) and than it gets looped and pinged from 2 till 254 strip = string and gets his value out of a case select. from mainpage (so its a public string)But i get an error that it cant get converted to a string and that it should be less than infinity.look code below.. i even tryed to make a seperate integer who adds the 2 others together (strip = 192.168.1. and intcount = 1 2 3 etc, those 2 together gives a full address)i cannot convert the strip to integer cause then it complains on the mainpage about the "cannot convert, should be less than infinity".[code]
View 2 Replies
Nov 24, 2010
If i have 2 variables, how can I check if the first one can be converted to the second's one type or not?
View 24 Replies
Mar 14, 2009
I have converted classes from c# to vb.net to use a calendar control, I have 1 error I am not sure what to do with.First Red part, error = Value of type 'System.Windows.Forms.Control.ControlCollection' cannot be converted to 'Form1.Kobush.Windows.Forms.Appointment'.
Private ReadOnly Property CalendarEvents() As IEnumerable
Get
Dim selected As New List(Of String)
For Each calendarEvent As Appointment In Calendar.CalendarEvents
[code]....
View 11 Replies
Apr 13, 2011
getting display info but not the correct info. I need to mult. the number of checks with the proper dim and add the dim svc fee 10D(monthly fee):
Dim decTwentyOrLessChecks As Decimal = 0.1D
Dim decTwentyToThirtyNineChecks As Decimal = 0.08D
Dim decFortyToFiftyNineChecks As Decimal = 0.06D
Dim decSixtyOrMoreChecks As Decimal = 0.04D
Dim intNumberOfChecks As Integer
[Code]...
View 10 Replies
Feb 7, 2012
I'm currently stuck on trying to fix this printing function on a project i'm working on, i've been trying for quite some time now with no good results. Keep in mind this is an in-house program with non-standard ways of programming, hence I fully expect to not get an answer if it's just too far complicated to understand with a block of code.
[Code]...
View 2 Replies
Jan 30, 2010
I have an array of numbers of which I want displayed in a text box but when I call for the numbers in my array, I get a compiler error "Type "String" cannot be converted to label".How can I get my array value printed onto my text box? Where am I going wrong? Here is the
Public Class frmBaseExponent
Dim LabelArray(8) As Label
Private Sub frmBaseExponent_Load(ByVal sender As System.Object, ByVal e As
[code].....
View 12 Replies
Mar 11, 2010
i want to delete data from database,but i can't. i think it's because the executeNonQuery is being converted to string..here is my code :
kongkon = New SqlCommand("DELETE FROM [User] where User_ID= ' " + lblssearch.Text + " ' OR [First Name] = ' " + lblssearch.Text + "' ", con)
ra = CStr(kongkon.ExecuteNonQuery) ---> i think this is the problem
[code].....
View 1 Replies
Apr 16, 2012
I have a web form that uses an Ajax date calendar.This works fine.The problem that i have is that when i submit my form i get the following message.'String value can not be converted to a date' .AgendaDate = New SmartDate(txtAgendaDate.Text)[code]I understand that its telling me that the string value cannot be convered to a date but i dont know hoe to resolve this as i am new to .net 2010?
View 3 Replies
Oct 15, 2009
I attempting to implement the Addemar Web Service (e-marketing system) into my VB.NET application. I've managed to get a connection and called a simple method, returning a array of field id's that is. I get into truble when I want to return the label of that particular id.Value of type '1-dimensional array of WindowsApplication1.AddemarWS.NamedValue' cannot be converted to 'WindowsApplication1.AddemarWS.NamedValue'.
[Code]....
View 7 Replies
Feb 27, 2010
I am using webbrowser control to pull html elements off a webpage from within my home made browser. The browser it's self is actually a bot. Now, I found elements for text boxes and such to login . Now I am trying to get it check the page for certain elements on every load. This way if I get logged out it will auto login. My problem is I am getting "cannot convert to boolean blah blah blah" in a line and after hours of research on msdn and google I can't fix the problem since I am noob. Heres the code. And the error resides on the line with a "arrow" next to it.
Code:
Private Sub Connect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Connect.Click
WebBrowser.Navigate(AdressBox.Text)
While WebBrowser.ReadyState <> WebBrowserReadyState.Complete
[code].....
View 1 Replies
Jul 29, 2010
i'm getting some errors after i converted it to C# well here it is
[code]...
And Converted in C# gives me allot of errors i can't even post it :/ convertor used [url] i need this class for my security program
View 2 Replies
Oct 13, 2009
im converting a vb code to vb.net from simpleocr site but i can't run this code because of error in sub calling (ret = objOCR.OCRSetOutputHandlerX(AddressOf myOutputHandler)) :
Code:
'AddressOf' expression cannot be converted to 'Integer' because 'Integer' is not a delegate type.here's the code:
Code:
dim strOCRResult as string = ""
Private Sub DoOCR (filename as String)
Dim objOCR as SimpleOCR 'SimpleOCR object
[code]....
View 7 Replies
Jan 23, 2011
im converting a vb code to vb.net from simpleocr site but i can't run this code because of error in sub calling (ret = objOCR.OCRSetOutputHandlerX(AddressOf myOutputHandler)):
Code:'AddressOf' expression cannot be converted to 'Integer' because 'Integer' is not a delegate type.I googled around but i did not found any solution here's the code:
[Code]...
View 2 Replies
Jun 3, 2011
what line i get this error " Argument 'Prompt' cannot be converted to type 'string' "
Try
If movieTxt.Text <> Nothing And ratingCmb.SelectedIndex <> 0 Then
For a = 0 To i
[Code]......
View 3 Replies
Jun 29, 2011
I am trying to write a class library and I am getting the following error: "Value of type 'WorkMateLib.Login' cannot be converted to '1-dimensional array of WorkMateLib.Login'"
The code of the classes is as follows:
Public Class Logins
Public CurrentUser As Login()
Public Sub New()
[Code]......
View 1 Replies
Jan 12, 2009
The code below is from Visual Basic 6.0. I need it converted into Visual Basic 2008 .net
I know VB.Net 2008 has the option to convert the code but im still having trouble with this:
[Code]...
View 3 Replies
Dec 1, 2011
I just converted a project of mine from VB2008 to VB2010 All I did was open the solution file with VB2010, at which point it prompted and guided me through a one-time conversion process (no errors)
View 2 Replies
May 11, 2010
I have a fillable form, which I have created using open office and converted to pdf. Everything works fine except when I have french characters in my fillable form and this is inevitable so I have to make it work.My fillable fields are named such as: {designation} when it works fine, but when I have {catgorie} in the pdf I will get {cat#C3#A9gorie} in the VB.I tryied UTF8 encoding but I won't work .
[Code]...
View 6 Replies