Converting Int64 To Dateticks

Dec 21, 2009

Im reading data from a VB random file.

Using dim value as int64, the output is: 4674762526611734528 Using dim value2 as date, then converting to dateticks, the value is 627740064000000000 The actual date is: 26/03/1990

Why is the int64 value not the same as the dateticks value?? How do I convert the int64 value to dateticks value?

View 1 Replies


ADVERTISEMENT

Int64 Not Working Above 2^53?

May 19, 2011

In working with large prime numbers, I appear to have stumbled on a problem. Powers of 2 are showing up okay, but when I try to add or subtract from them, I get erroneous results. Below are the powers of 2, minus 1, for exponents 51 through 56. Notice that, starting with exponent 54, The resulting number is even, which is obviously incorrect. I used data types INT64 and UINT64 and got the same results for each.Here is my code and a partial list of the results:

Dim i, iTest
As UInt64
rtbIsPrime.Text = ""

[code]....

View 8 Replies

Int64 The Same With Long?

Apr 4, 2011

Be it in 32 or 64 bit system?

View 3 Replies

Convert IntPtr To Int64?

Sep 24, 2010

How can I convert IntPtr to Int64?

vb
Convert.ToInt64(GetForegroundWindow())

error :Unable to cast object of type 'System.IntPtr' to type 'System.IConvertible'.

View 4 Replies

Difference Between Int32 And Int64?

May 13, 2009

what does the convert command do in vb.net? and could you tell me what difference is between int32 and int64?

for example
dim h as integer
h=convert.toint32(textbox1.text)

View 5 Replies

Option Infer - Detect Whether The Integer Should Be Int64 Or Int32?

Feb 3, 2011

Will that detect whether the integer should be int64 or int32? What about if we run the program twice. Once we use small numbers and latter we'll use big numbers?

Let's look at this for example: vb.net Dim vector1 As List(Of Int64)Dim vector2 As List(Of Int64) vector1.Sort()vector2.Sort(Function(x As Int64, y As Int64) As Int64Return y - x

