In .net how do I fetch object's name in the declaring type. For example...
public static void Main()
{
Information dataInformation = new Information();
}
public class Inforamtion
{
//Constructor
public Inforamtion()
{
//Can I fetch name of object i.e. "dataInformation" declared in Main function
//I want to set the object's Name prop...
i have a web application for video uploading,In that i want to show the video in the link click.i wrote a function for to show the video.i want to pass the id of video into the function .How can i Do that?
Can any one help Me?
This is my code
Private Function
GetSpecificVideo(ByVal i As Object) As
DataTable
...
I'm currently using VS2008 and VB.NET.
When I attempt to populate a Queue that has not been instantiated with objects, the program simply hangs without throwing an error.
I have run into this issue multiple times in different parts of the program in the past few days.
What could be the cause of this?
Here's the code:
Structure Conso...
Background
I have decided to do my graduation project (yet to start) in .NET. Regarding it, I am bit confused about: what language should I learn: VB.NET or C#?
What I have learnt from those who know it that both VB.NET and C# have:
The same concepts
VB.NET is simpler as it is more like English statements but also C# is simple too...
Hi, I'm trying to upload a file via FTP from my local computer to an FTP server, which is also on my local computer at the moment. I've got this sub I'm calling:
Public Sub UploadFTPFile(ByVal ftpservername, ByVal fullfilepath, ByVal filename, ByVal username, ByVal password)
Dim clsRequest As System.Net.FtpWebRequest = _
Di...
hello im using asp.net with vb and sql server 2005.
i have DataSet with 3 tables in it and i want to asign all 3 tables into one DataView
i know its possible to assign each table seperatly by doing this:
Dim dv as New DataView(ds.Tables(i)).DefaultView
but i need all the tables in the dataset and not only the i based index table
i ...
Using vb.net 2008
I want to display a table in the form, so i want to use the controls like grid view, datalist view, list view, repeater. From the above four control which is more flexible.
Before I used list view in vb6. But in vb.net 2008, i don't no which control i have to select.
I tried a same list view in vb.net, But i don't h...
If i declared a variable as public in a web page, does this variable can hold the same value between different sessions, or each session has its own copy?
And if yes it holds between sessions, how to prevent that? is there an attribute to declare as for one session copy?
May be its a silly question? but i am confused about something..
...
How can I get the color of a pixel at the location of the cursor? I know how to get the mouses position using MousePosition but I can not figure out how to get the pixel color at that location.
...
I have a class with a Property called 'Value' which is of type Object.
Value can be of any type, a structure, a class, an array, IList etc.
My problem is with the setter and determining whether the value has changed or not.
This is simple enough for value types, but reference types and lists present a problem.
For a class, would you as...
I'm trying to make a thumbnail toolbar button (TTB from now on)visible when the it is clicked. I know how to do stuff when it is clicked, AddHandler etc. But if I tell it TTB.visible=false then it doesn't become invisible. If I put TTB.enabled = False it will be disabled, so it's only the visible that isn't working.
Also I put a button...
Hi, this is probably a nobraner, but I can't figure it out.
I've got this function which converts wav files to mp3. I call this from my button_click handle. The thing is, when the conversion is started, the rest of the code in the button_click handler continue, while the conversion is happening in a different thread.
Now, I need the r...
Hello,
I am inserting a record to a MSSQL table using a tableadapter using something like:
Dim da_mytable As New t_mytableTableAdapter
da_mytable.Insert(xxxx,xxxx,xxxx)
The SQL table has an identity field which is also the PK for the table.
The insert works fine, but my question is how to return the ID that was used on the insert.
Th...
List1 in the following example is a SortedList(Of MyClass) and contains 251 members.
The first two codeblocks execute in 15.5 seconds.
1:
For cnt As Integer = 1 To 1000000
For Each TempDE In List1
Dim F As String = TempDE.Key
TempDE.Value.x1 = 444
Next
Next
2:
For cnt As Integer = 1 ...
How to I pass this to SQL Server, it seems to want the "Go 4" on a second line?
Insert Into tbl Values (896,0) GO 6
...
Using VB.NET
Windows Based Application
In my software I am using a login page, with a textbox for username.
First time am entering the username and password in my software, next time I run my software the last entered username should automatically appear in the login page.
In VB.net, How to do this?
...
Using VB.NET 2008
Am using Datagridview in my application, Datagridview should display according to the windows screen size, Before I used vb6
code.
Private Sub Form_Resize()
On Error Resume Next
If Me.WindowState = vbMinimized Then
Exit Sub
End If
listview1.Top = 1550
listview1.Left = 0
If ScaleHeight >...
I would like to know how can I use tinyint in SQL Server 2005 with VB.NET. Please let me know if someone know all data types in SQL Server 2005 are matching to which VB.NET Data types. I face that problem now.
For example: tinyint in VB.NET, money in VB.NET, smalldatetime in VB.NET.
Thanks you all in advance!
...
Dim MyQuery = From c In xdoc.Descendants() _
Where c.Attribute(OriginY) IsNot Nothing _
Order By Val(c.Attribute(OriginY).Value), Val(c.Attribute(OriginX).Value) _
Select c.Attribute(UniStr)
Right above you can see my First! linq attempt! And here comes my first question.
How can i select more than one column in a linq query in vb.net...
I'm at a brick wall!
I have a teperature PCB that reports the temp back via serial port.
I can open Hyper Terminal and receive all the data I want - so I know the unit is working... but I want to create a VB app so I can use the data received.
When I run the program I get this error:
System.TimeoutException: The operation has timed o...