Menú

Mostrar Mensajes

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ú

Mensajes - Myth.ck

#31
 :D Muchas gracias artikbot... jeje yo tambien queria implementarlo luego en c++  :P
#32
Una pregunta, al ser python un lenguaje que no necesita ser compilado...
(En realidad nunca he utilizado python, pero creo que es para webs), sin embargo podria crear aplicaciones modo consola?
#33
Al tratar de compilarlo te larga error?... Antes de ponerme a leer todos esos if's anidados te agradeceria que pongas el error al compilar.
#34
Path="Ruta" Jaja ya mas pistas no te puedo dar... tengo Ganas de Iterar Feamente..

Salu2!
#35
O tambien a este ejemplo:

http://www.codeproject.com/KB/cs/workingcd.aspx

Salu2!
#36
Hola meta te refieres a esto?:

Código (csharp) [Seleccionar]
using System;
using System.Text;
using System.Runtime.InteropServices;

namespace EjectMedia
{
class Program
{
static void Main(string[] args)
{
// My CDROM is on drive E:
EjectMedia.Eject(@"\\.\E:");
}
}

class EjectMedia
{
// Constants used in DLL methods
const uint GENERICREAD = 0x80000000;
const uint OPENEXISTING = 3;
const uint IOCTL_STORAGE_EJECT_MEDIA = 2967560;
const int INVALID_HANDLE = -1;


// File Handle
private static IntPtr fileHandle;
private static uint returnedBytes;

// Use Kernel32 via interop to access required methods

// Get a File Handle
[DllImport("kernel32", SetLastError = true)]
static extern IntPtr CreateFile(string fileName,
uint desiredAccess,
uint shareMode,
IntPtr attributes,
uint creationDisposition,
uint flagsAndAttributes,
IntPtr templateFile);

[DllImport("kernel32", SetLastError=true)]
static extern int CloseHandle(IntPtr driveHandle);

[DllImport("kernel32", SetLastError = true)]
static extern bool DeviceIoControl(IntPtr driveHandle,
uint IoControlCode,
IntPtr lpInBuffer,
uint inBufferSize,
IntPtr lpOutBuffer,
uint outBufferSize,
ref uint lpBytesReturned,
IntPtr lpOverlapped);


public static void Eject(string driveLetter)
{
try
{
// Create an handle to the drive
fileHandle = CreateFile(driveLetter,
GENERICREAD,
0,
IntPtr.Zero,
OPENEXISTING,
0,
IntPtr.Zero);

if ((int)fileHandle != INVALID_HANDLE)
{
// Eject the disk
DeviceIoControl(fileHandle,
IOCTL_STORAGE_EJECT_MEDIA,
IntPtr.Zero, 0,
IntPtr.Zero, 0,
ref returnedBytes,
IntPtr.Zero);
}

}
catch
{
throw new Exception(Marshal.GetLastWin32Error().ToString());
}
finally
{
// Close Drive Handle
CloseHandle(fileHandle);
fileHandle = IntPtr.Zero;
}
}


}
}

#37
Estas en el nivel 8, pero no es ese el lugar... Tienes que buscar una "ruta"

Salu2!
#38
Espero que te sirve lo hice a las apuradas en 5 min
Código (vb) [Seleccionar]
Dim dia As Integer
Dim mes As Integer
Dim reponse As Boolean
Private Sub Form_Load()
    dia = InputBox("Ingrese dia", "Signos")
    mes = InputBox("Ingrese mes", "Signos")
    Select Case mes
        Case 1
        If dia < 21 Then
            reponse = MsgBox("CAPRICORNIO", vbOKOnly)
        Else: reponse = MsgBox("ACUARIO", vbOKOnly)
        End If
        Case 2
        If dia < 20 Then
            reponse = MsgBox("ACUARIO", vbOKOnly)
        Else: reponse = MsgBox("PISCIS", vbOKOnly)
        End If
        Case 3
        If dia < 21 Then
            reponse = MsgBox("PISCIS", vbOKOnly)
        Else: reponse = MsgBox("ARIES", vbOKOnly)
        End If
        Case 4
        If dia < 21 Then
            reponse = MsgBox("ARIES", vbOKOnly)
        Else: reponse = MsgBox("TAURO", vbOKOnly)
        End If
        Case 5
        If dia < 21 Then
            reponse = MsgBox("TAURO", vbOKOnly)
        Else: reponse = MsgBox("GEMINIS", vbOKOnly)
        End If
        Case 6
        If dia < 22 Then
            reponse = MsgBox("GEMINIS", vbOKOnly)
        Else: reponse = MsgBox("CANCER", vbOKOnly)
        End If
        Case 7
        If dia < 23 Then
            reponse = MsgBox("CANCER", vbOKOnly)
        Else: reponse = MsgBox("LEO", vbOKOnly)
        End If
        Case 8
        If dia < 23 Then
            reponse = MsgBox("LEO", vbOKOnly)
        Else: reponse = MsgBox("VIRGO", vbOKOnly)
        End If
      Case 9
      If dia < 23 Then
            reponse = MsgBox("VIRGO", vbOKOnly)
        Else: reponse = MsgBox("LIBRA", vbOKOnly)
        End If
      Case 10
      If dia < 23 Then
            reponse = MsgBox("LIBRA", vbOKOnly)
        Else: reponse = MsgBox("ESCORPIO", vbOKOnly)
        End If
      Case 11
      If dia < 22 Then
            reponse = MsgBox("ESCORPIO", vbOKOnly)
        Else: reponse = MsgBox("SAGITARIO", vbOKOnly)
        End If
      Case 12
      If dia < 22 Then
            reponse = MsgBox("SAGITARIO", vbOKOnly)
        Else: reponse = MsgBox("CAPRICORNIO", vbOKOnly)
      End If
     
      Case Else
       reponse = MsgBox("Error")
End Select
End Sub

#39
 :¬¬ hay un psd no tengo el photoshop  :P

jaja
#40
Me clave en el 8 :S alguna pista? es el js? :rolleyes: