Feeds:
Posts
Comments

Archive for the ‘VB.NET’ Category

write file in vb.net

Dim fs As New FileStream (“test.txt”, FileMode.Create, FileAccess.Write)
Dim s As New StreamWriter(fs)
Dim length As Integer
s.BaseStream.Seek(0, SeekOrigin.End)
s.WriteLine(“This example of using file handling concepts in VB .NET.”)
s.WriteLine(“This concept is interesting.”)
s.Close()

Read Full Post »

read file in vb.net

Dim fs As New FileStream (“test.txt”, FileMode.Open, FileAccess.Read)
Dim d As New StreamReader(fs)
d.BaseStream.Seek(0, SeekOrigin.Begin)
While d.Peek() > -1
 RichTextBox1.Text &= d.ReadLine()
End While
d.Close()

Read Full Post »

print a datagrid

<html>
    <head>
        <title>Data Grid print test</title>
        <script language=”javascript” type=”text/javascript”>
       
            function showReport()
            {
                var divGrid = document.getElementById( ‘divGrid’ );
                if( divGrid.innerHTML != ”  )
                    window.open( ”, ” ).document.write( divGrid.innerHTML + ‘<input type=”button” onclick=”window.print();” value=”Print”>’  );
            }
        </script>   
    </head>
    <body>
    <div id=”divGrid”>
        ”put your datagrid here to test
    </div>
    <input type=”button” value=”Click me” onclick=”showReport();” />
    </body>
</html>

Read Full Post »

« Newer Posts