Archive

Archive for December, 2008

How To Make a GIF to Your Application

December 26, 2008 programmervb Leave a comment

‘code
Private Sub Form_Load()
Dim loc As String
Dim Source As String
loc = App.Path & “\image.gif”
Picture1.Visible = False
Picture1.AutoSize = True
Picture1.Picture = LoadPicture(loc)
Animation.Width = Picture1.Width
Animation.Height = Picture1.Height
Source = “about:” & “” & “” & “
Animation.Navigate Source
End Sub

Categories: Uncategorized

connection and transfer data

December 21, 2008 programmervb Leave a comment

Dim blnConnected As Boolean
Private sub cmdConnect_Click()
wsPop.Close ‘close winsock
Do
DoEvents
Loop While wsPop.State sckClosed
wsPop.Connect txtServer.Text, txtPort.Text
End Sub

Private Sub cmdSend_Click()
wsPop.SendData txtSend
& vbCrLf
txtSend.SetFocus
End Sub

Private Sub wsPop_Connect()
blnConnected=True
txtSend.Enabled=True
cmdSend.Enabled=True
txtReceived.Text=”Connected” & wsPop.RemoteHost
End Sub

Private sub wsPop_DataArrival(ByVal bytesTotal As Long)

Dim StrData As String

wsPop.GetData strData
txtReceived.Text=txtReceived.Text & vbNewLine & strData
End Sub

Categories: Uncategorized Tags:

Create String Connection

December 5, 2008 programmervb Leave a comment

Private sub cmdNew_Click()
On Error GoTo Err
‘Create Data Links
Dim objDLink As New DataLinks
Dim strCon As String

‘open dialog box
strCon=objDLink.PromptNew
Me.txtStr.Text=strCon
Exit Sub

Err:
Me.txtStr.text=vbNullString
End Sub

Private Sub cmd_Click()
On Error GoTo Err
Dim objDLink As New DataLinks
Dim cnn as New Connection
Dim strCon As String

cnn.ConnectionString=Me.txtStr.Text
strCon=objDLink.PromptEdit(cnn)
Me.txtStr.Text=cnn.ConnectionString
Exit sub

Err:
MsgBox (Err.Description)
Me.TxtStr.Text=vbNullString
End Sub

Variable Environment

December 1, 2008 programmervb Leave a comment

Private Sub cmdGet_Click()

Me.txtEnv.Text=vbNullString

Dim strEnv As String

For inCount=1 to 32

strEnv=strEnv & Environ$(intCount) & vbCrLf

Next intCount

Me.txtEnv=strEnv

End Sub

Categories: forms Tags: