I am not quite clear as to why or when to use Interfaces. Can someone post a complete, simple and small example of an Interface using VB.NET in a Console Application. How is it extensible?
I am using 3.5 framework of VB.NET 2008.
I have some textboxes in my form. I want the tab like behavior when my user presses ENTER on one of my textboxes. I used the following Code:
Private Sub txtDiscount_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtDiscount.KeyPress
If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
SendKeys.Send("{TAB}")
e.Handled = True
End If
End Sub
But It doen't work for me.
Please give me a solution.
hi, Im trying to return the value contained in a datagridview cell upon clicking on the cell. can anyone please show me how to do this using vb.net?thanks
I am an experienced C/C++/C# programmer who has just gotten into VB.NET. I generally use CType (and CInt, CBool, CStr) for casts because it is less characters and was the first way of casting which I was exposed to, but I am aware of DirectCast and TryCast as well.
Simply, are there any differences (effect of cast, performance, etc.) between DirectCast and CType? I understand the idea of TryCast.
I'm using Dundas Chart Profession within my VB program to generate a chart based on my data. Right now I have my charts opening fine but I am unsure how to add the functionality to let the user choose to print (and export) the chart once the program is running.
In order to return a value from a VB.NET function one can assign a value to the "Functions Name" or use "return value."
I sometimes see these inter-mixed in the same function. Personally, I prefer the return.
My question is, what is the internal difference, if any, between the two?
this is my function for plotting a graph in vb.net how I'm going to replace the ("Jon", 10),("Jordan", 30) with a value that i search from database ?
Private Sub chart_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chart_btn.Click
Chart1.Series("Student").Points.AddXY("Jon", 10)
Chart1.Series("Student").Points.AddXY("Jon", 10)
Chart1.Series("Student").ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar
End Sub
in VB.NET How can i write a memory stream to browser.My memory stream object has data to build a PDF file.Now i want it to be rendered on browser.How to do that ? Thanks in advance
this code is supposed to be used in VB. port number and IP address is available. how to prevent packets from entering is to be known. Its similar to the work a FireWall does.
i published an application in vb.net. the user will be able to install the application anywhere they choose on the computer (or perhaps not anywhere they choose but where ever the default location is). how can i programmatically get the location where the user installed the application? another words i need the application to know where it is running from. how do i detect that?
Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
in vb code-i used namespace and a class.
In VB, i use SetWindowPos API. It makes form on top of other windows, but the form lost focus. so, i use mouse_event API. I force the position of mouse to click somewhere in the form.
Anyways, I need any help to keep form on top and its focus of other windows.
I've run the following command in the Ubuntu terminal -
sudo apt-get install mono-develop
Now how can I run *.vb and *.cs programs using the terminal - What is the command that need to be given?
Does the syntax vary when we write code in Windows & Linux environment?
i have a problem in inserting the listbox value into mysql database in vb 2008 i.e
if i select a video file i.e D:\videos\video1.mpg and add a msgbox() event before inserting into data base it shows the exact path i.e D:\videos\video1.mpg but when i check my database it shows me as D:videosvideo1.mpg how can i solve that
hi .. im want to learn how to build a web service using vb.net.
unfortunately i could find any websites that provides good tutorial..
can any one suggest a web site? thank u in advance ..
When I am concatenating object values together to form a string in VB.NET, is there a difference in performance or a recommended best practice between using the & concat or the + concat with calls to .ToString() on each object?
Example (which is faster or best practice):
Dim result1 As String = 10 & "em"
Dim result2 As String = 10.ToString() & "em"
I have a dictionary collection as bleow:
mydic.addvalue(key1, val1)
mydic.addvalue(key2, val1)
mydic.addvalue(key3, val1)
mydic.addvalue(key4, val2)
mydic.addvalue(key5, val2)
From the above dictionary I want to delete all the entries where value == "val1", so that the result would have only following entry:
mydic.addvalue(key4, val2)
mydic.addvalue(key5, val2)
My VB source code is on VS2008 and targeted for 3.5
my issue is i need to wait 3-4 seconds after a button has been pressed before i can check for it, here is my code under button1_click:
While Not File.Exists(LastCap)
Application.DoEvents()
MsgBox("testtestetstets")
End While
PictureBox1.Load(LastCap)
I think i'm doing something really simple wrong, i'm not the best at VB as i'm just learning so any explaining would be great!
~Thanks
I am debugging a VB 6.0 program that is using XML methods, etc...
so I wish to be able to see how these XML variables in my program look like when I am debugging it ... How can I do that?
I want to setup values for a combobox in vb.net through code. But I don't know what's the code for setting it up. please help.
I want to do something like this:
if combobox1.selecteditem="1" then
combobox2.values=("x", "y", "z")
end if