Convert Program Function To Script?
Feb 23, 2011Any VB/Javascript guru out there that can convert this for me?[code]...
View 1 RepliesAny VB/Javascript guru out there that can convert this for me?[code]...
View 1 RepliesI have the below C# Lambda function and I need to convert it to a VB.Net code. I tried many times but I couldn't convert it the right way. [code]...
View 10 RepliesI am trying to convert a DLL function call which has the Callback function routine called within the DLL function call.The DLL function call signature is like this:
typedef void *HANDLE;
typedef HANDLE HACQDESC;
DECLARE_HANDLE (HWND);
[code]....
how to convert this DLL call to VB.NET and also how to create the callback function and send it as parameter to this function
call.
I am having a problem with the BackOrdered Function of my program. I can`t get it to say anything but 0 when I run the program. Another problem I am having is the input box pops up like 6 times and it`s only suppose to once. [Code]
View 9 RepliesIn VB6 there was a function called String$. Is there an equivalent of this in .NET?I am trying to convert this function from VB6 to VB.NET
VB6 Private Function ByteOrder(ByVal vNumb As Variant, ByVal vByte As Variant) As String
Dim bLeft As Byte Dim sNumb As String
[Code]...
only code I can find after several hours of searching is a PHP function. Although I can more or less see what's happening, I'm not able to convert everything. The main problem is the "temp_getBytes" function. I don't know how to convert that.I already have the file as a byte array, because it was decrypted, so I'm writing the byte array to a memory stream in order to work with the data. I've added a bunch of question marks where I'm having a problem converting the code.
vb.net
Imports System.IO
Public Class Form1
[code].....
I need to convert this function to C#.
Public Function GetAppGUID(ByVal sectionId As String) As String
Dim hexString As String = Nothing
Dim i As Integer[code].....
This is going to be a lot to ask, but I'd like to convert my old GW-BASIC program to a command line program with arguments. I'd like it to operate as follows:
elapse [drive:][path]filename This is my old code.
5 CLS
10 OPEN "G:Calc.txt" FOR INPUT AS #1
20 WHILE NOT EOF(1): INPUT #1, A$, B$
30 IF MID$(A$,3,1)=":" THEN C$="DOUBLE DIGIT":GOTO 50
40 IF MID$(A$,2,1)=":" THEN C$="SINGLE DIGIT":GOTO 120
[Code]...
I'm using a SQL Server database and a bindingsource, and i want to filter a numeric field in order to, for instance, when I write 1, the grid shows all the rows in which that field begins whith 1 (1,10,14...). In order to do this, I have to convert the field to varchar, but VB shows an error message when using cast or convert functions. I have this sentence in my
[Code]...
Here there's an old question about this code.
xmpp.OnLogin += delegate(object o)
{
xmpp.Send(
[code]....
I have this function that maps a IDataReader to a class. It is obviously written in C#. My co-worker wants to use the same method in his code, but he is writing in VB.net. Basically I am having difficulty rewriting this due to the Lambda expressions used in C#. He is running .Net 3.5.
[Code]...
I'm trying to convert C++ API to VB.Net, but this function is too hard and i don't know how make it work.
Here is the API doc for this function:
void RemoteDllSetReceiver(void *inst, on_received_buffer_t received_buf_cb);
Sets a callback function to receive notifications from the DLL. The prototype of the callback is:
typedef bool (*on_received_buffer_t)(void* inst, const unsigned char *buffer, unsigned int size);
Where inst is the pointer originally passed to RemoteDllSetReceiver buffer & size contain the notification text as defined in the Remote Protocol. Note: notifications may arrive in different threads (e.g. network, timer, audio).
I can't imagine what i mus do with on_received_buffer_t, must it be a delegate? Like you can read, this functions returns notifications from the DLL like connection status, user id...
I have some vb code i would find it helpful if someone was able to convert it to c# for me. I dont really know what the left function does?[code]...
View 2 RepliesLooking for the function to convert 8.5% to .085
View 3 RepliesI have following code:
Dim len As Int32 = 1000
Dim rdlen As Int64 = 2000000000000
Dim totlen As Int64
Which example is the correct way to use System.Convert.ToInt64 function?Example one:
totlen = System.Convert.ToInt64(rdlen + len)
Example two:
totlen = rdlen + System.Convert.ToInt64(len)
I am having trouble getting server variables remotely in VB .Net I need to basically mimic this PHP Function.
function showvar($string)
{
if(isset($_SERVER[$string]))
[Code]....
Atleast show me how to return one variable.
I try to convert names and values parameters of function into a hashtable. For name of parameter, it's ok, but not for value.
Function test(ByVal param1 As String, ByVal param2 As String) As Hashtable
Dim hash As Hashtable = New Hashtable
Dim stFrame As New StackFrame
[Code]....
There is a property to get default value of parameter (if optional) with param.DefaultValue but how to get current value ?
I have some C# code I'm trying to convert to VB.NET. There are some external dependencies I'm referencing in each project. The C# line is
TWriteFileCommand writeFile = (TWriteFileCommand)CommunicationLink.CreateCommand(TOPKernel.TCommand.CommandType.WriteFile);
I don't really understand what the TWriteFileCommand in parathesis after the equal sign is for in that statement. When I try to do it in VB.NET, I keep getting errors because I can't get a reference to the CreateCommand function. The closest I've gotten is this:
Dim MyAppBase As OPSupport.App.AppBase
Dim writeFile As TWriteFileCommand
writeFile = MyAppBase.CommunicationLink.CreateCommand(TOPKernel.TCommand.CommandType.WriteFile)
However, I have a green underline after the equal sign @ MyAppBase that flags an error "Variable MyAppBase is used before it has been assigned a value. A null reference exception could result at runtime."What am I missing? Why in the C# code is the instance fine and what do I need to get the equivalent instance in VB.NET?
I am new to vb.net and would like to be able to convert the following code to it's own function - either inside the current module or better yet in a seperate class.This code currently runs in the KEYPRESS event and ensures only numbers, decimal point, 2 decimals etc. are entered and not letters. Works exactly how I want it but would now like it in a function.I need this code in numerous text box controls but I would rather just call it somehow with a function.
View 3 RepliesI am looking for a utility/tool to convert calls to legacy VB6 functions to the .NET equivalent. For example, it would convert this...
[Code]....
Does anybody know of one, or am I going to have to roll my own?
I have a very old app that uses a little function that calculates a value and after that i get the hash code of that value, that it's used as a password to unlock some functionalities to the user. Now the manager has a 64 bits computer and the function returns a different value. What i need it's how to convert this function from C# to Vb, i know that I can use the converts, but they don't work, pointers. Code: Can I convert this function?
View 1 RepliesI have a function in VBA that I need to convert into VB.net:Sub Crossfunction(ByVal Array1 As Decimal, ByVal Array2 as Decimal) As Boolean
Dim C As Variant
Dim Above as boolean
Array1 = Array(1, 2, 3, 4, 5, 6, 7, 8, 9)
Array2 = Array(1, 4, 3, 7, 5, 8, 7, 2, 9)
[Code]...
Is this the correct method? And how can I convert the function and not get an error: Error 1 Value of type 'System.Collections.Generic.List(Of Decimal)' cannot be converted to '1-dimensional array of System.Collections.Generic.List(Of Decimal)' when I redefine the Arrays as: ByVal Array1() as List(of Decimal),ByVal Array2() as List(of Decimal).
I have the code below. The code returns a string in (IntersectingPoints) for X and Y. I need X and Y values to be in single and stored in an array to deal with later.[code]...
View 11 RepliesI have a window that I need to activate and the window name does not work in AppActivate("WindowName") because this does not work with partial captions etc... and the window name will be different depending on user. That being said I am able to use "GetwindowhandlefromPartialCaption" to retrieve the # value of the window name or handle. Is there a way to convert this or extract the name from the handle ID to use with AppActivate?
[Code]...
I have a window that I need to activate and the window name does not work in AppActivate("WindowName") because this does not work with partial captions etc... and the window name will be different depending on user. That being said I am able to use "GetwindowhandlefromPartialCaption" to retrieve the # value of the window name or handle. Is there a way to convert this or extract the name from the handle ID to use with AppActivate?
[code]...
I am not able to convert this function to VB code..[code..]
I have the problem to deal with the substring function.
I am creating a program that will convert Celsius to Fahrenheit and visa versa. The program must use a function to return the answer. I'm using a string function that will return either the temperature in Celsius or Fahrenheit or "Please enter a valid temperature" if anything but a number is entered. TryParse is used to check if the input is valid.
When using the TryParse method in the function I am trying to use a parameter to pass the variable that will store the converted data type value [Code] The line " If Double.TryParse(tempTextBox.Text, scale) Then " is supposed to check if the conversion is possible and if it is pass either F or C as a variable to the scale parameter. It seems to verify the conversion all right but it doesn't actually do the conversion. Why isn't doing the conversion? Both F and C remain 0. I can get it to work by using two more TryParse methods (one in each branch of the If else statement in the function), but I'd rather not do this.
display a Decimal (or double) to elapsed time [h]:mm:ss (hours:minutes:seconds)using vb.net?
example:
if you were to type "1.34666666666667" into a cell in Excel then choose Custom Format [h]:mm:ss The result is an elapsed time of "32:19:12". Using the OADate function only runs on a 24 hour clock so this does not work for longer durations unfortunately...
I have a vb6 program which shells and runs a Vb 2005 program, I would like to be able from that VB 2005 program run a function back in the original VB6 program which called it. Callback?
View 1 RepliesI'm looking for do this in vb.net:
hy how are you
TO:
Hy How Are You