What about if I do: vb.net vector1.Sort()vector2.Sort(Function(x As Int64, y As Int64) As Int64Return y - x

[URL]

View 3 Replies

Converting File Into Bytes And Then Converting Those Files Back Into Its Original Form?

Aug 22, 2011

my goal is to

1.Take an file(exe,dll,etc)

2.Convert it into hex

3.place that hex values in a stack

4.Execute the values inside the stack to its original form(i.e. take the elements out of stack and then convert it to a compile format)

Imports System.IO
Sub Main()
Dim fileName As String = "ABC.exe"

[code]....

View 1 Replies

Converting A Do Until To A Do While?

Jun 8, 2009

I am having trouble converting this Do Until loop to a Do While loop. Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click calculates and displays the average sales amount Const strPROMPT As String = _

[Code]...

View 5 Replies

Converting A Get / Set To C#?

Mar 10, 2010

I have the following in vb.net and need to convert it to c#. Seemed rather simple at first but I need to pass in the NamedObject variable as welll which is supported in vb.net but not in c#..

What are my options.

Here is the vb.net - notice the NamedObject

Public Property Datos(ByVal NamedObject As String) As T
Get
Return CType(HttpContext.Current.Session.Item(NamedObject ), T)

[Code]....

View 4 Replies

Converting A MP3 To Wav?

Jun 9, 2009

I am trying to convert an MP3 to a wav. The wav file is created, but I am having problems elsewhere. The label is displaying the wrong data("Cancel/Error") and the progressbar is doing nothing. I am using lame 3.98 .exe and a wrapper for the exe. I downloaded the LameShell project from codeproject. Here is a section of the wrapper class. This was originally for resampling a mp3 to mp3.

[Code]...

View 2 Replies

Converting C# To .net?

Nov 17, 2010

I'm developing a program to execute powershell from .net app. I found a sample but it uses c# so I'm changing the code to vb.net but I don't know how change the following line:

Collection<psobject /> results = pipeline.Invoke();

View 2 Replies

Converting C# To VB?

Feb 14, 2011

The C# version works but when I convert it to VB it doesn't. What am I doing wrong?Its for opening an HTML doc into a usercontrol.

VB
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.UI

[Code]...

View 4 Replies

Converting C++ To .net?

Apr 9, 2012

how to convert this c++ sub to vb.net?

// Create points to simulate ellipse using beziers
void EllipseToBezier(CRect& r, CPoint* cCtlPt)
{
// MAGICAL CONSTANT to map ellipse to beziers

[code]....

View 3 Replies

Converting From C# To .NET?

Sep 11, 2009

I found some code on preventing DOS attacks written by Omar Al Zabir thta I would really like to use on a website written in VB.NET.

The code is at the following link -[URL] but is in C# I tried to convert using variios different programs but there seems to be one line that keeps giving me problems.It's the line

var hit = (HitInfo)(context.Cache[key] ?? new HitInfo());

in the method -

public static bool IsValid( ActionTypeEnum actionType )
{
HttpContext context = HttpContext.Current;
if( context.Request.Browser.Crawler ) return false;

[code].....

View 5 Replies

Converting From C# To VB?

Dec 30, 2009

I am trying to convert this code from C# to VB. Tried to use third party tools, but not successful.

[code]...

View 3 Replies

Converting From Cm To M And G To Kg

Jan 21, 2010

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code].....

View 2 Replies

Converting From VB6 To .net 3.5?

Jan 21, 2010

I am converting my project from VB6 to VB.net 3.5 and at one place i have declared private variable a() as variant and i am using some place as b =a(index,0) it will work in VB but gives me error in VB.Net the error is Number of Indices exceeds the number of dimensions of the indexed array.

View 4 Replies

Converting From VB6 To .net?

Jan 19, 2011

It is a program on which logic programs can be developed, compiled and downloaded into Programmable Logic Controllers. It is fairly big and complicated and the resulting .exe file is about 2Mb. I need to develop the program further now, and would like to use VB.net. When I try loading the VB6 code into VB.net, it changes all the variables of type Integer and String into type Object. It then states all through the resulting code that the default values are not defined. I assume that if defined as Integer and String variables do not need a default value, it would assume them to be 0 and empty. Any ideas why the program changes the variable types during the converstion? All forms start with 'Option Explicit', so all variables are defined.

View 3 Replies

Converting From VBA To VB?

Sep 25, 2009

I am trying convert a macro for MSProject from VBA to VB to create an add-in. What I am struggling with is the code to set the values of fields on a windows form and how to actually display the form.

What I have so far is:

Dim objProj As Microsoft.Office.Interop.MSProject.Project
Dim objTasks As Microsoft.Office.Interop.MSProject.Tasks
Dim objTask As Microsoft.Office.Interop.MSProject.Task

[Code].....

View 1 Replies

Converting GUI Of VB 6

Nov 9, 2010

the following is brief description of how my project works. GUI is used to collect information from User and validates.have got dll named control-class that pass input data from GUI to Business logic DLL.this dLL connect to the database and saves data.after that,it disconnected and takes the results to the control dll,then to GUI which interprets if the input data was successful or not.Is there a tool that can be used to convert VB6 GUI to .net web forms? am not familiar to vb.net.how do you create reference to vb6 dll or COM from vb.net?

View 2 Replies

Converting Hex To RGB?

Aug 29, 2009

I was following this thread [URL]to convert Hex to RGB, but Left$ and Right$ shows up as errors does anyone know why?

View 10 Replies

Converting PNG To ICO

Apr 10, 2012

I have read the threads on converting PNG to ICO format. I came up with the code below. This works, but it creates a black background where the PNG had a transparent background.[code]....

The _File variable above is a string that has the path to the PNG file.

View 8 Replies

Converting RC4 From C# To Vb?

Jul 4, 2011

I was put in a situation where I had to convert RC4 code from c# into vb
I tried getting already made codes online but they did not seem to work as the currently c# one that I have. Maybe a professional will see the mistake I am making. Both codes give a different encrypted result.

c# code:

public static string RC4(string pStrMessage, string pStrKey)
{
char[] lBytAsciiAry;
int[] lBytKeyAry;

[Code].....

View 1 Replies

Converting SQL To VB?

Mar 8, 2010

converting this to VB.net? Sorry if its wrong forum.

select
((dateadd(dd,0,
datediff(dd,0,GETDATE()))
-
cast((GETDATE()-.5)

[Code]...

View 9 Replies

Converting Vb6 To .net Or C#?

Nov 1, 2011

I'm actually coding this in c# but I might be able to convert it from vb.net Group1 does not have a declared type, but I believe it should be String.I'm not sure what this part means. Group1 = Right(Space(5) & CLng("&H" & Group1), 5)What is the vb.net or c# equiv?

View 4 Replies

Converting VB6 To .NET?

Jan 23, 2009

I'm converting a program from VB6 to VB.NET, but some parameters are declared as "Any". For example:

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory"(ByRef Destination As Any, ByRef Source As Any, ByVal length As Integer)

Private Declare Function NWDSGetContext Lib "netwin32" (ByVal context As Integer, ByVal key As Integer, ByRef Value As Any) As Integer

"As Any" is not supported in VB.NET so I'm wondering what I should change it to.

View 2 Replies

Converting Vb6 To Vb Net?

Apr 14, 2011

I'am trying to convert a vb6 form to vb net but i had this error Le concepteur ne peut pas traiter le code de la ligne 307: Me.ImageList1.Key_0 = "" Le code dans la méthode 'InitializeComponent' est généré par le concepteur et ne doit pas être modifié manuellement. Supprimez les modifications et essayez de rouvrir le concepteur.

View 1 Replies

.net - C# Statement Converting From VB?

Sep 6, 2011

I have this piece of code which is calling some functions in a web service. however the original was written in VB and when I have converted it it gives me an error in my c# stating that 'The name Information does not exist in the current context' I have checked the VB and it win there either!

[Code]...

View 4 Replies

.net - Converting C++ Vb6 COM Object Into Dot Net?

Nov 9, 2010

I have a COM object in C++ and VB6 and everything is compiled and packaged using Visual Studio 2003. The C++ generates the DLL, and VB6 the EXE, so from the legacy code I can call the EXE that calls the DLL and so on. I need to migrate these to Visual Studio 2008. However, I have some questions

1) I can compile the C++ and generate the DLL - ( I think is ok)2) VB.Net doesn't have the option to generate COM/ActviveX anymore as VB6, so no idea - I tried to generate windows exe and call the dll, but it doesn't work. I think because it has some COM calls.

So what is the best solution to get rid of COM/ActiveX and deliver something?

Compile in C++ and load adding references in VB.net? I tried this but the DLL doesn't load..

View 3 Replies

.net - Converting VB Linq To C#?

Apr 12, 2011

I'm in the process of teaching myself C# by converting an existing project and am stuck converting the following vb linq code:

Dim outStuff = From tt In (From t In Products.SelectMany(Function(p) If(p.tags IsNot Nothing, p.tags, New ObservableCollection(Of TagModel)))
Group By tagName = t.name,
v = (Aggregate p In Products Where If(p.tags IsNot Nothing, p.tags.Contains(t), Nothing) Into Sum(p.views)),
nl = (Aggregate p In Products Where If(p.tags IsNot Nothing, p.tags.Contains(t), Nothing) Into Sum(p.num_likes))

[Code]...

var x = Products.SelectMany(p => (p.tags != null) ? p.tags : new ObservableCollection<TagModel>());
var tags = from t in x group t by t.name into g select new { tagname=g.First().name};

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved