Dim cDi As Long cDi = Shell("C:\windows\notepad.exe")
Nombre_del_Formulario.Left = Screen.Width - Width \ 2 Nombre_del_Formulario.Top = Screen.Height - Height \ 2
Forma 2
Text1.SelStart = 0 Text1.SelLength = Len(Text1.Text)
Utilizaremos 2 command button
Declaramos
En Un boton (apagar)
Dim i As Integer i = ExitWindowsEx(1, 0&)
En el boton Reiniciar
Dim i As Integer i = ExitWindowsEx(2, 0&)
En un modulo declararemos
Y usaremos un boton y ke tendra el kode siguiente....
Dim ancho As Integer Dim alto As Integer ancho = GetDeviceCaps(Form1.hdc, 8) alto = GetDeviceCaps(Form1.hdc, 10) MsgBox "La resoluci�n de la pantalla es: " & ancho & " x "_ & alto
Utilizaremos un picture box y un timer , el timer tendra el siguiente kode.. (el timer devera de tener un intervalo de 25 mas o menos)
Const MENSAJE = "Visita http://loverice.tk" Static cDi As Boolean Static scroll As Single Static X As Single If Not cDi Then scroll = Picture1.TextWidth(MENSAJE) cDi = True X = Picture1.ScaleWidth End If Picture1.Cls Picture1.CurrentX = X Picture1.CurrentY = 0 Picture1.FontName = "Arial" ' o lo que quieras Picture1.FontBold = True ' opcional, claro Picture1.Print MENSAJE X = X - 30 If X < -scroll Then X = Picture1.ScaleWidth
En un modulo pondremos lo siguiente...
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Y en un boton o en lo ke desees ...
Desactivar Alt-Tab / Ctrl-Esc y Ctrl-Alt-Del
Call SystemParametersInfo(97, True, "1", 0)
Activar Alt-Tab / Ctrl-Esc y Ctrl-Alt-Del
Call SystemParametersInfo(97, False, "1", 0)
Utilizaremos un label y un timer kon un intervalo de 1 y el timer llevara el siguiente kode...
Static R, G, B R = R + 5: If R > 255 Then R = 0 G = G + 10: If G > 255 Then G = 0 B = B + 15: If B > 255 Then B = 0 Label1.BackColor = RGB(R, G, B) Label1.ForeColor = RGB(R, G, B)
En un modulo pondremos....
Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long
Y en un boton o en lo ke desees
Dim iResp As Integer Dim sArchivo As String sArchivo = "Play " & App.Path & "\ejemplo.wav" iResp = mciExecute(sArchivo)
Pondremos el siguiente kode en kualkier parte del formulario...
Sub Degradado(Formulario As Form) Dim Amount As Single Dim i As Integer Formulario.AutoRedraw = True Amount = (255 / ScaleHeight) For i = 0 To Formulario.ScaleHeight Me.Line (0, i)-(ScaleWidth, i), RGB(0, 0, Amount * i) Next End Sub
Y en el load de tu formulario pondras...
Call Degradado(Me)
Simple... en un command o en lo ke desees pon..
msgbox "cDi WaS hEre "
Msb box kon opcion de si y no , igual ponlo en un commadn etc....
cDi = MsgBox("Desea Salir?", vbYesNo + 32 + vbDefaultButton2, "cDi msg Box") If cDi = vbYes Then End Else End If
Utilizaremos un label y un command en el form pondremos todo el siguiente kode
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label1.Caption = "http://loverice.tk" Label1.Top = Command1.Top + Command1.Height Label1.Left = Command1.Left + Command1.Width / 2 Label1.Visible = True End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label1.Visible = False End Sub
Crearemos un modulo y pondremos lo siguiente...
Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Y usaremos 2 comman button ke seran el de esconder y mostrar
Esconder...
result = ShowCursor(False)
Mostrar
result = ShowCursor(True)
Necesitaras 2 botones
Debes de crear un modulo y poner lo siguiente..
Option Explicit Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Const SWP_NOSIZE = &H1 Private Const SWP_NOMOVE = &H2 Private Const HWND_TOPMOST = -1 Private Const HWND_NOTOPMOST = -2 Public Sub AlwaysOnTop(EnabledOrDisabled, FormID As Object) If EnabledOrDisabled = "Enabled" Then SetWindowPos FormID.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE If EnabledOrDisabled = "Disabled" Then SetWindowPos FormID.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE End Sub
En un boton por (esto habilitara el form siempre visible)
Y esto en el otro boton (Desabilitara el form siempre visible)
Necesitaras dos timer y un boton o en lo kedesees..
En el boton pondras ...
En el primer timer pondras lo siguiente ( el intervalo del timer uno es igual a 1)
Form1.Top = Form1.Top + 60 Timer2.Enabled = True
En el timer 2 pondras lo siguiente ( el intervalo de tiempo deve de ser de 10000 para ke de tiempo ke el efecto termine)
Necesitaras un command o en lo ke gustes... y un timer
En el timer deveras poner lo siguiente .. ( el intervalo del timer deve de ser de 1 )
Me.Width = Me.Width - 30 Me.Height = Me.Height - 30 Form1.Top = Me.Left - 5 Form1.Left = Me.Top - 5 If Me.Width = 1680 Then Me.Hide End End If
Y en el command pon esto..
Muy buen efecto de entrada , puse todo el kode junto nomas para ke kopeen y pegen
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMill) Private Sub Form_Load() ExplodeForm Me, 20, 2 End Sub Sub ExplodeForm(frm As Form, Optional ByVal lNumSteps As Long = 25, _ Optional ByVal lStepDuration As Long) Dim sngLeft As Single, sngTop As Single Dim sngHeight As Single, sngWidth As Single Dim sngNewHeight As Single, sngNewWidth As Single Dim sngHeightStep As Single, sngWidthStep As Single Dim iStep As Long On Error Resume Next If frm.WindowState <> vbNormal Then Exit Sub sngLeft = frm.Left sngTop = frm.Top sngHeight = frm.Height sngWidth = frm.Width sngHeightStep = sngHeight / lNumSteps sngWidthStep = sngWidth / lNumSteps For iStep = 1 To lNumSteps sngNewHeight = sngNewHeight + sngHeightStep sngNewWidth = sngNewWidth + sngWidthStep frm.Move sngLeft + (sngWidth - sngNewWidth) / 2, _ sngTop + (sngHeight - sngNewHeight) / 2, sngNewWidth, sngNewHeight frm.Visible = True frm.Refresh Sleep lStepDuration Next frm.Move sngLeft, sngTop, sngWidth, sngHeight End Sub
Un peke�o efecto de kolores en tu form ... puedes poner lo en un boton en tu load donde desees..
code..
Command1.Visible = False Me.BackColor = vbBlack Me.FontSize = "15" a = "0" Do a = a + 1 b = Int(Rnd * 5 + 1) If b = "1" Then Me.ForeColor = vbRed If b = "2" Then Me.ForeColor = vbBlue If b = "3" Then Me.ForeColor = vbWhite If b = "4" Then Me.ForeColor = vbGreen If b = "5" Then Me.ForeColor = vbYellow Me.CurrentX = Int(Rnd * Me.Width + 1) Me.CurrentY = Int(Rnd * Me.Width + 1) Me.Print "|" Loop Until a = "10000" Me.Cls Command1.Visible = True
Este fue el efecto ke yo use en el flover es muy sencillo , solo pon en un boton o en lo ke desees , el siguiente kode...
GotoVal = Me.Height / 2 For Gointo = 1 To GotoVal DoEvents Me.Height = Me.Height - 10 If Me.Height <= 11 Then GoTo horiz Next Gointo horiz: Me.Height = 30 GotoVal = Me.Width / 2 For Gointo = 1 To GotoVal DoEvents Me.Width = Me.Width - 10 If Me.Width <= 11 Then End Next Gointo End
Kon este efecto tu label kambiara de kolores, necesitaras un timer y logiko kualkier label...
En el timer pon lo siguiente ..(el intervalo del timer puede ser a tu gusto pero rekuerdo de ponerlo si lo pones 1 sera mas rapido el kambio)
Static Col1, Col2, Col3 As Integer Static C1, C2, C3 As Integer If (Col1 = 0 Or Col1 = 250) And (Col2 = 0 Or Col2 = 250) And (Col3 = 0 Or Col3 = 250) Then C1 = Int(Rnd * 3) C2 = Int(Rnd * 3) C3 = Int(Rnd * 3) End If If C1 = 1 And Col1 <> 0 Then Col1 = Col1 - 10 If C2 = 1 And Col2 <> 0 Then Col2 = Col2 - 10 If C3 = 1 And Col3 <> 0 Then Col3 = Col3 - 10 If C1 = 2 And Col1 <> 250 Then Col1 = Col1 + 10 If C2 = 2 And Col2 <> 250 Then Col2 = Col2 + 10 If C3 = 2 And Col3 <> 250 Then Col3 = Col3 + 10 Label1.ForeColor = RGB(Col1, Col2, Col3)