Login
...or Sign up
Home
Search
Search Code Snippets
Search People
Code Snippets of
brujit0
#Region "Soporte para que se pueda acceder a este formulario desde otro" Private Shared m_vb6FormDefInstance As CLASEGLOBAL Private Shared m_InitializingDefInstance As Boolean Public Shared Property DefInstance() As CLASEGLOBAL Get If m_vb6FormDefInstance Is Nothing Then m_InitializingDefInstance = True m_vb6FormDefInstance = New CLASEGLOBAL m_InitializingDefInstance = False End If DefInstance = m_vb6FormDefInstance End Get Set(ByVal Value As CLASEGLOBAL) m_vb6FormDefInstance = Value End Set End Property #End Region
Soporte para acceder a un formulario desde otro
Uploaded on
7/4/2008 1:16:44 PM
0 comments
Programming Language:
visualbasic.net
clases
formularios
propiedad
Public Function NumeroAleatorio(ByVal min As Integer, ByVal max As Integer) As Integer Dim rnd As New Random() NumeroAleatorio = rnd.Next(min, max) End Function
Obtener un número aleatorio dentro de un rango
Uploaded on
7/4/2008 1:09:05 PM
2 comments
Programming Language:
visualbasic.net
.net
aleatoriamente
aleatorio
random
vb.net
'NOTA INFORMATIVA: No nos puede llegar de min para el random el número cero, debido a que el array se inicializa con ceros y entraríamos en un bucle. 'El min debe ser: >=1 Private Sub NumAleaSinRep(ByVal min As Integer, ByVal max As Integer) Dim x As Integer Dim numale As Integer Dim controlde As Boolean Dim rnd As New Random() controlde = True While controlde = True controlde = False numale = rnd.Next(min, max) For x = 0 To numTotal ' La variable numTotal es el numero total de numeros que queremos obtener If numaleator(x) = numale Then controlde = True Exit For End If Next x End While numaleator(valorini) = numale valorini = valorini + 1 End Sub
Obtener aleatoriamente números sin repetir dentro de un rango especificado
Uploaded on
7/4/2008 1:02:49 PM
0 comments
Programming Language:
visualbasic.net
.net
aleatoriamente
aleatorio
random
vb.net
1
Help
Help by email
What is Naslu?
|
About Naslu
|
Contact
|
Terms of Use
|
Downloads
|
Webprogramacion.com
|
Blog
|
Top
Links
Select language:
Español
|
English
© 2009 naslu.com