PC Review


Reply
Thread Tools Rate Thread

another vb6 to vb.net question

 
 
Starbuck
Guest
Posts: n/a
 
      1st Mar 2005
Hi

Simply because the challenge is there I am trying to convert my vb6 code to
vb.net. In the most part I have found ways but here is one I am stuck on, so
any thoughts would be welcome.

Public Function NewJobSerial() As Long
NewJobSerial = CType((Format$(Int(Rnd() * 424) - 212)) + Format$((Timer *
100), "0000000"), Long)
NewJobSerial = NewJobSerial Xor CType(2147483647 * Rnd(), Integer)
End Function

Thanks


 
Reply With Quote
 
 
 
 
Terry Olsen
Guest
Posts: n/a
 
      1st Mar 2005
How about this?

Public Function NewJobSerial() As Long
NewJobSerial = CType((Format$(Int(Rnd() * 424) - 212)) + _
Format$((Now.Millisecond * 100), "0000000"), Long)
Return NewJobSerial Xor CType(2147483647 * Rnd(), Integer)
End Function


"Starbuck" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> Simply because the challenge is there I am trying to convert my vb6 code
> to vb.net. In the most part I have found ways but here is one I am stuck
> on, so any thoughts would be welcome.
>
> Public Function NewJobSerial() As Long
> NewJobSerial = CType((Format$(Int(Rnd() * 424) - 212)) + Format$((Timer *
> 100), "0000000"), Long)
> NewJobSerial = NewJobSerial Xor CType(2147483647 * Rnd(), Integer)
> End Function
>
> Thanks
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perhaps and off topic question....but could use some help with video question.....I don't need codec help, just a general question. Bret Miller DIY PC 0 13th Oct 2006 12:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:33 AM.