vb

What am I missing to make this piece of Vb code work(VB 2005)

For Each line As String In System.IO.File.ReadAllLines("file.txt") ' Do Something' Next and Using f As System.IO.FileStream = System.IO.File.OpenRead("somefile.txt") Using s As System.IO.StreamReader = New System.IO.StreamReader(f) While Not s.EndOfStream Dim line As String = s.ReadLine ...

Where is "CDO.Appointment"

Hello . I'm using VB .NET 2005 and Exchange Server 2003 installed I have found some code which gives me the ability to connect in an Exchange Server and create an appointment. The thing is that I cannot find the CDO. Appointment. Where can I find it and make the below code to work ? I have tried all the examples with CDO and Outlook. I ...

Is there a way to convert from System.Windows.Forms.HtmlElement to mshtml.IHTMLElemenet3?

Is there a way to convert from System.Windows.Forms.HtmlElement to mshtml.IHTMLElemenet3? --edit after answer accepted -- This is what the code would look like. HtmlElement myElement = getElementByID(id); IHTMLElement3 h3 = (IHTMLElement3) myElement.DomElement; Thanks @korchev ...

How to make mockup screenshots without VB

I am looking for a program to make mockup screenshots with. I first found out I could do it with Visual Basic (uglier names I have yet to hear a programming language being called) from joelonsoftware.com. I don't want to start learning VB now, especially since I am still in the process of learning Java. I then found mockupscreens.com, wi...

Visual Basic 6 IDE syntax checker problem

The Visual Basic 6.0 IDE checks for syntax errors on-the-fly. Every time it finds a syntax error, it pops up an alert dialog. This feature is driving me crazy, as every time I try to cut and paste in the middle of typing a statement, I have to deal with this pop-up. Is there any way to disable this on-the-fly syntax checking? ...

How do you use optional parameters in VB?

How can I create a method that has optional parameters in it in Visual Basic? ...

VB.NET Read current line in a text area?

I have a text area and a function to do syntax highlighting on it. Right now it reads the entire RichTextBox. How would I get a string variable containing the current line? Below is the code i currently have. Private Sub HighLight() Dim rm As System.Text.RegularExpressions.MatchCollection Dim m As System.Text.RegularExpressions....

VB6 Cast Expression

What is the cast expression equivalent of VB.NET's CType in Visual Basic 6? ...

How do I render a ViewPage to a string?

I have tried to implement simple ViewPage caching with ASP.NET MVC, however I cannot get the page to render correctly into a custom HtmlTextWriter when it has a master page. I have tried overriding Render. If I simply call the base implementation, then everything renders correctly. If I render to my own writer and then write that string...

Oracle Advanced Queue with VB help needed

I have attempted to get the advanced queueing code work with no good results. It just doesnt call the callback function when i add a new entry in the queue from Sql Plus or SQL DEveloper. I have put the Callback class as an Active X DLL. Any help is appreciated. Form Level Code Dim S As String 'Create the OraSession Object Set SS = C...

To protect software by accessing harddisk serial no

I want to get the VB.NET or VB code to access the hard disk serial no when starting the program. It's to help me to protect my own software from people who try to pirate copies. ...

Problem with ssOption control in VB6: Text background color changes from Win 98 to Win XP

I'm using the ssOption control (Sheridan 3d Option control) in VB6. In Windows 98 the text area background color is the same color as the background color around the Option Circle, and that color is the default form color. So the Option button appears to be transparent. There is no Background color property and on Windows XP the back...

create databases in ms-access, then delete a particular database. using any vb query or vb code.

i want to create a number of databases in ms-access using a code or any option of ms-access, but i want delete databases also. Please help me ...

How to write a form editor?

I'm trying to write a print layout editor in VB6 or VB.Net, and am looking for some reference articles to help get me started. The idea is that the editor will be used to define print "areas" for invoice or statement layouts, by allowing the user to draw the box for customer address, invoice number, lines, totals etc. The program will ...

LINQ or XSLT to turn one Element into another in Visual Basic 9

Short version: Could anyone suggest or provide a sample in LINQ to XML for VB, or in an XSLT of how to change one XML element into another (without hardcoding an element-by-element copy of all the unchanged elements)? Background: I have an XML file, that I think is properly formed, that contains a root entry that is <collection> and ...

Visual Basic6.0 object cannot drag to move

i am a newbie for visual project,i have downloaded some of the totorial to testing,however i found the object in those project are not able to drag to move or editing, anybody know is it have a object lock function in VB,if got how can i unlock it ...

Visual basic 6.0 hash function

In my application I need to hash a string before I save it to a text file. Does anyone know how to do that? ...

Database Management Using The properties window

Please enumerate the procedure in which a visual basic program can access a database using data control and Active x data object (ADO)? ...

Rewriting eMbedded Visual Basic app

I'm looking at rewriting an eMbedded Visual Basic app I wrote years ago. I'm unsatisified with it because of various problems clients keep having with it now and then over the years, mostly along the lines of the app not loading anymore because a required dll/activex control has gone missing! This is so frustrating and naturally difficul...

Creating a Serial Port in code in VB.net

Hi, I am trying to create a serial port in VB.net using code only. Because I am creating a class library I cannot use the built-in component. I have tried instantiating a new SeialPort() object, but that does not seem to be enough. I'm sure there is something simple I am missing and any help would be greatly appreciated! Thanks! P.S. ...