Lo que te puse fue, valga la redundancia, un ejemplo del método aleatorio que usarías para generar varias frases hechas.
Después tu lo adaptas a tu code.
Después tu lo adaptas a tu code.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
dim i
i = int((rnd*3) +1)
if text1 = "hola" then
select case i
case 1
print "que tal"
case 2
print "como está?"
case 3
print "hola, que tal"
end select
end if
Dim i
randomize
i = int((rnd*3)+1)
if text1 = "hola" then
Select case i
case 1
print "hola"
case 2
print "que tal"
case 3
print "hola, que como te va?"
End select
End if
[autorun]
open=programa.exe
icon=dibujo.ico
Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias "capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hwndParent As Long, ByVal nID As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hndw As Long) As Boolean
Private Const CONNECT As Long = 1034
Private Const DISCONNECT As Long = 1035
Private Const GET_FRAME As Long = 1084
Private Const COPY As Long = 1054
Private hWndCap As Long
Private Sub START_WEBCAM_Button1_Click()
hWndCap = capCreateCaptureWindow("WebcamCapture", 0, 0, 0, 160, 120, Me.hwnd, 0)
DoEvents
SendMessage hWndCap, CONNECT, 0, 0
Timer1.Enabled = True
End Sub
Private Sub STOP_WEBCAM_Button2_Click()
DoEvents: SendMessage hWndCap, DISCONNECT, 0, 0
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
'Obtiene frames para Picture1
SendMessage hWndCap, GET_FRAME, 0, 0
SendMessage hWndCap, COPY, 0, 0
Picture1.Picture = Clipboard.GetData
Clipboard.Clear
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 1
End Sub
Private Sub Form_Unload(Cancel As Integer)
DestroyWindow hWndCap
End Sub
Private Sub Command1_Click()
Static Imagen As Integer
Imagen = Imagen + 1
If Imagen > 3 Then Imagen = 1
Caption = "Imagen " & Imagen
Command1.Picture = ImageList1.ListImages(Imagen).Picture
End Sub