|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Old Basic commands.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 "Joe" <fire***@telus.net> schrieb: This even could not be archieved using 'VarPtr', 'Peek' and 'Poke'! You may > 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. 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/> '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] Show quoteHide quote "Herfried K. Wagner [MVP]" wrote: > "Joe" <fire***@telus.net> schrieb: > > 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/> > > 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 "Joe" <fire***@telus.net> schrieb: I am wondering why you'd want to do that. It's absolutely not necessary!> 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. These commands simply do not make much sense any more and pose a security > I wonder why Microsoft decided to exclude these commands out of the new > Visual Basic versions.... risk. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Calling Sub Procedure with a variable
ISO-8859-1 encoding of an xml string Deleting a Photo stored in a Picturebox Lauching a form from another form Lookup table in a Label is Recursive Procedures/Function what i need to solve my problem? consume web service via httpwebrequest Limit to range of colors displayed by Label control? How to remove an empty array ? Batch file question |
|||||||||||||||||||||||