vb.net

List ms sql data in vb.net

I got no errors in the code now, but it doesn't seem to work. The only thing that works is when I try to list all the data. But when I try to narrow the data that is to be listed. I get no good results. Here is my code: If ComboBox1.SelectedItem = "School" Then Dim connectionString As String = "Data Source=SENBONZAKURA\SQL...

Updating placeholder during runtime

Hi Everyone, here is the problem I am having with placeholder: I have a repeater and within that repeater, I have an item template. Now this template is formatted with a couple of tables, but for this question I have removed them to make things easier to read: <asp:Repeater ID="Repeater1" OnItemDataBound="R1_ItemDataBound" runat="serve...

ASP.NET with MS Chart disable the vertical line

Hi, I have a graph created with MS Chart like the following picture. As you can see the vertical lines are messed up with value of the top of each bar. Here's the mark-up for the graph: <asp:Chart ID="chtNBAChampionships" runat="server"> <Series> <asp:Series Name="Championships" YValueType="Int32" ChartType="Column...

File Load Exception on application startup

My application has encountered a problem and needs to close. Of course Microsoft is sorry for the inconvenience, but how am i supposed to debug my app? Which dll fails to load? The error report contains between others, system.io.fileloadexception How do you handle situations like these? ...

Current line and column numbers in a RichTextBox in a Winforms application.

How do I get the current line and column numbers in a RichTextBox in a Winforms application? NOTE Folks, I just want a simple solution, if it's available by someone and he's willing to share it with us, and not links to do research! Just give me some code please! Otherwise, I'll have to buy a control... ...

How do you determine if there is an error when using the VB.Net Shell Command?

I'm using a VB.net process to shell another exe process (which will wait until completion before processing is continued in the main app); however, I need to know if there is an error in the shelled exe process before continuing in the main app. Is there a way to do this? ...

Designer serialization persistence problem in .NET, Windows Forms

ETA: I have a similar, smaller, problem here which, I suspect, is related to this problem. I have a class which has a readonly property that holds a collection of components (* not quite, see below). At design time, it's possible to select from the components on the design surface to add to the collection. (Think imagelist, but instead ...

vb.net vs. framework

What reasons are there to migrate from vb.net specific language to .net framework language? Examples: VB.net ubound msgBox .Net Framework array.getUpperBound(0) messageBox ...

Moq + VB.NET - will it be fully supported in VS2010 automatically in its current form?

Hello, We are looking to make a final decision on our Mocking framework. After trying several, I have fallen in love with Moq. I also love TypeMock - but because we are in the early stages of implementing TDD across the team, we do not want to make such a large investment quite yet. We are using VS 2008 now and are going to move to 2010...

VB.NET For Each steps into loop body for an IEnumerable collection! How? Why?

This is weird. I have a class that inherits from IEnumrable whose Count property is reporting 0 (zero) elements but the For Each loop steps into the loop body and tries to use the variable where it should just be moving on. My code: On Error Resume Next Dim d As Foo For Each d In fooCollection ' use d and throws an e...

Problem with persisting a collection, that references an internal property, at design time in winforms, .net

(I've answered the question below with a hack. I'm fairly confident in it unless MS change the way that codedom serializers the designer code.) ETA2: I've worked out what is going on. I wondered why sometimes it would work and not others. It boils down to the name that I give to the internal property and the collection. If I rename th...

Virtual microphone, networks and vb.net

I would like to add a virtual microphone (similar to how you can have a virual CD drive and then mount ISO files on it.) so that it can be selectable in programs like MSN and skype. But have the source of the audio be streamed from over a network(I know how to stream the audio over the network in VB.net) but how do I get that audio which...

after running insert or update query, need the last inserted record and compare in vb.net sql server

i have 2 queries in vb.net with an if clause - if x=0 then insert into table1 else update table1 both queries have 5 fields. now what i want to do is after this insert or update takes place, i need to look at this inserted/updated record and compare it with another table (table2). Especially for update, i have 5 fields in both tables. i...

How do I send keystrokes to a serial port in vb.net?

I am trying to send a ctrl-x keystroke to COM2 and I ahve to code to open the port and read and write but when I tried to send Chr(Keys.ControlKey + Keys.X) it did not work. any ideas? ...

Get all folder / directories list in VB.net

Hi, this is my first Stackoverflow question, im learning VB and having a few problems with getting a list of all folders/directories on the system, im using the code included here and it seems to work until it hits the recycle bin folder, and some other system folders Sub main() Dim DirList As New ArrayList GetDirectories("c:\"...

How do I import and call unmanaged C dll with ansi string "char *" pointer string from VB.net?

I have written my own function, which in C would be declared like this, using standard Win32 calling conventions: int Thing( char * command, char * buffer, int * BufSize); I have the following amount of VB figured out, which should import the dll and call this function, wrapping it up to make it easy to call Thing("CommandHere",GetDat...

snapshot of website with provided URL address, through vb.net code

i have seen google chrome, whenever you open a new tab, it will show you the last 8 pages that you have visited. I want to do a similar thing, except i have a vb.net code behind the .aspx file, which shall give me a list of URL's called form the database. When the page is loaded the URL's are displayed on it. what i need my code to do is...

How to access GMAIL for storage in custom CRM using SQL Server DB?

I have a client who wants his custom-written CRM to be able to access his sales people's emails so that, effectively, a history of email conversations between customer and salesperson is stored inside the CRM's database. The CRM is written in VB 2008 and the database is SQL Server 2008. The only email these people use, in the shop an...

Cannot execute a program. The command being executed "dqiitg0c.cmdline"

i have used impersonation in this application. whenever this error occurs i required to restart the IIS.. please guide me to solve this issue. Error: Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\csc.exe" /noconfig /fullpaths @"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\T...

DataGridView not displaying data in ToolStripDropDown

I'm utilizing the code posted by Jesper Palm here: http://stackoverflow.com/questions/280891/make-user-control-display-outside-of-form-boundry /// <summary> /// A simple popup window that can host any System.Windows.Forms.Control /// </summary> public class PopupWindow : System.Windows.Forms.ToolStripDropDown { private System.Window...