vb

why did microsoft create vb?

why did they? i mean most of their programs uses c++ like ms office and their ie. ...

ODBC VB Throwing syntax error

I cant see what is wrong with my SQL statement syntax code is here: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Using Con1 As New Odbc.OdbcConnection("Driver={MySQL ODBC 5.1 Driver};Server=127.0.0.1;Database=MyGame;User=root; Password=MyPasswordWhichIWontTellYou;") ...

VB, Using HTTP GET, auto save file to desktop

Hi, sorry i'm very new. I would like to write a application with a button. This button once click it will use "HTTP GET" through TCP to get a file and it need to AUTO save file as "DateLog.txt" and save to desktop. When i tested using Send HTTP GET Tool the response headers is: Content-type: application/x-download Content-Dispo...

Method 'ownerDocument' of object 'IXMLDOMElement' failed

I have a VB6 COM+ component which is being accessed via IE6. When running normally it works as expected, but when I am debugging in VS6 I get an error: Method 'ownerDocument' of object 'IXMLDOMElement' failed The code is as follows and it fails on the last line of this snippet: Private m_ndContract As MSXML2.IXMLDOMNode ... Dim ndEl...

file modified date , vb dotnet

I have a number of files in a folder, I need to get the last modified date. So I used FDate = IO.File.GetLastWriteTime(FName) Works fine with some files, but on others, I get a date of 1/1/1601. But when I check the files in Windows Explorer, all the dates look normal (recent). So, I'm gessing there are multiple files dates stored in ...

vb forms button control

very basic question. I have 3 forms. one main form with two buttons, that need to open one of the other two forms on clicking the button. Now when say button 2 is clicked then form 2 should open and also form form 2 person should be able to click back and come to main form. how can i do this? ...

LINQ to SQL - How to "Where ... in ..."

I want to use linq to sort a resultset. The resultset should contain all items which has it's code also in the given array. To make this a bit clearer, in sql this should be: select * from tblCodes where CodeSort in (0, 2, 3, 5, 6) Now I want to do the same thing in LINQ but I can't seem to pull it off.. I've tried Contains, but that ...

Mixing VB5 and C# in a Windows Form application

I'd like to add a window to my application. Is it possible to "extend" an old vb5 project using C#? Is it easy to do and maintain and is it a good practice ? If not, what are the alternatives? ...

How to call a function dynamically

I have in vb a selector Dim ver =101 Select Case ver Case 101 upd101() Case 102 upd102() Case 103 upd103() End Select How can I make this select better by calling function in more dynamically in this form: with the prefix "upd" followed by a ver integer..? thank you! A...

Calling a Visual Basic DLL in C++

I have acquired a DLL that was created in Visual Basic from a third party vendor(Sensor DLL.dll). This DLL contains functions for talking to a sensor, and I need to call these functions from a Visual C++ program I am writing. The vendor will not provide a header file, and I do not know Visual Basic. If I had a header file this would b...

VB: Start from specific line for SQL INSERT

Hi everyone, I have a small VB program I am doing, however I have run into a problem I can't seem to figure out. Currently my code reads a file line by and line in a loop and does some processing stuff such as SQL INSERT, however the file I'm reading from has a large portion that is configuration at the top and the data at the bottom. ...

Call VB method in C# using Interop

Okey here's the situation: I've got a microsoft excel macro in vb that I want to call using C#. I've already tried creating a workbook using Microsoft.Office.Interop.Excel, however I don't want to have to run an excel process to run the macro. So then I thought why not make a vb class library with my code in it so i can still run it an...

VB Set a timeout for every page in the webbrowser elemen

Hi To all dear coders, today i have writed because i'm in very i can't find any good functions in Visual Basic 2010 for add a timeout in every page loaded by webbrowser.. I would like for example that.. My webbrowser navigate to a page,that page need 40 seconds for full load but i would like setup a timeout of 30 seconds that ...

WinSock sends escaped request?

Hi, I use VB 6 but the POST request variables being sent escaped i mean it adds backslashes before quotes, is that normal? how to fix it? Thanks ...

InputFile.PostedFile.ContentLength Units of measurement

Please can you tell me the units measured by InputFile.PostedFile.ContentLength . I need to make sure the file is less than 500k. Thanks. ...

replace last part of a string in directory address

i have this as a string that shall come in - C:\abe\123-anb\porl\xyz.gif I want to replace the xyz.gif with abe.zip how can i do this in vb? ...

VB OracleTransaction Not Rolling back

Hi, I'm calling a third party stored procedure in Oracle from VB that is not rolling back. Code first (I'm simplifying): Connection string: String sqlstr = "SERVER=x.x.x.x;Database=db;uid=sa;pwd=admin;Connect Timeout=60; Min Pool Size=5; Max Pool Size=100;"; The call (I've just forced a rollback immediately after the execute to tes...

AndAlso in VB Linq query, doesn't seem to be working.

The below query fails with Null Reference Exception when there are elements in BOMIDs where MatID property is nothing. I thought the 'x.MatID isnot Nothing AndAlso' would prevent the x.MatID.Process part of the where from being executed. There are a couple elements in the BOMIDs collection that where MatID is nothing. Any thoughts? Fro...

WatiN with proxy

I've been doing some testing with WatiN lately. For one of the tests I will need to use a proxy to perform the tests. I can set the proxy manually from IE, but I want to do it programatically. In the past I've had success setting proxy for webbrowser control using the code from here http://social.msdn.microsoft.com/Forums/en/Vsexpressvb...

WatiN with webbrowser

I'm using the following code to bind watin to a webbrowser on the winform. Dim w As IE = New IE(WebBrowser1.ActiveXInstance) Settings.AutoStartDialogWatcher = False w.GoTo("http://google.com") I can see from wireshark that the page get's loaded, but the form is frozen until a exception gets thrown "Timeout while Internet Explorer busy...