looking for some coding in visual basic not seriously .!!! but if you have some tips please reply me .just need some change ..!
looking for some coding in visual basic not seriously .!!! but if you have some tips please reply me .just need some change ..!
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..!!
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
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
Bookmarks