www.pudn.com > AVPhone.zip > Module1.bas
Attribute VB_Name = "Module1"
Option Explicit
'This is a sample app for Banasoft AVPhone OCX
'Now you can builder your real time audio and video
'conferencing application in few minutes! Support any ICM like
'h263 or mpeg4!
'
'Home page:
'http://www.banasoft.net/AVPhone.htm
'
'You can download the control from:
'http://www.banasoft.net/DownLoad/AVPhone.com
'
Private Sub Main()
'splash window
With Form2
.Show
.Refresh
End With
'local video
Load Form3
'remote video
Load Form4
'debug window
Load Form7
'chat window
Load Form8
'main window
Form1.Show
Unload Form2
End Sub
'unload all forms before exit
Public Sub ProgramEnd()
Unload Form9
Unload Form8
Unload Form4
Unload Form3
Unload Form7
Dim f As Form
For Each f In Forms
If Not f Is Form1 Then Unload f
Next
End Sub
Public Sub ShowErr()
MsgBox Err.Description, vbCritical
End Sub
'public functions
Public Sub SetMouse(ByVal Mouse As MousePointerConstants)
Dim f As Form
For Each f In Forms
f.MousePointer = Mouse
Next
End Sub
Public Sub ShowClick()
MsgBox "AVPhone control, www.banasoft.net", vbInformation
End Sub
'add text stream to textbox without overflow
Public Sub AddTextStreamToCtrl(Tb As TextBox, Text As String)
Const csMaxLen As Long = 8192
If Len(Text) > csMaxLen Then Text = Right$(Text, csMaxLen)
With Tb
.SelStart = 65535
.SelText = Text
If .SelStart > csMaxLen * 2 Then
.SelStart = 0
.SelLength = csMaxLen
.SelText = vbNullString
.SelStart = 65535
End If
End With
End Sub
Public Sub LoadLogo()
On Error GoTo ErrorHandle
Dim p As Object
Set p = LoadPicture(App.Path & "\logo.bmp")
Set Form1.VidCap1.Picture = p
Set Form1.VidRnd1.Picture = p
Set Form3.VidRnd1.Picture = p
Set Form4.VidRnd1.Picture = p
ErrorHandle:
End Sub