Library articles and tutorials

API Programming Series #5

Introduction

In this article which is the fourth of this series, we'll see how we can obtain the Memory status of the system. I.e. the total installed RAM on the system, how much is available at the moment, total virtual memory, available virtual memory and so on.

Note: This article assumes that you are familiar with the fundamentals of API programming. If however, API is a new concept to you, please do go through the first two articles (Article 1, Article 2) of this series, which will help you to get a thorough grounding in this topic.

AddThis

Comments

  1. 04 Nov 2004 at 21:06

    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.

  2. 20 Jan 2004 at 11:57

    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

  3. 24 Aug 2003 at 12:57

    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. 05 Jun 2003 at 08:51

    Thank you for expressing your appreciation.

  5. 02 Jun 2003 at 15:04

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

  6. 04 May 2003 at 07:14

    it cleared many doubts regarding API programming in vb

Leave a comment

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

Related discussion