Byval is a way of passing parameters in by Value. This means that if you have 2 variables, a and b, and you pass them into a function with a=1 and b=2:
private sub function1(byval a as integer, byval b as integer)
a=50
b=60
end sub
Once you get out of this function, a will still be = 1, and b will still be = 2. If you were to use ByRef instead of byval... once you get out of the function a would...
User Profile
Collapse
-
Read .vb file like a text file
I am trying to write a program to count the number of lines of code in my project (by just opening the .vb files). But, i cannot find a way to open a vb file, because they are not in binary format as a text file is (I'm guessing). How does one go about doing this? -
can you post some code, and/or the exact error message you are getting?Leave a comment:
-
seriously.. use the publishing wizard.
publish it to a server, run the setup on the client machines.Leave a comment:
-
if you want to move to the first or last.. do something like this:
dim firstRec, lastRec as integer
firstRec = 0
lastRec = DataSet1.Tables ("TableName").R ows.Count - 1
DataSet1.Tables ("TableName").R ows(firstRect). ...
DataSet1.Tables ("TableName").R ows(lastRec)...Leave a comment:
-
Publish Application
I'm a bit confused by the whole process of publishing an application from VS 2005. I have no problem with publishing a simple application and running the setup file, but the part I can't figure out is the updates.
I want to publish the project to a location on the server, and have it installed on each client machine necessary. From here, I want the application to update automatically from the server whenever changes have been made... -
haha yea.. i finally figured that out yesterday. I always do that and somehow I forgot to, and completely forgot about that property. thanks!Leave a comment:
-
That does make the grid more aesthetically pleasing, to me, but it does not remove the last row. The only reason I'm having a problem with this, it because I format some of the columns, such as currency or date/time formats. So on the Currency fields, a value of 0.00 comes up in the new row, which will just confused people.Leave a comment:
-
and get the 'SelectedFolder ' property after it has been opened
Dim fDialog as new FolderBrowseDia log
dim folder as String
if (fDialog.showDi alog() = ...OK)
folder = fDialog.Selecte dFolder()
end ifLeave a comment:
-
One solution that comes to my mind is to add another column and automatically assign a value to it, making this new column the primary key. Make it auto_number, or incremented, so that it increments by one for each value.Leave a comment:
-
Also... I tried to hide it via brute force, by making the last row of the grid not visible, and I got the following error message:
Uncommitted new row cannot be made invisible.Leave a comment:
-
Hide New Row in Datagridview
Is there a way to hide the last row, the one with a *, which is there to represent a new row? I figured there would be a property to set to false, but I haven't found anything. anyone know? -
I don't think you have to specify which table the data is coming from, just say ComboBox1.Value Member = "firstname" .
if this doesn't work, you might have to say
ComboBox1.Value Member = ds.Tables(0).Co lumns("firstnam e")...Leave a comment:
-
I always clear out my variables at the end of a function, and i just say DataSet = nothing, or whichever type of table you are using, and I've never had a problem with it. It would only throw a null reference exception if the data table was already null and you were trying to access it.Leave a comment:
-
to set the values to the current date if none is selected, you say calendar1.value = Date.Now, or something to this effect....Leave a comment:
-
are the strange characters 'line breaks' ? try comparing against or replacing vbcrlf or something like this. I remember when dealing with CSVs in Java, that the character or character string for line breaks was something strange.Leave a comment:
-
bplacker replied to Object reference not set to an instance of an object. for Listbox1.SelectedItem.Textin .NETI have gotten this error when there is no item selected from the list. I solved it by saying ListBox1.Text instead of ListBox1.Select edItem.TextLeave a comment:
-
No activity results to display
Show More
Leave a comment: