Results 1 to 4 of 4

Thread: Visual Basic tips

  1. #1
    Join Date
    Jan 2009
    Posts
    61

    Visual Basic tips

    looking for some coding in visual basic not seriously .!!! but if you have some tips please reply me .just need some change ..!

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Visual Basic tips

    Write to a file:
    filename = text1.text
    if filename = "" then goto errhandl
    step1 = text2.text
    open filname for output as #1
    print #1, step1
    close #1

    exit sub
    errhandl:
    msgbox "Please enter a filename"

    i dont know how much knowledge you have but dont laugh on me..!!

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Visual Basic tips

    what you want to dail number then use this

    Comm1.PortOpen = True
    Comm1.OutPut = "ATDT" + text1.text + Chr$(13)
    'text1.text = the number you want to dial and Chr$(13) is ENTER

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Visual Basic tips

    Cusor Functions like getting cursor postion and hiding the cursor

    'Declare the GetCursorPos API Function and the appropriate type
    Private Declare Function GetCursorPos Lib "user32" (lpPoint As PointAPI) As Long
    Type PointAPI
    x As Long
    y As Long
    End Type
    Dim CursorPosition As PointAPI

    'Declare the ShowCursor API Function
    Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long

    'A couple constants to make things clearer:
    Const CURVISIBLE = 1
    Const CURINVISIBLE = 0

    Dim CursorState As Boolean 'Variable to keep track of the state of the cursor

    Public Sub Initialize()

    'Have to initialize the CursorState to false
    CursorState = True
    ShowCursor CURVISIBLE

    End Sub

    Public Sub CursorToggle()

    'Check if the cursor is presently visible or not
    Select Case CursorState
    Case True 'If the cursor is visible...
    'Make it invisible
    CursorState = False
    ShowCursor CURINVISIBLE
    Case False 'If the cursor is invisible...
    'Make it visible
    CursorState = True
    ShowCursor CURVISIBLE
    End Select

    End Sub

    Public Function xPos()

    'Returns the x-position of the cursor
    GetCursorPos CursorPosition
    xPos = CursorPosition.x

    End Function

    Public Function yPos()

    'Returns the y-position of the cursor
    GetCursorPos CursorPosition
    yPos = CursorPosition.y

    End Function

    Public Sub Terminate()

    'When the form unloads, we want to ensure that
    'the cursor is back, or else it stays invisible
    'even after the program's done!
    ShowCursor CURVISIBLE

    End Sub

Similar Threads

  1. Tips for developing Visual Basic application
    By SpearMan in forum Tips & Tweaks
    Replies: 2
    Last Post: 23-04-2012, 03:05 PM
  2. Replies: 2
    Last Post: 12-03-2010, 06:14 AM
  3. what are Visual Basic IDE?
    By Naresh Modi in forum Software Development
    Replies: 2
    Last Post: 06-03-2009, 09:49 AM
  4. Visual Basic 2005 or Visual Basic 6
    By Aasha in forum Software Development
    Replies: 5
    Last Post: 15-01-2009, 06:56 PM
  5. Visual Basic on LAN
    By djbbenn in forum Software Development
    Replies: 2
    Last Post: 05-08-2008, 02:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,094,301.74130 seconds with 16 queries