473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

can anyone translate this into Latest VB Code

11
i am using visual basic
the newest one
and i need the coide to load a file from like a folder in my computer code in the old visual basic 6.0 it is like ::


Randomize
Select Case Int(Rnd * 6)+1

Case 1
picboxname.picture = LoadPicture(app.path & \picname.bmp)

and so on
but i need the code for the new version as this dont work
thanx heaps
Aug 1 '07 #1
6 1583
hariharanmca
1,977 1GB
i am using visual basic
the newest one
and i need the coide to load a file from like a folder in my computer code in the old visual basic 6.0 it is like ::
Randomize
Select Case Int(Rnd * 6)+1
Case 1
picboxname.picture = LoadPicture(app.path & \picname.bmp)
and so on
but i need the code for the new version as this dont work
thanx heaps
Expand|Select|Wrap|Line Numbers
  1. Select Case Int(Rnd * 6) + 1
  2. Case 1
  3. picboxname.picture = LoadPicture(app.path & "\picname.bmp")
  4.  
It's not version problem.
just try this(you missed the doubleuots).

and can you explain why you calculating 6 and 1 with the Rnd method?

Expand|Select|Wrap|Line Numbers
  1. Int(Rnd * 6) + 1
Aug 1 '07 #2
Zaccy
11
Expand|Select|Wrap|Line Numbers
  1. Select Case Int(Rnd * 6) + 1
  2. Case 1
  3. picboxname.picture = LoadPicture(app.path & "\picname.bmp")
  4.  
It's not version problem.
just try this(you missed the doubleuots).

and can you explain why you calculating 6 and 1 with the Rnd method?

Expand|Select|Wrap|Line Numbers
  1. Int(Rnd * 6) + 1
the LoadPicture thingo dont work it says the name 'loadpicture' isnt declared
plz tell me what can rplace it

thanx
Aug 1 '07 #3
hariharanmca
1,977 1GB
the LoadPicture thingo dont work it says the name 'loadpicture' isnt declared
plz tell me what can rplace it

thanx

then check is there picture which you declare in load picture method?
Aug 1 '07 #4
Zaccy
11
then check is there picture which you declare in load picture method?
yer i have and it says LoadPicture and App. names arent declared

plz help
Aug 1 '07 #5
Zaccy
11
PLEASE HELP i have this problem and i need it fixed
all i need to know is the code to load pictures from folders in my computer when a number is equal to a case
on the old one it is

LoadPicture(App.Path & \1.bmp)

but it doesnt work on new VB it says Name 'LoadPicture' is Not Declared and same with app.path
plz help me
PLEASE
Aug 2 '07 #6
hariharanmca
1,977 1GB
PLEASE HELP i have this problem and i need it fixed
all i need to know is the code to load pictures from folders in my computer when a number is equal to a case
on the old one it is

LoadPicture(App.Path & \1.bmp)

but it doesnt work on new VB it says Name 'LoadPicture' is Not Declared and same with app.path
plz help me
PLEASE
Expand|Select|Wrap|Line Numbers
  1. Select Case Int(Rnd * 6) + 1
  2. Case 1
  3. picboxname.picture = LoadPicture(app.path & "\picname.bmp")
  4.  
okay Zaccy, whatever the code is correct.

now,
1. try to copy the path from the 'Address' Bar in IE paste it
2. then copy the file name and paste in in code with file extension.

try this way.
Aug 2 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Johnny Lee | last post by:
Hi, First, I want to know whether the python interpreter translate the code directly into machine code, or translate it into C then into machine code? Second, if the codes are translated directly...
13
by: penguin732901 | last post by:
Checking back for discussions, there was a lot of talk about 2000 being slower than 97, but not so much lately. What is the latest opinion? Anyone care to set up a poll for how many NG members...
6
by: Gancy | last post by:
Hi all, Are there any version of g++ that translates C++ to C. or any open source compiler to do this. Thanks Ganesh
4
by: Hai Nguyen | last post by:
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using panel to test myself. I tried to use these code below, which is written in VB, and to transform them to c sharp but I got...
6
by: bobueland | last post by:
The module string has a function called translate. I tried to find the source code for that function. In: C:\Python24\Lib there is one file called string.py I open it and it says
9
bvdet
by: bvdet | last post by:
I have done some more work on a simple class I wrote to calculate a global coordinate in 3D given a local coordinate: ## Basis3D.py Version 1.02 (module macrolib.Basis3D) ## Copyright (c) 2006...
5
by: Les Caudle | last post by:
I've got some C# 2.0 code that has been working for a year. using (XmlWriter w = XmlWriter.Create("out.xml" ,settings)) { // many lines of code to write to w...
3
by: amija0311 | last post by:
Hi, I am new using DB2 9.1 database by windows base. I want to query the data that contain string then translate the string into integer using DB2. The problems is If the data is null, i got the...
3
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
I've just been tasked to translate a C# project into VB (Dot Net 2.0). I am somewhat familiar with C# but far from an expert. I'd like a second opinion on this one. The project uses CSLA...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.