How To Read A C++ Variable In VB
Jan 26, 2011I have a C++ application and from that I have to read variables with VisualBasic. How to do this?
View 1 RepliesI have a C++ application and from that I have to read variables with VisualBasic. How to do this?
View 1 RepliesI have created a program that saves the co-ordinates of the users mouse and saves it to a text file to be used as an auto clicker.
View 2 Replies[code]...
everytime I compile my program, it says I'm having incompatible types.
I want to be able to put a file to a variable so I can interact with it. For example I could put a wav file into a variable and play it back without having to distribute the separate file. Is this possible for instance by using Base64. I have seen some Python programs for example that have images embedded in the code.
View 1 RepliesI have a variable that holds 350 lines from a HTML page. I need to read this variable into Array. reason behind this, because I am parsing a name that exist more then once.
any ideas on how to read variable with many text lines into an Array
I try to make a sub routine to read information from memory variable into XML format.[cod]e...
View 6 RepliesI am trying to create a program that solves the rubiks cube and ive started, I made a program that asks for the variables, now I want to output them using my function writeline(). I am trying to use a for each statement to read and output every variable for each object "face". but I am not sure how to go about it.
Heres the code
Module Module1
Dim Top As New Face
Dim Left As New Face
Dim Front As New Face
Dim Right As New Face
Dim Back As New Face
[Code] .....
I declared the variables with in the first module to be loaded
Module Mod_Global Public DtFRM As String Public DTTo As String I can load the variable and read it with in the module. Ok, good so far. But sending the code to another module results in nothing in the variable.
I simply wont to read one field in a databasetable into a variable.[code]....
View 6 RepliesI want to read in Windows variables from a text file to look for certain strings.
Example I want to find:
%windows%java
or
%userprofile%administrator est.txt
I have no idea where to start. I do have this:
userProfile = Environment.GetEnvironmentVariable("userProfile")
I have binary files to read with this structure:
Code:
Palettes
Palette files have a slightly different header structure as follows:
type pal_header = record
[Code]....
I can hard code each value, and read it with binaryreader, but I suspect that is possible to define a class or a structure, and read it at once with serialization, altought I are not sure on how to read the variable rgb_triplet array.
I have a function that queries the server to add items to a drop down list. Here is the excerpt in question:
While reader.Read()
With f.items
'f is the drop down list object
[Code].....
I want to be able to use this same function over and over to populate all the drop down lists for the whole page, but am getting the error "column g.tostring not found". How do I get this to be handled as a variable string?
How can I write/read a structure variable to a file?
The structure variable is declared as :
Public Structure StructDimensions
Public RectHeight, RectLength, RectWidth As Double
Public PitchedLength, PitchedWidth, PitchedHe, PitchedHr As Double
[Code]....
Is there a simple way to create a file for this type of data?
I have a variable called Valint that i need to read/write to in a script task, but it doesn't seem to work:
public class scriptmain
inherits usercomponent
dim counter as integer
dim Valint as integer
[code]....
For some reason my output is always 0
I have a text file which contains some data as follows
1, 0,0,0,0,0,0,-288.000,-288.000,-16.200,0,0
2, 0,0,0,0,0,0,-432.000,-288.000,-16.200,0,0
3, 0,0,0,0,0,0,-360.000,-360.000,-16.200,0,0
4, 0,0,0,0,0,0,-288.000,-432.000,-16.200,0,0
There r 7 numbers in each row and need to read each of that and store it as an integer value ...I tried the following code..
Imports System
Imports System.IO
Imports System.Collections[code].....
This works and is showing each number by number ...But is there a way to store each number to another variable...something like a(1)=1, b(1)=0...., a(2)=2, b(2)=0......
How can i make a program that will read a text file (.txt) and save each seperate line as a variable? e.g.
Text File:
Hello
My
[code].....
I'm starting to write some code to run an office (not professionally). When I write the Client Class, how do I make it that the number of the client be a primary key (unique and auto incremental)? Also, I want that all the Client and Products data be stored on a txt file.
View 19 RepliesHow do I read all the text from a text file and save it as a string variable? For some reason I remembered it being something like this: IO.FromFile.ReadAllText("path") but thats not it.
View 3 Replieshow I can read a word document to pass its contents into a variable. Is there an easy way to do this?
View 3 RepliesIs it possible to set a variable in my custom class for Private Read/Write access and Public Readonly access without creating Properties with Get and Set? In other words, from within my class I want full access and from my form I only want read access. Right now I declare my variable as either Private or Public to control Public read/write access. I tried googling my question a bit but I'm not sure what the correct terms even ar
View 5 RepliesI am getting the error:"Range variable 'sender' hides a variable in an enclosing block or a range variable previously defined in the query expression."for this
Imports System.Data.SqlClient
Imports System.Linq
Public Class Form1
[code]....
I can select any other item from the table without the error. "sender" has the same properties as "receiver" in the SQL table.
I receive the error -
[Code]...
Public Class Form1
Dim x, c, number(0 To 19) As Integer
Dim s As Integer
[CODE]...
The variables in the brackets [example] do not actually have brackets in them in the original code. These are where the issues are. For both variables, it says, "The type for variable [variable] will not be inferred because it is bound to a field in an enclosing scope. Either change the name of [variable], or use the fully qualified name (for example, 'Me.[variable]' or 'MyBase.[variable]')." Now, I'm not entirely sure if this is a stupid question or not, as I'm used to VB '98 because that's what we use in my programming class at High School. let me know why this won't work.
-Note: The intention of this program is to continually loop the generation of numbers for this list until I tell it to stop. Button1 ends the program, Button2 generates the list one time only, Button3 is supposed to loop the generation of the list, and Button4 is supposed to end the loop, but not the program.
Say that i have the following code that parse about 20k records from the DB.
Code #1
vb.net While reader.Read()
list.Add(If(Integer.TryParse(reader(0).ToString, 0), Integer.Parse(reader(0).ToString), 0))
End While
And then another code which does the very same thing but it seems to be a little cleaner.
Code #2
vb.net While reader.Read()
Dim storeowner As Integer = 0
Integer.TryParse(reader(0).ToString, storeowner)
list.Add(storeowner)
End While
This is what i am confused about; does the compiler creates a new variable automatically when i use the if statement without strictly declared variable? What approach is better in sense of performance?
I am looking for a good resource on variable naming conventions to illustrate variable type and where variables are declared. So I will have public variables, Private variables, private or local variables. I also may want to declare variables with the same name in different class code (i.e. in the code behind different forms). I am assuming good coding would dicatate a prefix for declaration location.
View 4 Repliesi have this error in the line of with xl.active......Object variable or With block variable not set.
Dim xl As Object
xl = CreateObject("Excel.Application")
With xl.ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:Documents and SettingsUserDesktop429MEDICA2.TXT", _ Destination:=xl.Range("$A$1"))
[code]....
Now I have the need to get a current value from a bindingsource in a property of a user control.In a previous thread I had tracked down the "Object variable or With block variable not set" to the return in the Get block of a property. At the time I was only using the Set so I just commented out the offending code until I needed it.
[Code]...
The error does not occur during a system compile, only upon saving the container object of the user control. As I said the Set works correctly, only the Get causes the error.I would like to know what I am missing/misunderstanding and am open to other suggestions of handling retrieving the current value of a bindingsource in a user control.
Using Visual Basic 2008 Express. I need to pass a variable to another form. Or else make the variable visible to both forms.
View 4 RepliesI am using vb2008.net express,I test vs2005term it work, can any tell me what is the input variable and output variable of this terminal?how to catch the input and output variable to a textbox1 for sending and a textbox2 for receiving when I press send button? is that possible?
View 1 RepliesI have the following code that I am using to parse out a test file. I am getting variable conversion error in Sub Main() when I assign file = Read(). The return value of Read() is a TextFieldParser type. How do I assign the proper variable type to "file" so I can write the output to a text file?
Function Read()
Using MyReader As New FileIO.TextFieldParser("C:UsersColinDesktopParse_Me.txt")
Dim currentRow As String
[Code].....