Ask Your VB.NET Questions Here!


Do you have a question about the VB.NET Language, Compiler or IDE?


If so, then you’ve come to the right place, comment on this post and your question will be added to the list to be answered. Of course, depending on the nature of your comment, and the volume of comments received, we may not get to every question.


Thanks!


Duncan Mackenzie


Comments (137)

  1. SpiderMan says:

    Good for all VB users.

  2. Really a good idea… I hope it could be improved soon.

  3. Let me ask the first one:

    What was the design decision behind the fact that, VB.NET does not support Operator Overloading? How hard it was to implement the feature in VB.NET? Will this feature be in the VB.NET specification in the future?

    Although it doesn’t support building such code, it should at least, in my opinion, support using overloaded operators coded in other languages (C# etc.) rather than using auto generated methods like "op_Multiply".

  4. Amit says:

    I have created a client end user interface in vb6 and my data is in linux server i.e. in mysql now i want to access that data from some other place through that client end program or say from a .exe file. Now my question is what should i do to access that data?

    Second i want to use jsp as middle ware between vb6 and Mysql, is it possible, if yes can any one help me.

  5. Amit says:

    Thanks

    i am looking for something like this.

  6. Amit says:

    Hi..

    Please send your help to me on my e-mailid i.e.

    amit_bhardwaj5@yahoo.com

  7. Corrado Cavalli says:

    Having a VB.NET FAQ (like C# does) it is a very good idea.

    Gohan, VB 2005 will have Operator overloading… 😉

  8. denny says:

    SQL Reporting Services:

    HELP!

    Printer Delivery Sample on Win 2003

    anyone got it to work?

    security settings seem to be the main problem….

    I’ve read the docs, followed the example & walkthru and it just don’t work. 🙁

    time to hack the code into a Win32 Service module cause the ASP.NET settings are just too messed up.

  9. smartees says:

    Bitwise vs Logical

    The ‘and’ and ‘or’ operators continue to be bitwise operators when in 99% of situations a logical comparison is what should be used.

    No vb programmers use the awkward and strange ‘andalso’ and ‘orelse’ operators. These operators aren’t even used in the demo code from Microsoft.

    When the language first came out the ‘and’ and ‘or’ operators were logical and the ‘bitor’ and ‘bitand’ did bitwsise comparisons. This seemed far more sensible than the current situation of everybody doing bitwise comparisons instead of logical.

    Any chane of this changing?

  10. Shawn says:

    I am creating a simple form to display data that is in a SQL Server database. I am using text boxes to display each record. The problem that I am having is that none of the records are being displayed in the text boxes. Does anyone know the code or statements that I need to display the data in the form?

  11. Lasitha says:

    To use Reporting services effectively in our projects we need it to be able to use ADO .Net datasets(Cystal reports have this feature). There’s no extensions available with vb code in MSDN or other codewise community sites.

  12. Ian says:

    I’m trying to port an MS Access app to VB.Net and have run into some tough problems.

    Why no multicolumn combobox??

    Access has always had Continous Forms, VB6 had repeater control. Nothing in .net??

    I realize these are winform issues more than specific vb, but isnt vb supposed to be a RAD tool?

    Ian

  13. Jerry says:

    I have a MDI application, when i open a child form it gives me a list of items in my database, i then double click on an item and it opens up another child form, in that form i can change the values, and even delete items, my problem is that once this is done i want the other form to refresh to reflect what changes i have made. Right now i am having to close the child form then open it up again in order to have it show the changes. Can anything else be done to make this work the way i intended?

  14. Miguel says:

    Any chance of getting an UnmanagedType.ByValTStr that behaves like VB’s fixed-length strings used to? (sans appending the null at the last caracter of the string). The workaround suggested in KB 834056 is pretty messy, and it hardly seems any trouble for the platform NOT to replace the last char with a null. Call it a UnmanagedType.VBByValTStr or something. (Perhaps even UnmanagedType.ByValTStrWithoutAddingTheNullAtTheEndWhichMakesUsHaveToUseByteArraysWhichHaveToBeInitializedWithAStringOfTheExactSize)

  15. Ninputer says:

    Are there any plans to add the ‘reference type constraint’ and ‘value type constraint’ in Visual Basic generics?

  16. Great idea, thanks in advance for the possible anwer.

    How can I document VB.NET source codes like what you do for C#?

  17. yukesky says:

    I used the DataGrid Control in my WinForm,

    but I can’t change the color of ScrollBar in DataGrid.I trid to use the property "Scrollbar.backcolor",but it didn’t work.so tell me How to ?

    thank you.

  18. Emmanauel says:

    Please help me out. i am in a serious problem

  19. pinguy says:

    does VB support Macromedia Flash files?

    Is there a way to communicate between them?

    thanks

  20. jlb says:

    Hi ,

    I’d like to know how to :

    – Share a memory allocated block between different programs

    – clone the fortran ‘Equivalence statement from fortran , ie , be able to see the same variable content with different names , ex : equivalence (array(10),i),(array(11),j) … )

    Thanks

  21. Kashif-MCSD says:

    Can you tell me the CLR supported Operating system.

    the entire listing plz

  22. dlindsay says:

    Is there a way to use direct text to speech with windows xp. I can’t find it.

  23. Mark Moss says:

    I am new to the .NET arena and have the follow HOW-TO question.

    I want to place a ListBox on a WebForm and load it with the names of all the (*.HTML ) files that are in a sub directory of my application on the Server.

    After the ListBox is loaded I want to be able to click on one of the files and display it in a popup box as well as save the name of the selected file.

  24. jgp says:

    From VB.NET I would like to read Milestones, Task Duration, Start and End dates from Microsoft Project based on user input.

  25. Schneider says:

    I use VBcommentor & NDOC to auto create my documentation.

    VBcommentor can be found a http://www.gotdotnet.com

    NDoc can be found at http://sourceforge.net/projects/ndoc/

    This seems to be the best for me. I have Also tried VbDocman, and Custome help builder.

    Eric Schneider

  26. Petr Sťahel says:

    Hi, I need to know what to do for intellisence in js files. When I have slient side js in html intellisence work well, but, when I move this code in js file intellisence don’t work

  27. intrader says:

    Why VB.net does not support field attributes?

  28. James Woollen says:

    By requirement I have string array dimensioned when the form is loaded. I can pass the array to another sub that processes the array… But I need to then reference that sub(2) upon a button.click event.

    How do I reference the array from the button.click sub? i.e. How can I "get" an array rather than "pass" one.

    Thanks.

    James

  29. PiusX says:

    How can I change keyboard layout in Notepad?

    I programing in VB .NET. Thanks for help. Answear me with e-mail.

  30. J.Henshaw says:

    Is it possible to run both VB6 and VB.Net on the same machine,or do I have to remove VB6 to be able to use VB6. I currently use VB6 but thinking of starting out on VB.Net

    Thanks

  31. Tilak says:

    is there any limit for classes in a dll in .Net environment. If there is a limit then how many classes can be there in a .dll

  32. Brian says:

    I am attempting to create a form that get’s it’s data from an Access database – Access 2000, but when I attempt to have the form access the database, I get the following error: unrecongize database format. Why would I be getting this error?

    Thank you

  33. Ganesh says:

    hii , Gmrg

    my Reqt is ,

    i have a parent form and child form ..

    i have one button in parent form it ll show the child form . child form contains dtagrid and fill ths datas..

    ok

    i selected one row and click ok …the corresponding row should bind the parent form datagrid..with out using database

    urgent pla help me

    tks .. for advance

    ur ganesh

  34. ws says:

    how we can use user control

  35. pragnya says:

    how i can convert a vb program into vb.net program?

  36. putli says:

    hii,

    what do u mean by unsafe code.And what is the difference between managed code and unsafe code.

  37. pdt says:

    I have a VB 6.0 application that I have attmepted to upgrade to VB Net using the standard VB Net upgrade facility. I get an error that the SSTab control doesn’t have a design time licence and the application will not upgrade – any suggestions please.

  38. jgirl says:

    I am upgrading to a vb.net environment and developing in asp.net technology.

    I am having a problem using the <link href="filename" rel="stylesheet" type="text/css">

    Does anyone have a work around?

  39. Ben Thomas says:

    Hi there,

    I have 2 Questions:

    1)How do I programmatically delete the Internet Explorer History with VB.NET?

    2)How do I display the contents of Favorites Folder with VB.NET?

    Thanks in advance!

    Ben Thomas

    ben@digitalshop.co.nz

  40. Dave Swigart says:

    I am having trouble programming a change in the connection string. Even if I cut and past the string used when I set up my form, the program gives me the following error:

    "An unhandled exception of type ‘System.Data.OleDb.OleDbException’ occurred in system.data.dll

    Additional information: No error information available: DB_SEC_E_AUTH_FAILED(0x80040E4D)."

    When I run the following code:

    Me.OleDbConnection1.ConnectionString = ConnectionString

    ‘Clear and refill the dataset

    dsTeams1.Clear()

    odTeams.Fill(dsTeams1)

    ‘ Refill the Combo box

    cboTeams.Refresh()

    The error happens when I go to fill the data adapter (odTeams).

    ‘sup with that?

  41. douglas Brunt says:

    web Applications used to start up but I reinstalled the OP and now I get a incoorect share path error when I try to open.How do I fix this ?

    thank you for your great site

  42. sim says:

    i would like to ask:how are autonumbers(server-generated primary keys) handled in a disconnected(.Net) database environment?

  43. Harvard says:

    I have a text file with no delimiters and a SQL Server table. I need to take that data and put it into the SQL Server table. The SQL Server table has several columns. I also have another table in SQL Server that has the field names and start and width of the field.

    I don’t know how to start. I need to put the fixed file data into the SQL Server table based on the layout info in the other SQL Server table.

    Any help would be appreciated.

    Thanks in advance.

  44. Prachi says:

    how to update database in distributed application?

  45. indu says:

    need a code for multiple selecting of check box in datagrid and display the value in textbox

  46. indu says:

    need a code for multiple selecting of check box in datagrid and display the value in textbox

  47. shania says:

    hi i need code for displaying selected item in listbox on the textboxes

  48. Karan says:

    I want to convert the string into date format.

    The below code is in vb.net shape and used in the webpage and then later stored in the db.

    can anyone solve this error in the second statement.

    Dim str_event_date As String = str_monthlist & "/" & str_daylist & "/" & str_yearlist

    Dim str_event_date1 As Date = Format(str_event_date, "MM/dd/yyyy")

    thanks

    karan

  49. mozhdeh says:

    iam a beginner in vb.net and don’t know any thing about try catch.plz guide me.

    thx alot

  50. Ashwani says:

    I have to fetch values from one dataset and then has to pass one of the column values to another dataset.

    How can I achieve this?

  51. Steve says:

    Can I make a call to ‘C’ program in .net?

  52. Alex says:

    Yes you can call ‘C’ Program.

  53. Ed says:

    How do you create a folder programmatically in VB.NET ?

  54. Chris Green says:

    Imports System.IO ‘for FileStream class

    Imports System.Drawing.Printing

    Public Class Form1

    Inherits System.Windows.Forms.Form

    Dim myForm2 As Form2

    #Region " Windows Form Designer generated code "

    Public Sub New()

    MyBase.New()

    ‘This call is required by the Windows Form Designer.

    InitializeComponent()

    ‘Add any initialization after the InitializeComponent() call

    End Sub

    ‘Form overrides dispose to clean up the component list.

    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

    If disposing Then

    If Not (components Is Nothing) Then

    components.Dispose()

    End If

    End If

    MyBase.Dispose(disposing)

    End Sub

    Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox

    Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog

    Friend WithEvents PrintDocument1 As System.Drawing.Printing.PrintDocument

    Friend WithEvents PrintDialog1 As System.Windows.Forms.PrintDialog

    Friend WithEvents PrintPreviewDialog1 As System.Windows.Forms.PrintPreviewDialog

    Friend WithEvents PageSetupDialog1 As System.Windows.Forms.PageSetupDialog

    Private components As System.ComponentModel.IContainer

    ‘Required by the Windows Form Designer

    ‘NOTE: The following procedure is required by the Windows Form Designer

    ‘It can be modified using the Windows Form Designer.

    ‘Do not modify it using the code editor.

    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu

    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem7 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem8 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem10 As System.Windows.Forms.MenuItem

    Friend WithEvents SaveFileDialog1 As System.Windows.Forms.SaveFileDialog

    Friend WithEvents MenuItem11 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem12 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem14 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem16 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem17 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem18 As System.Windows.Forms.MenuItem

    Friend WithEvents ColorDialog1 As System.Windows.Forms.ColorDialog

    Friend WithEvents FontDialog1 As System.Windows.Forms.FontDialog

    Friend WithEvents MenuItem19 As System.Windows.Forms.MenuItem

    Friend WithEvents ImageList1 As System.Windows.Forms.ImageList

    Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar

    Friend WithEvents ToolBarButton1 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton2 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton3 As System.Windows.Forms.ToolBarButton

    Friend WithEvents MenuItem15 As System.Windows.Forms.MenuItem

    Friend WithEvents MenuItem20 As System.Windows.Forms.MenuItem

    Friend WithEvents ToolBarButton4 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton5 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton6 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton7 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton8 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton9 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton10 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton11 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton12 As System.Windows.Forms.ToolBarButton

    Friend WithEvents ToolBarButton13 As System.Windows.Forms.ToolBarButton

    Friend WithEvents MenuItem21 As System.Windows.Forms.MenuItem

    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    Me.components = New System.ComponentModel.Container

    Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))

    Me.PrintDialog1 = New System.Windows.Forms.PrintDialog

    Me.PrintDocument1 = New System.Drawing.Printing.PrintDocument

    Me.RichTextBox1 = New System.Windows.Forms.RichTextBox

    Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog

    Me.PrintPreviewDialog1 = New System.Windows.Forms.PrintPreviewDialog

    Me.PageSetupDialog1 = New System.Windows.Forms.PageSetupDialog

    Me.MainMenu1 = New System.Windows.Forms.MainMenu

    Me.MenuItem1 = New System.Windows.Forms.MenuItem

    Me.MenuItem2 = New System.Windows.Forms.MenuItem

    Me.MenuItem3 = New System.Windows.Forms.MenuItem

    Me.MenuItem4 = New System.Windows.Forms.MenuItem

    Me.MenuItem5 = New System.Windows.Forms.MenuItem

    Me.MenuItem6 = New System.Windows.Forms.MenuItem

    Me.MenuItem7 = New System.Windows.Forms.MenuItem

    Me.MenuItem8 = New System.Windows.Forms.MenuItem

    Me.MenuItem9 = New System.Windows.Forms.MenuItem

    Me.MenuItem10 = New System.Windows.Forms.MenuItem

    Me.MenuItem11 = New System.Windows.Forms.MenuItem

    Me.MenuItem13 = New System.Windows.Forms.MenuItem

    Me.MenuItem14 = New System.Windows.Forms.MenuItem

    Me.MenuItem16 = New System.Windows.Forms.MenuItem

    Me.MenuItem12 = New System.Windows.Forms.MenuItem

    Me.MenuItem17 = New System.Windows.Forms.MenuItem

    Me.MenuItem19 = New System.Windows.Forms.MenuItem

    Me.MenuItem18 = New System.Windows.Forms.MenuItem

    Me.MenuItem15 = New System.Windows.Forms.MenuItem

    Me.MenuItem20 = New System.Windows.Forms.MenuItem

    Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog

    Me.ColorDialog1 = New System.Windows.Forms.ColorDialog

    Me.FontDialog1 = New System.Windows.Forms.FontDialog

    Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)

    Me.ToolBar1 = New System.Windows.Forms.ToolBar

    Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton2 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton3 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton4 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton5 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton6 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton7 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton8 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton9 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton10 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton11 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton12 = New System.Windows.Forms.ToolBarButton

    Me.ToolBarButton13 = New System.Windows.Forms.ToolBarButton

    Me.MenuItem21 = New System.Windows.Forms.MenuItem

    Me.SuspendLayout()



    ‘PrintDocument1





    ‘RichTextBox1



    Me.RichTextBox1.AutoSize = True

    Me.RichTextBox1.AutoWordSelection = True

    Me.RichTextBox1.Location = New System.Drawing.Point(8, 48)

    Me.RichTextBox1.Name = "RichTextBox1"

    Me.RichTextBox1.Size = New System.Drawing.Size(1000, 650)

    Me.RichTextBox1.TabIndex = 2

    Me.RichTextBox1.Text = ""



    ‘PrintPreviewDialog1



    Me.PrintPreviewDialog1.AutoScrollMargin = New System.Drawing.Size(0, 0)

    Me.PrintPreviewDialog1.AutoScrollMinSize = New System.Drawing.Size(0, 0)

    Me.PrintPreviewDialog1.ClientSize = New System.Drawing.Size(400, 300)

    Me.PrintPreviewDialog1.Enabled = True

    Me.PrintPreviewDialog1.Icon = CType(resources.GetObject("PrintPreviewDialog1.Icon"), System.Drawing.Icon)

    Me.PrintPreviewDialog1.Location = New System.Drawing.Point(260, 17)

    Me.PrintPreviewDialog1.MinimumSize = New System.Drawing.Size(375, 250)

    Me.PrintPreviewDialog1.Name = "PrintPreviewDialog1"

    Me.PrintPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty

    Me.PrintPreviewDialog1.Visible = False



    ‘MainMenu1



    Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem11, Me.MenuItem12, Me.MenuItem15, Me.MenuItem21})



    ‘MenuItem1



    Me.MenuItem1.Index = 0

    Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2, Me.MenuItem3, Me.MenuItem4, Me.MenuItem5, Me.MenuItem6, Me.MenuItem7, Me.MenuItem8, Me.MenuItem9, Me.MenuItem10})

    Me.MenuItem1.Text = "File"



    ‘MenuItem2



    Me.MenuItem2.Index = 0

    Me.MenuItem2.Text = "&New"



    ‘MenuItem3



    Me.MenuItem3.Index = 1

    Me.MenuItem3.Text = "&Open"



    ‘MenuItem4



    Me.MenuItem4.Index = 2

    Me.MenuItem4.Text = "&Close"



    ‘MenuItem5



    Me.MenuItem5.Index = 3

    Me.MenuItem5.Text = "&Save"



    ‘MenuItem6



    Me.MenuItem6.Index = 4

    Me.MenuItem6.Text = "SaveAs"



    ‘MenuItem7



    Me.MenuItem7.Index = 5

    Me.MenuItem7.Text = "PageSetup"



    ‘MenuItem8



    Me.MenuItem8.Index = 6

    Me.MenuItem8.Text = "PrintPrview"



    ‘MenuItem9



    Me.MenuItem9.Index = 7

    Me.MenuItem9.Text = "&Print"



    ‘MenuItem10



    Me.MenuItem10.Index = 8

    Me.MenuItem10.Text = "&Exit"



    ‘MenuItem11



    Me.MenuItem11.Index = 1

    Me.MenuItem11.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem13, Me.MenuItem14, Me.MenuItem16})

    Me.MenuItem11.Text = "Format"



    ‘MenuItem13



    Me.MenuItem13.Index = 0

    Me.MenuItem13.Text = "InsertDate"



    ‘MenuItem14



    Me.MenuItem14.Index = 1

    Me.MenuItem14.Text = "Font"



    ‘MenuItem16



    Me.MenuItem16.Index = 2

    Me.MenuItem16.Text = "BackgroundColour"



    ‘MenuItem12



    Me.MenuItem12.Index = 2

    Me.MenuItem12.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem17, Me.MenuItem19, Me.MenuItem18})

    Me.MenuItem12.Text = "Edit"



    ‘MenuItem17



    Me.MenuItem17.Index = 0

    Me.MenuItem17.Text = "Copy"



    ‘MenuItem19



    Me.MenuItem19.Index = 1

    Me.MenuItem19.Text = "Cut"



    ‘MenuItem18



    Me.MenuItem18.Index = 2

    Me.MenuItem18.Text = "Paste"



    ‘MenuItem15



    Me.MenuItem15.Index = 3

    Me.MenuItem15.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem20})

    Me.MenuItem15.Text = "Tools"



    ‘MenuItem20



    Me.MenuItem20.Index = 0

    Me.MenuItem20.Text = "Calculator"



    ‘SaveFileDialog1





    ‘ImageList1



    Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)

    Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)

    Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent



    ‘ToolBar1



    Me.ToolBar1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

    Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton1, Me.ToolBarButton2, Me.ToolBarButton3, Me.ToolBarButton4, Me.ToolBarButton5, Me.ToolBarButton6, Me.ToolBarButton7, Me.ToolBarButton8, Me.ToolBarButton9, Me.ToolBarButton10, Me.ToolBarButton11, Me.ToolBarButton12, Me.ToolBarButton13})

    Me.ToolBar1.DropDownArrows = True

    Me.ToolBar1.ImageList = Me.ImageList1

    Me.ToolBar1.Location = New System.Drawing.Point(0, 0)

    Me.ToolBar1.Name = "ToolBar1"

    Me.ToolBar1.ShowToolTips = True

    Me.ToolBar1.Size = New System.Drawing.Size(992, 30)

    Me.ToolBar1.TabIndex = 3



    ‘ToolBarButton1



    Me.ToolBarButton1.ImageIndex = 0

    Me.ToolBarButton1.ToolTipText = "Open File"



    ‘ToolBarButton2



    Me.ToolBarButton2.ImageIndex = 1

    Me.ToolBarButton2.ToolTipText = "Close File"



    ‘ToolBarButton3



    Me.ToolBarButton3.ImageIndex = 4

    Me.ToolBarButton3.ToolTipText = "Save File"



    ‘ToolBarButton4



    Me.ToolBarButton4.ImageIndex = 2



    ‘ToolBarButton5



    Me.ToolBarButton5.ImageIndex = 12



    ‘ToolBarButton6



    Me.ToolBarButton6.ImageIndex = 8



    ‘ToolBarButton7



    Me.ToolBarButton7.ImageIndex = 11



    ‘ToolBarButton8



    Me.ToolBarButton8.ImageIndex = 18



    ‘ToolBarButton9



    Me.ToolBarButton9.ImageIndex = 13



    ‘ToolBarButton10



    Me.ToolBarButton10.ImageIndex = 15



    ‘ToolBarButton11



    Me.ToolBarButton11.ImageIndex = 19



    ‘ToolBarButton12



    Me.ToolBarButton12.ImageIndex = 9



    ‘ToolBarButton13



    Me.ToolBarButton13.ImageIndex = 10



    ‘MenuItem21



    Me.MenuItem21.Index = 4

    Me.MenuItem21.Text = "Help"



    ‘Form1



    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)

    Me.ClientSize = New System.Drawing.Size(992, 645)

    Me.Controls.Add(Me.ToolBar1)

    Me.Controls.Add(Me.RichTextBox1)

    Me.Menu = Me.MainMenu1

    Me.Name = "Form1"

    Me.Text = "Print File"

    Me.WindowState = System.Windows.Forms.FormWindowState.Maximized

    Me.ResumeLayout(False)

    End Sub

    #End Region

    Private PrintPageSettings As New PageSettings

    Private StringToPrint As String

    Private PrintFont As New Font("Arial", 10)

    Private Sub btnOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

    Dim numChars As Integer

    Dim numLines As Integer

    Dim stringForPage As String

    Dim strFormat As New StringFormat

    ‘Based on page setup, define drawable rectangle on page

    Dim rectDraw As New RectangleF( _

    e.MarginBounds.Left, e.MarginBounds.Top, _

    e.MarginBounds.Width, e.MarginBounds.Height)

    ‘Define area to determine how much text can fit on a page

    ‘Make height one line shorter to ensure text doesn’t clip

    Dim sizeMeasure As New SizeF(e.MarginBounds.Width, _

    e.MarginBounds.Height – PrintFont.GetHeight(e.Graphics))

    ‘When drawing long strings, break between words

    strFormat.Trimming = StringTrimming.Word

    ‘Compute how many chars and lines can fit based on sizeMeasure

    e.Graphics.MeasureString(StringToPrint, PrintFont, _

    sizeMeasure, strFormat, numChars, numLines)

    ‘Compute string that will fit on a page

    stringForPage = StringToPrint.Substring(0, numChars)

    ‘Print string on current page

    e.Graphics.DrawString(stringForPage, PrintFont, _

    Brushes.Black, rectDraw, strFormat)

    ‘If there is more text, indicate there are more pages

    If numChars < StringToPrint.Length Then

    ‘Substract text from string that has been printed

    StringToPrint = StringToPrint.Substring(numChars)

    e.HasMorePages = True

    Else

    e.HasMorePages = False

    ‘All text has been printed, so restore string

    StringToPrint = RichTextBox1.Text

    End If

    End Sub

    Private Sub btnSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    Try

    ‘Load page settings and display page setup dialog box

    PageSetupDialog1.PageSettings = PrintPageSettings

    PageSetupDialog1.ShowDialog()

    Catch ex As Exception

    ‘Display error message

    MessageBox.Show(ex.Message)

    End Try

    End Sub

    Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    Try

    ‘Specify current page settings

    PrintDocument1.DefaultPageSettings = PrintPageSettings

    ‘Specify document for print preview dialog box and show

    StringToPrint = RichTextBox1.Text

    PrintPreviewDialog1.Document = PrintDocument1

    PrintPreviewDialog1.ShowDialog()

    Catch ex As Exception

    ‘Display error message

    MessageBox.Show(ex.Message)

    End Try

    End Sub

    Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click

    Dim FilePath As String

    ‘Display Open dialog box and select text file

    OpenFileDialog1.Filter = "Text files (*.txt)|*.txt"

    OpenFileDialog1.ShowDialog()

    ‘If Cancel button not selected, load FilePath variable

    If OpenFileDialog1.FileName <> "" Then

    FilePath = OpenFileDialog1.FileName

    Try

    ‘Read text file and load into RichTextBox1

    Dim MyFileStream As New FileStream(FilePath, FileMode.Open)

    RichTextBox1.LoadFile(MyFileStream, _

    RichTextBoxStreamType.PlainText)

    MyFileStream.Close()

    ‘Initialize string to print

    StringToPrint = RichTextBox1.Text

    ‘Enable Print button

    MenuItem9.Enabled = True

    MenuItem9.Enabled = True

    MenuItem8.Enabled = True

    Catch ex As Exception

    ‘display error messages if they appear

    MessageBox.Show(ex.Message)

    End Try

    End If

    End Sub

    Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click

    Try

    ‘Load page settings and display page setup dialog box

    PageSetupDialog1.PageSettings = PrintPageSettings

    PageSetupDialog1.ShowDialog()

    Catch ex As Exception

    ‘Display error message

    MessageBox.Show(ex.Message)

    End Try

    End Sub

    Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem8.Click

    Try

    ‘Specify current page settings

    PrintDocument1.DefaultPageSettings = PrintPageSettings

    ‘Specify document for print preview dialog box and show

    StringToPrint = RichTextBox1.Text

    PrintPreviewDialog1.Document = PrintDocument1

    PrintPreviewDialog1.ShowDialog()

    Catch ex As Exception

    ‘Display error message

    MessageBox.Show(ex.Message)

    End Try

    End Sub

    Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click

    Try

    ‘Specify current page settings

    PrintDocument1.DefaultPageSettings = PrintPageSettings

    ‘Specify document for print dialog box and show

    StringToPrint = RichTextBox1.Text

    PrintDialog1.Document = PrintDocument1

    Dim result As DialogResult = PrintDialog1.ShowDialog()

    ‘If click OK, print document to printer

    If result = DialogResult.OK Then

    PrintDocument1.Print()

    End If

    Catch ex As Exception

    ‘Display error message

    MessageBox.Show(ex.Message)

    End Try

    End Sub

    Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click

    RichTextBox1.Text = Nothing

    MenuItem3.Enabled = False

    End Sub

    Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged

    End Sub

    Private Sub MenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem10.Click

    End

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click

    End Sub

    Private Sub MenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem6.Click

    SaveFileDialog1.Filter = "Text files (*.txt)|*.txt"

    SaveFileDialog1.ShowDialog()

    If SaveFileDialog1.FileName <> "" Then

    FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)

    PrintLine(1, RichTextBox1.Text) ‘copy text to disk

    FileClose(1)

    End If

    End Sub

    Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click

    End Sub

    Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click

    End Sub

    Private Sub MenuItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem13.Click

    RichTextBox1.Text = DateString & vbCrLf & RichTextBox1.Text

    RichTextBox1.Select(1, 0) ‘remove selection

    End Sub

    Private Sub MenuItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem14.Click

    If FontDialog1.ShowDialog() = DialogResult.OK Then

    RichTextBox1.Font = FontDialog1.Font

    End If

    End Sub

    Private Sub MenuItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    FontDialog1.ShowColor = True

    FontDialog1.Font = RichTextBox1.Font

    FontDialog1.Color = RichTextBox1.ForeColor

    If FontDialog1.ShowDialog() <> DialogResult.Cancel Then

    RichTextBox1.Font = FontDialog1.Font

    RichTextBox1.ForeColor = FontDialog1.Color

    End If

    End Sub

    Private Sub MenuItem16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem16.Click

    If ColorDialog1.ShowDialog() = DialogResult.OK Then

    RichTextBox1.BackColor = ColorDialog1.Color

    End If

    End Sub

    Private Sub MenuItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem17.Click

    ‘ Ensure that text is selected in the text box.

    If RichTextBox1.SelectionLength > 0 Then

    ‘ Copy the selected text to the Clipboard.

    RichTextBox1.Copy()

    End If

    End Sub

    Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem18.Click

    ‘ Determine if there is any text in the Clipboard to paste into the text box.

    If Clipboard.GetDataObject().GetDataPresent(DataFormats.Text) = True Then

    ‘ Determine if any text is selected in the text box.

    If RichTextBox1.SelectionLength > 0 Then

    ‘ Ask user if they want to paste over currently selected text.

    If MessageBox.Show("Do you want to paste over current selection?", _

    "Cut Example", MessageBoxButtons.YesNo) = DialogResult.No Then

    ‘ Move selection to the point after the current selection and paste.

    RichTextBox1.SelectionStart = RichTextBox1.SelectionStart + _

    RichTextBox1.SelectionLength

    End If

    End If

    ‘ Paste current text in Clipboard into text box.

    RichTextBox1.Paste()

    End If

    End Sub

    Private Sub MenuItem19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem19.Click

    ‘ Ensure that text is currently selected in the text box.

    If RichTextBox1.SelectedText <> "" Then

    ‘ Cut the selected text in the control and paste it into the Clipboard.

    RichTextBox1.Cut()

    End If

    End Sub

    Protected Sub toolBar1_ButtonClick(ByVal sender As Object, _

    ByVal e As ToolBarButtonClickEventArgs)

    ‘ Evaluate the Button property to determine which button was clicked.

    Select Case ToolBar1.Buttons.IndexOf(e.Button)

    Case 0

    OpenFileDialog1.ShowDialog()

    Dim FilePath As String

    ‘Display Open dialog box and select text file

    OpenFileDialog1.Filter = "Text files (*.txt)|*.txt"

    OpenFileDialog1.ShowDialog()

    ‘If Cancel button not selected, load FilePath variable

    If OpenFileDialog1.FileName <> "" Then

    FilePath = OpenFileDialog1.FileName

    Try

    ‘Read text file and load into RichTextBox1

    Dim MyFileStream As New FileStream(FilePath, FileMode.Open)

    RichTextBox1.LoadFile(MyFileStream, _

    RichTextBoxStreamType.PlainText)

    MyFileStream.Close()

    ‘Initialize string to print

    StringToPrint = RichTextBox1.Text

    Catch ex As Exception

    ‘display error messages if they appear

    MessageBox.Show(ex.Message)

    End Try

    End If

    Case 1

    SaveFileDialog1.Filter = "Text files (*.txt)|*.txt"

    SaveFileDialog1.ShowDialog()

    If SaveFileDialog1.FileName <> "" Then

    FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)

    PrintLine(1, RichTextBox1.Text) ‘copy text to disk

    FileClose(1)

    End If

    Case 2

    ‘ Insert code to print the file.

    Try

    ‘Specify current page settings

    PrintDocument1.DefaultPageSettings = PrintPageSettings

    ‘Specify document for print dialog box and show

    StringToPrint = RichTextBox1.Text

    PrintDialog1.Document = PrintDocument1

    Dim result As DialogResult = PrintDialog1.ShowDialog()

    ‘If click OK, print document to printer

    If result = DialogResult.OK Then

    PrintDocument1.Print()

    End If

    Catch ex As Exception

    ‘Display error message

    MessageBox.Show(ex.Message)

    End Try

    End Select

    End Sub

    Private Sub MenuItem20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem20.Click

    myForm2 = New Form2

    myForm2.Show()

    End Sub

    Private Sub SaveFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles SaveFileDialog1.FileOk

    End Sub

    End Class

  55. Chris Green… doubt you’ll find this response, but you didn’t give an email address… your Toolbar click procedure doesn’t have a ‘handles’ clause… so it will likely never be called.

  56. Amzin says:

    Hello. I just downloaded .NET SDK. I want to use it for creating console applications, but I can’t found any solutions on how to use console in curses way (with cursor positioning, coloring and so on).

    Is there anything I may use? (libraries, workarounds).

    Will Console class be expanded in future .NET versions?

  57. Arvindan Nair says:

    How to call Windows Application Remotly

    and creating instance of the fomeobject its giving an error that this application is running in a patially trusted Context.

  58. TheJackal says:

    Hi

    I would like to know how do you change the color of text in let say a richtextbox. The trick is I dont want to change all the text in the control. I just want to change certain text.

    almost like appying a style sheet the richtextcontrol. So if you type a word in the control it should change its color or font according to a style sheet(for example)

  59. Andrew says:

    How to add an icon to Start->Programs using Setup project? Thanks

  60. sylves says:

    i want to show the document in the textbox same as the word format

  61. r says:

    Want to display the date-time in date time picker ctrl according to the format of SQL server where its fetching/storing the data.

  62. Martin (matthiesenjm@hotmail.com) says:

    I am using a datagrid to display information from an MS SQL DB. The data shows up fine. Now this is what I want to do. When the user clicks on an item in the DG I want it to populate textfields on the same form. That is where I want the editing to occur, which is why I have made the DG read-only. I also do not want changes to show up in the DG until the user has pressed a Save button.

    Any suggestions, please e-mail me.

    matthiesenjm@hotmail.com

  63. Trisha says:

    I am new to VB.NET, so please bear with me. I want to add a phone number field to my webform. Is there a way to make a text field a numeric field and add the parentheses and the dashes, so the user does not have to? (Within the application, without having to write code.)

  64. Hemadri says:

    using console application possible to create vb.net windows controls. If possible how?

  65. Sunny says:

    Using VB.NET, when i get the temp folder name it returns it in the short filename format, e.g. D:DOCUME~1USERLOCALS~1Temp

    can i convert this string or get this name in the long filename format, e.g.

    D:Documents and SettingsUSERLocal SettingsTemp

    ?

    Thank you,

    Sunny

  66. Sunny says:

    Using VB.NET, when i get the temp folder name it returns it in the short filename format, e.g. D:DOCUME~1USERLOCALS~1Temp

    can i convert this string or get this name in the long filename format, e.g.

    D:Documents and SettingsUSERLocal SettingsTemp

    ?

    Thank you,

    Sunny

  67. Tony says:

    Id like to create a listbox using code not actually dragging and dropping it on to form, it doesn’t need to be in a specific place just need to be able to create one

  68. We build an database allication in VB6 on OS 98, It work’s fine. But now we want to run this application winXp, there we finds some problems like windows ask for updates to run that application but doen’t upated any thing, after restarting the windows we face the same Error…

    Regards.

    Muhammad Zahid

  69. umar says:

    i want to develop a game and how can i build up the logic of target setting and what is the functionality of bounds and setbounds funtions

  70. umar says:

    i want to develop a game and how can i build up the logic of target setting and what is the functionality of bounds and setbounds funtions

  71. omar -bili44@hotmail.com says:

    i need to use the ProgressBar ,but how can i

    synchronize the thread that controles it with a methode that is running

  72. cg says:

    The code which defines an object is found in a

  73. steven frierdich says:

    Any one know how in vb.net to make a listbox allow in place editing to occur. I can not find any properties of the listbox that makes it editable or find any examples of how do this for vb.net. You can email me at

    sun_water_snow@hotmail.com

  74. Dharmesh says:

    I call filldataset methods, which just call

    da.fill(ds,tablename) and return dataset to client app.

    FillDataSet(Ds as dataset,strsql as string,tablename as string)

    i call this method again and again, after some time i get error open cursors exceeded

    if you can, please help me..

    Dharmesh

  75. Sten Seib says:

    Does anyone know of a way to get the list of all open files and folders via WMI or some

    other VBScript API? If not, is there a COM component that one could use to

    achieve this?

  76. Harshal says:

    I have to print the crystal report from a form on the click of a button .how do i write the code ?

  77. Harshal says:

    I have to print the crystal report from a form on the click of a button .how do i write the code ?

    pls send the answers on harshal_11@yahoo.com

  78. harshal says:

    in vb.net I have to populate the data of a table (emp),column(empno )in the combo box .i have created connection ,created dataset .

    In the property of combo box

    Datasource=:dataset1.emp

    Display member =empno

    Value member=empno

    Still the combobox is not getting populated.y ?

    pls send the answers on harshal_11@yahoo.com

  79. harshal says:

    in vb.net I have to populate the data of a table (emp),column(empno )in the combo box .i have created connection ,created dataset .

    In the property of combo box

    Datasource=:dataset1.emp

    Display member =empno

    Value member=empno

    Still the combobox is not getting populated.y ?

    pls send the answers on harshal_11@yahoo.com

  80. Naftali says:

    How do I make my DataGrid have the XP visual style?

    (I made a manifest and gave buttons FlatStyle.system and the look, but what about DataGrids?)

  81. AJ says:

    If VB application exe other support files are located on IIS server and want to Lunch VB application form Web Browser How Can we do that,Any Idea?

  82. Nebukhadnazaar says:

    I have to send a file through the serial port.

    Are StreamWriter and StreamReader my best tool,

    or is there an API tool that sends files (of ANY TYPE!) byte by byte?

    I’ve tried the Streams but they only seem to read *.txt. what about jpeg?

  83. Ravinder says:

    Binding problem in Mask Edit Box

  84. Ravinder says:

    Binding problem in Mask Edit Box

  85. I want to know whether it is possible to send data from a dataset to the database using a sqladapter? if possible how can that be done?

    I actually want to insert a new row into my dataset and pass that row to my database. Kindly give me the solution….

  86. J Ferrari says:

    I am a beginner at VB.net so my question may seem foolish … If I have an application that I am writing that is basically a question and answer application … and depending on the answers to the questions, the navigation may change, should I make each question within a form or incorporate all questions within one form …

  87. Anju says:

    Can anyone please help me how to clear edit mask control in VB.NET? I can do all the operations with that. but I am not able to clear it. I am using this control in an auto generated form.Thats where I am finding the problem.

    Here is my code:

    Dim myDate As New AxMSMask.AxMaskEdBox

    For Each myControl In Me.Controls

    If myControl.Name = "DateOfBirth" Then

    myDate.ctlText = ""

    myControl.Text = myDate.ctlText

    End If

    Next

    Any help will be very appreciated.I am very close to the dead line.Please help me with this.

    my email is:

    tabbu_raj@yahoo.com

    Thanks

  88. umesh says:

    Dear all,

    How can I a make an Installable for a .net(vb/c#) app. including the .Net framework. WHat are the steps I have to follow to achieve the same.

    Pls. help me.

    Umesh

  89. umesh says:

    Hi,

    Anybody have any idea about vb.net program whether the application will work on PT930 or not. Currently it works with e-VB. If Yes, how?

    Thanx in Advance.

    Umesh

  90. Daniel says:

    How much faster is .Net’s StringDictionary Class than VB’s Dictionary object?

  91. harshal says:

    i have to create 3 details section in crystal report in following sequence :

    header section

    detail section

    header section

    detail section

    header section

    detail section

    how do i do it ?i’m able to create section but not able to control their sequence as i need .

  92. harshal says:

    i have to create 3 details section in crystal report in following sequence :

    header section

    detail section

    header section

    detail section

    header section

    detail section

    how do i do it ?i’m able to create section but not able to control their sequence as i need .

    contact m e on harshal_11@yahoo.com

  93. Brian Hupine says:

    All I want to do is print a jpeg image file without loading it into memory. I suppose all I really want to do is use a standard Windows print from my VB.Net program.

    Is there any way I can do this?

    Brian

  94. Sheraz says:

    Can I use vb 6 COM components built for a vb6 app to work on on 2003 .NET? I am running a VB6 app on .net platform. But COMs fro VB6 are not working

    I mean there were working fine before on 2000 server I upgraded to 2003 ? Now they don’t seem to work anymore

    I mean the rest of the application seems to work

    Just the coms are not working anymore

    How can I register these VB6 com in .net platform so I can use them with my existing VB6 application

    sheeraz_khan_101@yahoo.com

  95. Computerg33k says:

    How can I change a vb.net setup program? I need to change a form on it–but when I do, it doesn’t change in the setup installer.

  96. Prakash Roy says:

    How can I get context sensitive help for MenuItems? In VB6 the Menu Editor provided with HelpContextID for MenuItems. Thanks in advance.

  97. sghsh says:

    hsdfhsfshf

  98. Jillsar says:

    I am trying to write VB.Net code and would like to have Option Strict On

    Here is my code:

    Dim IndOppArray As Array

    Dim DateArrayElem as string

    IndOppArray = Split(DateArrayElem, "|")

    Dim OppGUID As String = IndOppArray(1)

    I get an error message on the above IndOppArray(1):

    "option strict on disallows late binding"

    I have also tried:

    Dim OppGUID As String = IndOppArray(1).toString

    Any help on why I am getting this error message? Thanks.

    JillSar

  99. Rhys says:

    I have some Vb.NET that uses the StreamWriter class to write a simple file.

    When I use my code to in a windows form it works great.

    When I use the exact same code in a Windows Service, the file is created but no data is written.

    What is the difference???!!!

  100. Pankaj Banga says:

    My DataGrid is bound to a DataSet, with following columns: Description, CashExp, CreditExp,Frequency

    On run time, I am adding two new DataColumn “AnnualCash” and “AnnualCredit” and defining Expression property to give product of two columns, as follows

    Dim dc As DataColumn

    dc = New DataColumn("AnnualCash", GetType(System.Single))

    dc.Expression = " CashExp * Frequency"

    myDataSet.Tables("ClientExpenses").Columns.Add(dc)

    dc = New DataColumn("AnnualCredit", GetType(System.Single))

    dc.Expression = " CreditExp * Frequency"

    myDataSet.Tables("ClientExpenses").Columns.Add(dc)

    The only problem I am getting is when CashExp or CreditExp or Frequency is changed the value of derived column is not changed (calculated) until user changes the row either by tab or arrow keys.

    How can I change this behaviour so that the derived columns gets calculated when user edit values in a cell.

  101. Myles Britten says:

    I would like to mirror/clone one monitor to another through VB .Net. Example: Display Windows Media Player and have it display on multi monitors, but have the ability to change to only display on one within my program.

  102. xhm says:

    I have a VB 6.0 application that I have attmepted to upgrade to VB Net using the standard VB Net upgrade facility. I get an error that the SSTab control doesn’t have a design time licence and the application will not upgrade – any suggestions please.

  103. rohit says:

    hi

    i have two pages say a.aspx and b.aspx

    a.aspx has two user controls 1.ascx and 2.ascx

    now a.aspx is executed which is a search page where 1.ascx takes the search criteria and a button and 2.ascx contains a datagrid to display result.

    now 2.ascx has a link to open a popup that is b.aspx. now i want to handle the textbox control on 1.ascx from b.aspx. can i use findcontrol for it. if there is any other solution plz tell me

    rohit

  104. shoba says:

    I have an interview in Vb.NET . Do you have any interview questions or links that would be of help to me? Thanks in advance.

    Shoba

    Email – shoba242002@yahoo.com

  105. Jim says:

    I have the following code in a VB.NET program:

    datInventory = New StreamReader("C:MyVBProjectsAssignment ProgramsClarkJMProgram4Inventory.txt")

    It works fine on my machine, but what if someone opened it on another machine and on a different drive? This piece of program code would need to be changed. Is there a way to code this so the code would be transferrable?

    Thanks,

    Jim

    Clarkburgr@Hotmail.com

  106. computerg33k says:

    I was wondering if it was possible to enter null for a date time picker?

  107. Waseem says:

    its emergency

  108. maruthi says:

    how to upgrade vb6.0 applications to vb.net

  109. vbNull says:

    Can i make a project with MSVS 6.0, copy it to a Machine with MSVS.NET, edit it there (run it there etc…) and copy it backt to the first machine with MSVS 6.0 and go on working on it or am I getting Problems with that?

    Are 6.0 Projects compatible with .NET Projects or is there a upgrading-downgrading Barrier ????

  110. Peter Trahan says:

    On Windows 98 machines, when I print using the PrintDocument I get the exception message that is coded in the "Catch AS" portion of the try statement.

    Here’s a clue: If I open a Word document and print to the same printer, then my VB.NET application prints without exception.

    Same application/same printer on WinNT, or XP or Win2000, works fine.

    I will be glad to furnish the code text of my application if need be.

    Yours Truly,

    VB Rookie In Florida

    Peter Trahan

    peter.trahan@aurafin.com

  111. Vinod says:

    What is difference between dataset and dataview????????

  112. S M Subasinghe says:

    How can I use "SelectionTabs" property in Richtextbox control using VB.NET.

  113. Dennis says:

    I donwloaded the new controls Visual Basic .NET Power Pack, very cool tools, only problem is that when I try the Blend property dropdown in the property window I get an error, also when I deploy it to a client machine it won’t work is there something I need to do in order to get both features to work?

    Thanks for your help.

    Dennis

  114. Zarrin says:

    Hi ,

    I’m a beginner in web-application with .NET but i’m not familiar with VB.NET.

    ….I have created a MODULE in my Web-Application and i have some functions in it.

    But for some reasons i want to convert this module to DLL or something like this.

    Now How can i create a DLL from a module and call its functions from code-behind.

    Please Help me.if possible please show me an article about this topic.

    Best Regards.

  115. amit says:

    how to combine two user-given conditions to retrieve data from database

  116. Harm says:

    how do i make it so vb runs with a process and then preforms task with that process…

    and whats the code for autoclick..and…how do i find positions on my screen (x, y)

  117. kishore says:

    Hello,

    I am writing a custom form designer which allows the user to generate forms. I am trying to implement features like "Cut","Copy","Paste","Undo","Redo".

    For "Delete" standard command , command.invoke calls "Destroy Component" of DesignerHost.

    I want to know which methods are being called For "Cut",Copy","Paste","undo","redo" standard commands.

    Please let me know

    Thank You

    Kishore

  118. P. Heinonen says:

    What is ENCHIddeRefresh in VB.NET 2005?

    piece of IL:

    .method private instance void __ENCHiddenRefresh() cil managed

    It is only in VB compiled IL.

    Somehow related to "enc" "edit and continue"?

  119. MKS Khaleel says:

    Hi,

    How can I call Stored Procedure using ADO in VB6.

    Kindly reply at the earliest.

    Thanks and regards,

    MKS Khaleel

    mkskhaleel_mca@yahoo.com

  120. S S GODARA says:

    I HAVE WRITTEN A VB MACRO TO DRAW GROUND PROFILES IN AUTOCAD. I WANT TO RUN THIS MACRO THROUGH A TOOL BUTTON

  121. S S GODARA says:

    i need it for survey work

  122. Nida says:

    How do i set the chart type in Visual Basic.NET

    the chart control is imported from the excel application

  123. Nida says:

    How do i set the chart type in Visual Basic.NET

    the chart control is imported from the excel application

  124. S Jag says:

    Hi,

    I have written a toolbar button for internet explorer, when clicked it has to fetch me the Page Url and title. Can I do this in .net?

    Thanks

  125. Sujith Jagini says:

    Hi,

    I have written a toolbar button for internet explorer, when clicked it has to fetch me the Page Url and title. Can I do this in .net?

    Thanks

    Sujith

    skjagini#hotmail.com(replace # with @)

  126. Cr8n says:

    How do I write a time delay into a VB code? ie, I would like the script to loop every 5 minutes?

  127. Michael says:

    HI,

    I’m trying to compile a VB.NET program from the command line and i’m having a problem. This is my code and the problem i’m having is: at the prompt command i’m tyoping VBC /r:system.dll /r:system.data.dll /r:system.xml.dll Database (name of the program). and the compiler is not recognizing IsNothing(EmployeeNode). i had no problem compiling this in Visual Stusio so i guess i’m missing one of /r:system…. can someone help me.Tks

    Imports System

    Imports System.Xml

    Module Module1

    Dim D As New XmlDocument()

    Dim EmployeeNode As XmlElement

    Dim NameNode As XmlElement

    Dim Name As String

    Dim JobTitleNode As XmlElement

    Dim SalaryNode As XmlElement

    Dim Total As Integer

    Sub Main()

    D.Load("c:windowstempworkforce.xml")

    EmployeeNode = D.DocumentElement.FirstChild

    Do While Not IsNothing(EmployeeNode)

    NameNode = EmployeeNode.Item("Name")

    Name = NameNode.InnerText()

    Console.WriteLine(Name)

    EmployeeNode = EmployeeNode.NextSibling()

    Loop

    Console.ReadLine()

    End Sub

    End Module

  128. Michael says:

    HCan anyone refer me to a list of all /r:system….. for compilation from the command line? Tks

  129. Fayaz says:

    How to change the BackColor of DatePicker. Before clicking on the drop down, the back color should get changed

    .

  130. Devdas says:

    What Iterative statements each language does support ? Which one has better combination and Why ?

  131. Devdas says:

    what parameter -passing methods each language does support ? which one has better combination and why ?

  132. Any Option to set to increase the no of printing