Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21993

Convert Java To VB

$
0
0
I'm in the process of converting some old Java code to VB and I run into a few problems now and then

Here is one of them

Java code

Code:

do {
  int k1 = ai[j1];
  int l1 = (k1 & 0xff0000) >> 16;
  int i2 = (k1 & 0xff00) >> 8;
  int j2 = k1 & 0xff;
  l1 = Math.min(255, (l1 * c) / 100);
  i2 = Math.min(255, (i2 * c) / 100);
  j2 = Math.min(255, (j2 * c) / 100);
  ai[j1] = (k1 & 0xff000000) + (l1 << 16) + (i2 << 8) + j2;
} while(++j1 < 483);

The lines in bold red are what I am having trouble with as I do not know how to convert them to VB code

Viewing all articles
Browse latest Browse all 21993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>