Community discussion forum

API Programming Series #5

This is a comment thread discussing API Programming Series #5
  • 9 years ago

    This thread is for discussions of API Programming Series #5.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 5 years ago

    it cleared many doubts regarding API programming in vb

  • 5 years ago

    Thank you for spending your time to write these great articles. They are very helpful and clearly written.

  • 5 years ago

    Thank you for expressing your appreciation.

  • 5 years ago

    HI!


    Is there a way to transfer the database to excel rather usingt the datareport?
    If you have any suggestions or ideas pls feel free to mail me.


    thanks.
    marz!
    marz03@yahoo.com

  • 4 years ago

    I always do this for my "print to file" checkbox in the print dialog


    Needed Reference : Microsoft Excel x.y Object Library


    Code:

    Public Sub ExportFlexGrid(ByRef objGrid As MSFlexGrid)
       Dim objXL As Excel.Application
       Dim objWB As Excel.Workbook
       Dim objWS As Excel.Worksheet
       Dim r As Long
       Dim c As Long
       Dim intRed As Integer
       Dim intGreen As Integer
       Dim intBlue As Integer
       
       Set objXL = New Excel.Application
       Set objWB = objXL.Workbooks.Add
       Set objWS = objWB.Worksheets(1)


       With objWS
           For r = 0 To objGrid.Rows - 1
               For c = 0 To objGrid.Cols - 1
                   .Cells(r + 1, c + 1) = objGrid.TextMatrix(r, c)
               Next
           Next


    '   You can do some nice things, like adding a counter
    '        .Cells(objGrid.Rows, 7) = "=count(G2:G" & objGrid.Rows - 1 & ")"


           .Cells.Columns.AutoFit
       End With


       objXL.Visible = True
       
       Set objWS = Nothing
       Set objWB = Nothing
       Set objXL = Nothing
    End Sub

  • 4 years ago

    this is really nice article, but im wondering is there a way to display the memory status in a textbox ? well im rather new to vb.

Post a reply

Enter your message below

Sign in or Join us (it's free).