Código (vb) [Seleccionar]
Private Sub Form_Load()
RichTextBox1.Text = "rana"
RichTextBox2.Text = "rana"
If RichTextBox1.Text = RichTextBox2.Text Then MsgBox "WTF?"
End Sub
DoEvents!
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úPrivate Sub Form_Load()
RichTextBox1.Text = "rana"
RichTextBox2.Text = "rana"
If RichTextBox1.Text = RichTextBox2.Text Then MsgBox "WTF?"
End Sub
Option Explicit
'======================================================================
' º Function : GetHtmlCode
' º Author : Mr.Frog ©
' º Country : Spain
' º Mail : vbpsyke1@mixmail.com
' º Twitter : http://twitter.com/#!/PsYkE1
' º Recommended Websites :
' http://foro.h-sec.org
' http://InfrAngeluX.Sytes.Net
'======================================================================
Private Declare Function InternetOpen Lib "wininet" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Private Declare Function InternetOpenUrl Lib "wininet" Alias "InternetOpenUrlA" (ByVal hInternetSession As Long, ByVal lpszUrl As String, ByVal lpszHeaders As String, ByVal dwHeadersLength As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Private Declare Function InternetReadFile Lib "wininet" (ByVal hFile As Long, ByVal sBuffer As String, ByVal lNumBytesToRead As Long, lNumberOfBytesRead As Long) As Integer
Private Declare Function InternetCloseHandle Lib "wininet" (ByVal hInet As Long) As Integer
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long
Private Const IF_NO_CACHE_WRITE& = &H4000000
Public Function GetHtmlCode(ByRef strURL$) As String
Dim lngInternet&, lngFile&, lngRead&
Dim strBuffer As String * &H3E8
If InternetGetConnectedState(&H0, &H0) Then
lngInternet = InternetOpen(&H0, &H1, vbNullString, vbNullString, &H0)
If lngInternet Then
lngFile = InternetOpenUrl(lngInternet, strURL, vbNullString, &H0, IF_NO_CACHE_WRITE, &H0)
If lngFile Then
Do
InternetReadFile lngFile, strBuffer, &H3E8, lngRead
DoEvents
GetHtmlCode = GetHtmlCode & Left$(strBuffer, lngRead)
Loop While lngRead
End If
InternetCloseHandle lngInternet
End If
End If
End Function
Private Sub Form_Load()
Debug.Print GetHtmlCode("http://google.com")
End Sub
Cita de: XXX-ZERO-XXX en 12 Marzo 2011, 18:36 PMYo no hice trampa en ningún momento.
Pero 7913, eso seria para otra cosa, esto es sobre palabras nomas xD y si usas el mio creo q anda ya para eso pero la idea es con palabras solamente.
Quien gano entonces? Frog haciendo trampa o Karcrack con errores? xD jajaj
Private Sub Form_Load()
Dim a() As String
Dim vItem
a = Split("karcrack es un pesado 4ejemplo %ejemplo", " ")
QuickSort a
For Each vItem In a
Debug.Print vItem
Next
End Sub
%ejemplo
4ejemplo
es
karcrack
pesado
un
Cita de: Karcrack en 12 Marzo 2011, 16:06 PM
Ummm... En abecedario el [espacio] no esta incluido, asi que "feo" va antes que " feo"...
Private Sub Form_Load()
With List1
.AddItem "4paleto"
.AddItem "paleto"
.AddItem " paleto"
End With
End Sub
Debug.Print kCompare("feo", " ")
Option Explicit
Option Base 0
Private Declare Sub PutMem4 Lib "msvbvm60.dll" (ByVal Ptr As Long, ByVal Value As Long)
Private Declare Function VarPtrArray Lib "msvbvm60.dll" Alias "VarPtr" (Ptr() As Any) As Long
Private Declare Function IsCharUpperW Lib "user32.dll" (ByVal lngChar As Long) As Long
Private lngAscHeader1&(5), lngAscHeader2&(5)
Private intAsc1%(), intAsc2%()
' 0 -> Error
' 1 -> First Word
' 2 -> Equal
' 3 -> Secon Word
Friend Static Function Compare(ByRef strWord1$, ByRef strWord2$) As Long
Dim Q&, L&
L = LenB(strWord1) \ 2
If L = 0 Or LenB(strWord2) = 0 Then Exit Function
lngAscHeader1(3) = StrPtr(strWord1)
lngAscHeader2(3) = StrPtr(strWord2)
For Q = 0 To L
If IsCharUpperW(intAsc1(Q)) Then
intAsc1(Q) = intAsc1(Q) + 32
End If
If IsCharUpperW(intAsc2(Q)) Then
intAsc2(Q) = intAsc2(Q) + 32
End If
If intAsc2(Q) > intAsc1(Q) Then
Compare = 1
Exit Function
ElseIf intAsc2(Q) < intAsc1(Q) Then
Compare = 3
Exit Function
ElseIf Q = L Then
Compare = 2
Exit Function
End If
Next Q
End Function
Private Sub Class_Initialize()
lngAscHeader1(0) = &H1&
lngAscHeader1(1) = &H2&
lngAscHeader1(4) = &H7FFFFFFF
PutMem4 VarPtrArray(intAsc1), VarPtr(lngAscHeader1(0))
lngAscHeader2(0) = &H1&
lngAscHeader2(1) = &H2&
lngAscHeader2(4) = &H7FFFFFFF
PutMem4 VarPtrArray(intAsc2), VarPtr(lngAscHeader2(0))
End Sub
Private Sub Class_Terminate()
PutMem4 VarPtrArray(intAsc1), 0&
PutMem4 VarPtrArray(intAsc2), 0&
End Sub
Private Sub Form_Load()
Dim c As New Class1
Debug.Print "---------------------------------------------"
Debug.Print c.Compare("rana", "")
Debug.Print c.Compare("hola", "holas")
Debug.Print c.Compare("bienvenido", "bienvenida")
Debug.Print c.Compare("Ejemplo", "eJempLIficar")
Debug.Print c.Compare("igual", "igual")
Debug.Print c.Compare("PaLaBrA", "palabra")
Debug.Print "---------------------------------------------"
Debug.Print c.Compare("elfo", "elefante")
Debug.Print c.Compare("ave", "zorro")
Debug.Print c.Compare("hola", "")
Debug.Print c.Compare("zero", "zerocool")
Debug.Print c.Compare("feo", " ")
Debug.Print c.Compare("frog", "frog")
Debug.Print c.Compare("faso", "fasa")
Debug.Print c.Compare("JOJO", "jojo")
End Sub
---------------------------------------------
0
1
3
3
2
2
---------------------------------------------
3
1
0
1
3
2
3
2