Is there any way to like 'dim obj as _______' and then control real objects with it? Like...
obj = text1
obj.text = "blah"
..and it work?
Yes. It's not generally done, and will probably make your code more difficult to follow and understand when you are trying to add/update things later..... beyond that, as was mentioned in another thread, you'll be using more memory (to create an object variable to an object that already exists) to work with data and store data that already exists in the object. HOWEVER, it CAN be done. Here is a small example that I just built, with nothing but a form and a textbox..... in the form_load, I put this:
Dim x As Object Set x = Text1 x.Text = "hi"
And the .text property of the text1 textbox has changed to "hi". Again, I advise against this method for a large number of reasons, but certainly it can be done, and will work.
Is there a way to do like...
winsck1.senddata ("Text1") dim x as object winsck1.getdata RecData set x = RecData x.text = "hi"
because I can't seem to get it to work.
No... recdata is a variable that will contain information received from a socket. It is, in no way shape or form, an object. I don't understand what you are doing, or trying to get accomplished, but let me lay out how this reads:
1. Send The Literal String (send the word) "text1" across the network
- if you are trying to send the data that the user typed into text1
-across the network, you would do
winsck1.sendata text1.text 2. declare X as an object variable
3. read data from the network, and store it in a variable called RecData
4. Try to set an object variable to the value stored in RecData
-set binds a variable to the specified object.
-you can not bind an object to a variable value....
-the RecData variable has no .text property, no enabled property
or any other kind of property.... it's just a variable that holds a
value, not an object variable.
5. Try to set the .Text Property Of the Object Variable X to "hi"
-Since You can't set X (an object variable) to a scalar variables
value, this will fail, if the line before it did not terminate the
program due to errors.
I do understand, however, what you are trying to do. You want to send an object reference across the network, and then use that object reference on the receiving machine. The problem is, the receiving machine wouldn't have that object reference.....
Well, it's kind of like a chess game. I was trying to just send the peice the other person selected and turn it into an object, but I guess I just have to keep using alot of if's, heh.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.
This is the result of previous question answered :
code for the listbox - datagridview interaction
At the top of the code ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...