What Is Meaning Of A Question Mark Or Ampersand After Object Names
Jan 29, 2012
what is the meaning of the Ampersand after Boolean in "Result as Boolean"? Also I have seen a question mark after Boolean in some 'Dim' statements. What does that mean?
View 3 Replies
ADVERTISEMENT
Jan 30, 2010
I'm having problems regarding using arrays on object names. for example, i have a textbox named txtBox1.text and a array declared as a(2). I what to transfer the value of the textbox to the array using loop.[code]
View 2 Replies
Jul 15, 2011
Is it possible to construct the name of an object (in this case, a Panel control) at runtime?
What I want to do is change the Backcolor of one Panel that is a member of about fifty panels. I can get the string of the name from the Sender in a RadioButton CheckedChanged event. So what I want to do is something like:
PanelName = sender.parent.name & ".BackColor"
PanelName = Color.Red
(I realize that the syntax above is invalid. I'm just using it to try to get the idea across.)
I can do what I need with big, fifty-element Select Case blocks, but the code is so repetitive that I was hoping there was a more elegant way.
View 7 Replies
Apr 10, 2010
For my assignment i need to list all the objects and their names. Surely i can get a list because typing out 150 names seems a bit ?
View 7 Replies
Oct 6, 2008
This is my first post here at Xtreme VB Talk. I just started programming 2 semesters ago. I am currently working on a program but I am having a little trouble with the length. I am trying to take the integer entered in a text box and using it inside the name of another object.
[Code]...
View 5 Replies
Jun 18, 2009
project i'm working on for school. Need to make a grade calculator thing but I'm trying to make my code more efficient.
This is what I have at the moment:
txtID.Text = ListBox1.SelectedIndex
txtFname.Text = namesarr(ListBox1.SelectedIndex, 0)
[code].....
View 8 Replies
Mar 15, 2012
I don't know if I explained this in my title, this is what i want to do. (In VB on a active server page) I have 5 buttons called but1.....but2. Right now I have the following code to make them invisible
but1.Visible=false;
but2.Visible=false;
but3.Visible=false;
but4.Visible=false;
but5.Visible=false,
Is there a way to access the objects by using a string, example
for(i=i;i<6;i++
items("but"+str(i)).visible=false
View 1 Replies
May 2, 2012
I've Created a Table in my Database "T_OPTIONS"
my table looks like this.[code]...
View 3 Replies
Jul 18, 2009
I am trying to view all the properties of this:
Dim IISOBJ = GetObject("IIS://LocalHost/W3SVC/1")
For the life of me I can't figure out how to display all the property names of this object.
View 3 Replies
Mar 2, 2010
I want to write a routine that loads a table (or query) and outputs it to a text file, with the field names in the first row.If I load the data via an adaptor class into a datatable, I can access the field names by something like DataTab.Columns(i).ColumnName.
As I only want to read the data from the table, using SqlDataReader would be more efficient. But how can I then find what the header or column names are? The following code fails with a message that the SqlDataReader class does not have a member called 'Columns ':
Dim sqlCmd As SqlClient.SqlCommand = New SqlCommand(SQL, Connection)
Connection.Open()
Dim Reader As SqlClient.SqlDataReader = sqlCmd.ExecuteReader()
Dim FName0 As String = Reader.Columns(0).ColumnName() '<==FAILS
Is there a way to find the column names of an SqlDataReader object?
View 2 Replies
Nov 24, 2011
In my program I have a linklabel that is used for local directories and it gets the directory from an XML file, but whenever there is an ampersand in a directory name I get errors. I've tried adding "ToString", having two ampersands (&&), and puting quotes around the directory in the XML file, but it doesn't work. Is there any way for it to treat the ampersand as a regular character? Here's the code that pertains to the directory path
'this part loads the xml file and sets the inner text to the proper variable
'let's pretend the directory in the XML file is "C:\foo & bar\"
doc.Load(Application.StartupPath & "\Anime\" & title)
[Code].....
View 9 Replies
Apr 18, 2012
I've tried:
Const amper As String = "" & ""
ToolStripButton1.Text = "Save " & amper & " Close"
and also replacing the "amper" with Char(38), but it doesn't show up. This is the full
Private Sub Dialog1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Save and close button text
Const amper As String = "" & ""
ToolStripButton1.Text = "Save " & amper & " Close"
End Sub
Am I using both methods wrong?
View 2 Replies
Sep 1, 2009
I'm trying to create an export Excel/CSV function that will iterate through a custom object and first output the property names and then output the values. I want to use reflection only where necessary so I'm attempting to save the property names when I output the headers and then reuse them to print the values. Is this possible? I'm a little weary of using reflection in a loop but is there a better way?
[Code]...
View 2 Replies
Aug 13, 2010
There are issue with using WebBrowser late bind calls related to object/property names generation.For example:
WebBrowser1.Document.DomDocument.Forms.Myform.mycontrol.Value = "test"
will fail with more than one instance of the WebBrowser control.what actually happen is that mycontrol object become Mycontrol and compiled vb.net application will fail with error
Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType,
String name, Object[] args, String[] paramnames, Boolean[] CopyBack)[code].....
Same code will work with vb6 app with multiple WebBrowser controls
Edit: This code is comipled with: Option Strict Off
View 2 Replies
Jan 11, 2011
I have a data table being returned that populates a repeater. One of the fields has the & character in the data and displays perfectly within the asp:literal on the screen. The source shows the & character un-encoded.My question is this: Does it NEED to be encoded? A co-worker is insisting that it must be encoded in order to be "HTML compliant". But it works perfectly for display purposes. Is this REALLY required for any type of compliance that I should even be worrying about?
View 1 Replies
Jul 22, 2011
What's the trailing ampersand on VB hexadecimal numbers for? I've read it forces conversion to an Int32 on the chance VB wants to try and store as an Int16. That makes sense to me. But the part I didn't get from the blurb was to always use the trailing ampersand for bitmasks, flags, enums, etc. Apparantly, it has something to do with overriding VB's fetish for using signed numbers for things internally, which can lead to weird results in comparisons.
So to get easy points, what are the rules for VB.Net hexadecimal numbers, with and without the trailing ampersand? Please include the specific usage in the case of bitmasks/flags and such, and how one would also use it to force signed vs. unsigned.
View 2 Replies
Dec 2, 2009
I have a cookie saved to the user as follows.[code]...
The SearchText stores a value they have input in a previous page. We have observed if there is an ampersand in the cookie (eg Tyne & Wear), then the cookie doesn't save subsequent values (SearchType).
View 3 Replies
Nov 24, 2009
I am running the following code but it is not replacing it:
Dim stItemName As String = txt1.Text
stItemName.Replace("&", "")
txt2.Text = stItemName
View 3 Replies
Feb 25, 2011
Here's my json:
{"d":{"key1":"value1",
"key2":"value2"}}
Is there any way of accessing the keys and values (in javascript) in this array without knowing what the keys are?
The reason my json is structured like this is that the webmethod that I'm calling via jquery is returning a dictionary. If it's impossible to work with the above, what do I need to change about the way I'm returning the data?
Here's an outline of my webmethod:
<WebMethod()> _
Public Function Foo(ByVal Input As String) As Dictionary(Of String, String)
Dim Results As New Dictionary(Of String, String)
[Code]....
View 2 Replies
Dec 21, 2011
Is there a problem with an ampersand in the name of an MSSQL table name.? I'm converting an Access db to MSSQL and a table like Ta&ble1 gets upsized to SQL Server no problem. Do you guys see this as a problem in subs that use a reader when used with a stored procedure that uses this table?
View 3 Replies
Oct 6, 2010
I'm trying to create a form that accepts names (or any strings) as input and stores them in a object. See attached form sample.Form Image:
Operations: ï Initially the NumericUpDown object on the form should be disabled.The user enters a value (string) in the textbox and clicks the Add button or presses the Enter key to activate that button.The application then stores that name in a List object, and displays the last entry in the Label underneath.The NumericUpDown should become enable after the first entry. The user should be able to move between all the values entered using NumericUpDown.
View 7 Replies
May 18, 2009
What is the meaning of having constructors (sub New) in a module, and why must they have no arguments?
View 4 Replies
Jun 18, 2009
Im doing a project something to do with getting the output using serial port.However, I still don't get the meaning of vbCr in my coding.
View 3 Replies
Apr 20, 2010
for example. like a wikipidea or like apple is to eat or something..
View 7 Replies
Feb 17, 2011
whenever we go to code by double clicking on some control so we saw a body of two lines:
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
end sub
View 4 Replies
Sep 1, 2010
get Intellisense in Visual Studio 2005 to display the meaning of individual enum values for a VB.NET project. This already happens for enums that are a part of the .NET library?
View 2 Replies
Aug 28, 2010
i want to know the meaning of false,false in the following code for odbc connectivity using vb6.0.
set db=opendatabase("dsn",false,false;"odbc;uid;pwd;dsn")
View 3 Replies
Dec 1, 2011
what is the meaning of the dollar sign after a method name in vb.net
like this:
Replace$("EG000000", "0", "")
View 3 Replies
Apr 16, 2012
What is the meaning of the square brackets around the name of a property in the definition ?
Example :
Public Property [Date] As String
View 3 Replies
Apr 21, 2010
i have a simple code just have a look End Class
[Code]...
When i add num1 and num2 as above, compiler gave error that -- Operator + is not defined for types "type" and "type".How to define the meaning of '+' or any other operator in such situations?
View 11 Replies