473,396 Members | 2,030 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,396 software developers and data experts.

Old Basic commands.

Joe
Hi all...
In the old Quick Basic days there used to be 3 commands that seem to have
disappeared from the new visual basic. I was wondering if there are
equivalent commands to the VarPtr, Peek, and Poke commands of the old basic
in the new .net visual basic.

What I am trying to do here is lets say I have a constant variable

Dim A as string = "Panama" or Const A as String = "Panama"

At run time, I would like to change the A variable to let's say Canada, so
after the application is closed and then run again, the A variable will be
equal to Canada.

If so, can someone show me some examples of how to do this please and thank
you.

Joe
Jul 13 '06 #1
4 1699
"Joe" <fi*****@telus.netschrieb:
In the old Quick Basic days there used to be 3 commands that seem to have
disappeared from the new visual basic. I was wondering if there are
equivalent commands to the VarPtr, Peek, and Poke commands of the old
basic in the new .net visual basic.

What I am trying to do here is lets say I have a constant variable

Dim A as string = "Panama" or Const A as String = "Panama"

At run time, I would like to change the A variable to let's say Canada, so
after the application is closed and then run again, the A variable will be
equal to Canada.
This even could not be archieved using 'VarPtr', 'Peek' and 'Poke'! You may
want to use 'My.Settings' (VB 2005), 'Microsoft.Win32.Registry',
'GetSetting' and 'SaveSetting', one of the methods described in the article
mentioned below to persist the changes and reload them when the application
gets started again.

Storing and loading user preferences
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=userpreferences&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 13 '06 #2
'VarPtr', 'Peek' and 'Poke' are used to manipulate memory

so it would be possible to change the value on a certain location

however restarting the prog / computer would give you the start values of
the variabels

only way you can achieve what you want is using disk based IO routines
you can do this in several ways

Database , registry , flatfile , XML , serialization of objects etc etc

regards

Michel Posseth [MCP]


"Herfried K. Wagner [MVP]" wrote:
"Joe" <fi*****@telus.netschrieb:
In the old Quick Basic days there used to be 3 commands that seem to have
disappeared from the new visual basic. I was wondering if there are
equivalent commands to the VarPtr, Peek, and Poke commands of the old
basic in the new .net visual basic.

What I am trying to do here is lets say I have a constant variable

Dim A as string = "Panama" or Const A as String = "Panama"

At run time, I would like to change the A variable to let's say Canada, so
after the application is closed and then run again, the A variable will be
equal to Canada.

This even could not be archieved using 'VarPtr', 'Peek' and 'Poke'! You may
want to use 'My.Settings' (VB 2005), 'Microsoft.Win32.Registry',
'GetSetting' and 'SaveSetting', one of the methods described in the article
mentioned below to persist the changes and reload them when the application
gets started again.

Storing and loading user preferences
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=userpreferences&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 14 '06 #3
Joe
Hello Herfried and Michel,
Thank you for your response to my question about Peek, Poke and Varptr.
I was hoping that there would be a way to find the address of a variable and
then change it by poking other characters into it just like the old Quick
basic. Right now I am already using the IO file system to do this.
I wonder why Microsoft decided to exclude these commands out of the new
Visual Basic versions....

Thanks again
Joe

Jul 14 '06 #4
"Joe" <fi*****@telus.netschrieb:
Thank you for your response to my question about Peek, Poke and Varptr.
I was hoping that there would be a way to find the address of a variable
and then change it by poking other characters into it just like the old
Quick basic.
I am wondering why you'd want to do that. It's absolutely not necessary!
Right now I am already using the IO file system to do this.
I wonder why Microsoft decided to exclude these commands out of the new
Visual Basic versions....
These commands simply do not make much sense any more and pose a security
risk.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rookie | last post by:
I have done a lot of programming some time ago using Fortran and various varieties of the Basic programming languages, Hewlett Packard Technical Basic, QBasic, Quick Basic. With each of these...
9
by: Malcolm | last post by:
After some days' hard work I am now the proud possessor of an ANSI C BASIC interpreter. The question is, how is it most useful? At the moment I have a function int basic(const char *script,...
2
by: JOSE RIVAS | last post by:
HI PLEASE HELP Im making a program, that makes a process (OCR process) so i reach to automate it in order to open a file ("c:\image.bmp") and then executes the ocr process ok.. it is working...
2
by: Bob Piton | last post by:
I have just discovered how to do ftp with python, and have a question about using macdef. I can connect to the ftp site, using the .netrc file: machine my.ftpsite.com login myuserid password...
10
by: Ing. Carlos Villaseñor M. | last post by:
Hi everybody! I have developed in C# and got in a news group a math class that make matrix operations, eigenvals, eigenvecs, stat functions and much more, but now I trying to develop software in...
25
by: Marco | last post by:
Hi everyone. I've been trying to move some small applications written in vb.net 2003 to vb.net 2005 express just for testing purposes. I have noticed so far that the applications seem to run ...
6
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
1
by: Ravindu Madanayake | last post by:
i am newish to C++,i looking for a list of basic commands used in C++!hope you all can help me with this!
2
by: rcook349 | last post by:
I'm trying to automate our builds and publishes of our Windows application (deployed to a website via ClickOnce). I'm getting close, I think, on the commands I need to execute. However, how do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.