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
...
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?
--edit after answer accepted --
This is what the code would look like.
HtmlElement myElement = getElementByID(id);
IHTMLElement3 h3 = (IHTMLElement3) myElement.DomElement;
Thanks @korchev
...
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...
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 can I create a method that has optional parameters in it in Visual Basic?
...
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....
What is the cast expression equivalent of VB.NET's CType in Visual Basic 6?
...
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...
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...
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.
...
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...
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
...
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 ...
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 ...
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
...
In my application I need to hash a string before I save it to a text file. Does anyone know how to do that?
...
Please enumerate the procedure in which a visual basic program can access a database using data control and Active x data object (ADO)?
...
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...
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. ...