|
101
|
Programación / Programación Visual Basic / Sistema de una Farmacia
|
en: 31 Julio 2008, 03:07 am
|
Hola todos; bueno hace unas semanas atraz hicimos un proyecto mis compañeros y yo se trata sobre una administracion de una farmacia; bueno eso fue para nuestro proyecto final de fin de ciclo jjeje. Lo que trata en el sistema es en controlar a los clientes, empleados, tambien tiene sus reportes, factura, etc bueno lo hicimos con apariencia al estilo de windows vista con su menu inicio y todo eso jeje. Descarga: Sistema de Farmacia - INKAFARMA
|
|
|
102
|
Programación / Programación Visual Basic / Reloj analogico
|
en: 30 Julio 2008, 00:28 am
|
Hola a todos bueno encontre este code x el google, es un reloj analogico la cual tiene algunos efecto y se mueve al mover el puntero pero lo que yo queria si alguien me puede ayudar con sta duda que tengo es de como puedo imprimirlo al lado derecho superior para que quede estatico como el reloj del vista. gracias de antemano. Solo necesita un Timer1.. Interval = 40 Dim Ymouse, Xmouse, dy(30), dx(30), Da(30), Mo(30) Dim Split1, Day1, Year1, Todaysdate, h, m, D, s, Face, Speed, n, scrll Dim Dsplit, HandHeight, Handwidth, HandX, HandY, Step, currStep Dim Test, ClockHeight, ClockWidth, ClockFromMouseY, ClockFromMouseX Dim Fcol, Mcol, Scol, Hcol, Dcol Private Type FL T(30) As Long Le(30) As Long End Type
Dim FL As FL Private Type HL T(30) As Long Le(30) As Long End Type Dim HL As HL
Private Type SL T(30) As Long Le(30) As Long End Type
Dim SL As SL Private Type ML T(30) As Long Le(30) As Long End Type
Dim ML As ML Private Type DL T(30) As Long Le(30) As Long End Type
Dim DL As DL Const PI = 3.1415
Private Sub Form_Load() Dcol = 150 '//color de la fecha. Fcol = vbBlue '//color de la cara. Scol = 0 '//color de los segundos. Mcol = 0 '//color de los minutos. Hcol = 0 '//horas de color. ClockHeight = 600 ClockWidth = 600 ClockFromMouseY = 1200 ClockFromMouseX = 600 '//¡No altere nada abajo! ¡Las alineaciones serán perdidas! Da(1) = "DOMINGO": Da(2) = "LUNES": Da(3) = "MARTES": Da(4) = "MIÉRCOLES" Da(5) = "JUEVES": Da(6) = "VIERNES": Da(7) = "SÁBADO" Mo(1) = "ENERO": Mo(2) = "FEBRERO": Mo(3) = "MARSO" Mo(4) = "ABRIL": Mo(5) = "MAYO": Mo(6) = "JUNIO": Mo(7) = "JULIO" Mo(8) = "AGOSTO": Mo(9) = "SEPTIEMBRE": Mo(10) = "OCTUBRE" Mo(11) = "NOVIEMBRE": Mo(12) = "DICIEMBRE" Day1 = Day(Now) Year1 = Year(Now) If (Year1 < 2000) Then Year1 = Year1 + 1900 Todaysdate = " " + Da(Weekday(Now)) + " " + Str(Day1) + " " + Mo(Month(Now)) + " " + Str(Year1) D = Todaysdate h = "..." m = "...." s = "....." Face = "1 2 3 4 5 6 7 8 9 101112 " Form1.Font = "Arial" Form1.FontSize = 8 Speed = 0.6 n = Len(Face) - 2 Ymouse = 0 Xmouse = 0 scrll = 0 Split1 = 360 / n Dsplit = 360 / Len(D) HandHeight = ClockHeight / 4.5 Handwidth = ClockWidth / 4.5 HandY = -7 HandX = -2.5 scrll = 0 '2 * Altura Del Reloj Step = 0.06 currStep = 0 End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Ymouse = Y + ClockFromMouseY ':acontecimiento Y + reloj del ratón Y; Xmouse = X + ClockFromMouseX ':acontecimiento X + reloj del ratón X; End Sub
Private Sub Timer1_Timer() dy(0) = dy(0) + (Ymouse - dy(0)) * Speed dy(0) = Fix(dy(0)) dx(0) = dx(0) + (Xmouse - dx(0)) * Speed dx(0) = Fix(dx(0)) For i = 1 To Len(D) - 1 dy(i) = dy(i) + (dy(i - 1) - dy(i)) * Speed dy(i) = Fix(dy(i)) dx(i) = dx(i) + (dx(i - 1) - dx(i)) * Speed dx(i) = Fix(dx(i)) Next i secs = Second(Now) sec = -1.57 + PI * secs / 30 Mins = Minute(Now) Min = -1.57 + PI * Mins / 30 hr = Hour(Now) hrs = -1.575 + PI * hr / 6 + PI * Int(Minute(Now)) / 360 For i = 0 To n - 2 FL.T(i) = dy(i) + ClockHeight * Sin(-1.0471 + i * Split1 * PI / 180) + scrll FL.Le(i) = dx(i) + ClockWidth * Cos(-1.0471 + i * Split1 * PI / 180) Next i For i = 0 To Len(h) - 1 HL.T(i) = dy(i) + HandY + (i * HandHeight) * Sin(hrs) + scrll HL.Le(i) = dx(i) + HandX + (i * Handwidth) * Cos(hrs) Next i For i = 0 To Len(m) - 1 ML.T(i) = dy(i) + HandY + (i * HandHeight) * Sin(Min) + scrll ML.Le(i) = dx(i) + HandX + (i * Handwidth) * Cos(Min) Next i For i = 0 To Len(s) - 1 SL.T(i) = dy(i) + HandY + (i * HandHeight) * Sin(sec) + scrll SL.Le(i) = dx(i) + HandX + (i * Handwidth) * Cos(sec) Next i For i = 0 To Len(D) - 1 DL.T(i) = dy(i) + ClockHeight * 1.5 * Sin(currStep + i * Dsplit * PI / 180) + scrll DL.Le(i) = dx(i) + ClockWidth * 1.5 * Cos(currStep + i * Dsplit * PI / 180) Next i currStep = currStep - Step P End Sub
Private Function SP(ByVal ST As String, ByVal Nu As Integer, Optional K As Byte = 1) As String SP = Mid(ST, Nu + 1, K) End Function
Private Sub P() Cls With Form1 .FontBold = False .ForeColor = Dcol For i = 0 To Len(D) - 1 .CurrentY = DL.T(i) .CurrentX = DL.Le(i) Print SP(D, i) Next i .ForeColor = Fcol For i = 0 To n - 1 .CurrentY = FL.T(i) .CurrentX = FL.Le(i) If (i = 18 Or i = 20 Or i = 22) Then Print SP(Face, i, 2) i = i + 1 Else Print SP(Face, i, 1) End If Next i .FontBold = True .ForeColor = Scol For i = 0 To Len(s) - 1 .CurrentY = SL.T(i) .CurrentX = SL.Le(i) Print SP(s, i) Next i .ForeColor = Mcol For i = 0 To Len(m) - 1 .CurrentY = ML.T(i) .CurrentX = ML.Le(i) Print SP(m, i) Next i .ForeColor = Hcol For i = 0 To Len(h) - 1 .CurrentY = HL.T(i) .CurrentX = HL.Le(i) Print SP(h, i) Next i End With End Sub
|
|
|
103
|
Programación / Programación Visual Basic / Mostrar picture al presionar una tecla
|
en: 19 Julio 2008, 21:57 pm
|
Hola todos bueno; tengo un problemilla tengo en un form y un picture y una vez que este ejecutado al presionar la tecla del boton inicio se ponga visible dicho picture claro k estaba visible = false no se si alguien me pueda mostrar un ejemplo gracias de antemano Salu2...
|
|
|
104
|
Programación / Programación Visual Basic / Re: Ejecucion en diferentes SistemasOperativos XP y Vista
|
en: 8 Julio 2008, 01:08 am
|
Hola seba123neo gracias por la respuesta mira buscando en la pag. de recursos de visual encontre este code que utiliza el ShellExecute pero no entiendo bien el code haber si alguien me puede dar por lo menos una orientacion Option Explicit ' Declaración del api ShellExecute Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long 'Constantre para el modo en que se abre la ventana: Normal Private Const SW_SHOWNORMAL = 1 Private Sub Buscar_Windows(path As String) ShellExecute hwnd, "Find", path, _ vbNullString, _ vbNullString, _ SW_SHOWNORMAL End Sub Private Sub cmdFind_Click() 'Abre la ventana de búsqueda en el directorio de windows Buscar_Windows "c:\windows" End Sub El code ase que se habra La Busqueda de Windows, eh yo estoy tratando de abrir casi todo el Office por no decir todo y la calculadora haber si me dan una breve explicacion del code gracias..
|
|
|
105
|
Programación / Programación Visual Basic / Ejecucion en diferentes SistemasOperativos XP y Vista
|
en: 8 Julio 2008, 00:40 am
|
Hola a todos bueno tengo una duda; bueno tengo un Boton la cual quiero ejecutar por ejemplo la calculadora de windows pero la duda es que como hago si es que estoy en sistema operativo de XP es obio que se va abrir la calcualdora y si estoy en Windows Vista que se ejecutara la calculadora de vista y si en ninguno de estos sistemas no existiera la calculadora se desabiliatara el boton bueno no se si se entiende mi pregunta?? Salu2.
|
|
|
108
|
Programación / Programación Visual Basic / Re: PasswordChar
|
en: 25 Junio 2008, 17:10 pm
|
Hola gracias por las respuestas todo esta ok pero ay un solo problemita miren si doy un click en el text se limpia el mensaje para poder escribir ia hasta ai ok pero si dejo en blanco el text y doy un click en el form me tiene k mostrar nuevamente el mensaje "Escriba su Contra", pero me muetsra el mensaje en asteriscos ********* ese es mi problema y nuevamente gracias x las respuestas... Private Sub Command1_Click() If Text1.Text = "" Then Exit Sub If Not Text1.Text = "seba" Then Exit Sub Else MsgBox "correcto" Unload Me End If End Sub Private Sub Form_Load() Text1.Text = "Escriba su contraseña" Text1.SelLength = Len(Text1.Text) Text1.PasswordChar = "" End Sub Private Sub Text1_Change() Text1.PasswordChar = "*" End Sub Private Sub Text1_Click() Text1.Text = "" End Sub
Private Sub Text1_LostFocus() Select Case Text1.Text Case Is = "" Text1.Text = "Escriba su Contraseña" End Select End Sub
Private Sub Form_Click() Select Case Text1.Text Case Is = "" Text1.Text = "Escriba su Contraseña" End Select End Sub
|
|
|
109
|
Programación / Programación Visual Basic / Re: PasswordChar
|
en: 25 Junio 2008, 14:48 pm
|
Hola sebas gracias por darte un tiempito en mi problema, uhm bueno hats y todo bien pero el problema es que cuando un click en el text supuesta se borra el mensaje "Escriba aqui su Contra" para poder escribir la contraseña supuestamente, pero aqui viene el problema sino escribo nada osea dejo en blanco el text me tiene que seguir saliendo el mensaje "Escriba aqui su Contra" pero e problema es que me sale ia en PasswordChar osea ******** no se si me dejo entender....
|
|
|
110
|
Programación / Programación Visual Basic / PasswordChar
|
en: 25 Junio 2008, 06:01 am
|
Hola bueno haber si me hechan una manito; Bueno lo que estoy trantando de hacer esk al iniciar el Prog. me sale seleccioando en el Text mostrandome este mensaje "Escriba su Contraseña", hasta ai todo bien pero lo que quiero hacer es que al escribir se escriba pero en hasteriscos claro utilizando el PasswordChar pero lo he estado trantando de hacer pero no me sale habe si me orientan este es lo que eh avanzado.. Private Sub Text1_Click() Select Case Text1.Text Case Is = "Escriba su Contraseña" Text1.Text = "" Case Is <> "Escriba su Contraseña" End Select End Sub
Private Sub Text1_LostFocus() Select Case Text1.Text Case Is = "" Text1.Text = "Escriba su Contraseña" End Select End Sub
Private Sub Form_Click() Select Case Text1.Text Case Is = "" Text1.Text = "Escriba su Contraseña" End Select End Sub
Private Sub Form_Load() Text1 = "Escriba su Contraseña" Text1.SelLength = Len(Text1.Text) End Sub
|
|
|
|
|
|
|