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 - BlackZeroX

#1271
.
while lineas<3 and Not EOF(1)

Dulces Lunas!¡.
#1272
.
Buena por el tetris (es mi vicio) .

PAra que no se coma el procesador:

Código (vb) [Seleccionar]


' // poner este código en algún otro proceso y que sea llamado por el proceso form_load y/o en form_resize.
' // Sustituí algunas zonas del código donde se presenta la división con números decimales ( / ) por la divicion entera ( \ )

'Private Sub Fondo_Timer()
      Const nLineasH As Long = 50
      Const nLineasV As Long = 500
      GRIS = nLineasH + 1
      AutoRedraw = True               ' //  Esta linea hace que no se borre nada.
      'LINEAS HORIZONTALES DE ABAJO
      'For Y = Me.ScaleHeight To Me.ScaleHeight - Int(Me.ScaleHeight / 4) Step -Int(Me.ScaleHeight / (4 * nLineasH))
      For Y = Me.ScaleHeight To (Me.ScaleHeight - Me.ScaleHeight \ 4) Step (Not (Me.ScaleHeight / (4 * nLineasH)) - 1)
          GRIS = GRIS - 1
          Me.Line (0, Y)-(Me.ScaleWidth, Y), RGB(GRIS, GRIS, GRIS)
      Next
      'LINEAS VERTICALES EN DEGRADE DE ABAJO
' //      For X = 0 To Me.ScaleWidth Step Int(Me.ScaleWidth / nLineasV)
      For X = 0 To Me.ScaleWidth Step (Me.ScaleWidth \ nLineasV)
          GRIS = nLineasH + 1
          'For Y = Me.ScaleHeight To Me.ScaleHeight - Int(Me.ScaleHeight / 4) Step -Int(Me.ScaleHeight / (4 * nLineasH))
          For Y = Me.ScaleHeight To (Me.ScaleHeight - (Me.ScaleHeight \ 4)) Step (Not (Me.ScaleHeight \ (4 * nLineasH)) - 1)
              GRIS = GRIS - 1
              Me.Line (X, Y)-(X, Y - (Me.ScaleHeight \ (4 * nLineasH))), RGB(GRIS, GRIS, GRIS)
          Next
      Next
'      Fondo.Enabled = false   '// No tiene caso
      '0,217,217
'End Sub




@ignorantev1.1

se ve mas limpio y mas eficiente un comentario cuando sabes leer y respondes a lo ultimo, si fuera de hace tiempo es razonable citarlo pero en caso contrario se ve feo y ademas hasta da weba leer;   me da weba visual ademas que el scroll de mi mouse es una cochinada ¬¬".

P.D.: El programa lo usare para proteger mi pc, ya que mis sobrinos siempre entran a mi cuarto a toquetear mis cosas... a tal grado que instale el Avira ( Asi de paranoico ando ).

Dulces Lunas!¡.
#1273
.
Yo usaría PIPES ( No son exclusivos de Linux ni de Windows, de hecho se implementan de manera similar. )

Dulces Lunas!¡.
#1274
.
Me a parecido fantástico este buscador, asi que se los comparto.

Google Code Search

Temibles Lunas!¡.
#1275
.
Pónganle chincheta al tema wolfbcn a respondido, = no es robot o lo es? R:= Robocot.

Dulces Lunas!¡.
#1276
Foro Libre / Re: Para Google 3 pingüinos son:
18 Junio 2011, 09:52 AM
.
tomando en cuenta la capacidad de almacenamiento que tiene google es mejor una patrón de colores ( Gammas de ellos ) que un algoritmo... aunque no estaría demás uno que lo complemente y que sea publico xP.

Dulces Lunas!¡.
#1277
Foro Libre / Re: Para Google 3 pingüinos son:
18 Junio 2011, 06:50 AM
.
Pues yo estoy perplejo con eso!¡.

P.D.: la búsqueda si se ve que es por patrones de colores mas que por contornos!¡.

Dulces Lunas!¡.
#1278
Programación C/C++ / Re: ahorcado
18 Junio 2011, 03:54 AM
.
Cada cosa a su tiempo, primero que se aprenda el lenguaje y lo demás como lo que no hay que hacer, estructura, ordenamiento serán ya los últimos, después con TODO lo anterior aprendido se pueden entrar en proyectos, así es como se aprende Prueba-Error ( pequeños programas como este ).

Dulces Lunas!¡.
#1279
Las voces finas se oyen mejor, mi voz en muy grave a tal grade que desde los 15 años desde teléfono me decían viejo o señor, ademas de que puede ser que no se me entiende en ocasiones, lo bueno es que mi voz impone y no aburre xP, las voces finas se entienden hasta cierto grado, aun que nada no importa si es fina(aguda) o imponente(grave) si no la dicción.

Por otro lado antes de meterte con cosas de tutoriales deberias explicar que tiene el IDE que ociones se tienen ademas de este IDE.

También deberías entrar en temas un poco mas técnicos a la larga pero TODAS las definiciones deberías darlas a explicar antes.

P.D.: Oprime F2 en el IDE (en el VB6)... también has esta prueba hasta que te salga:  escribe "vb." (con el punto dentro de la sección donde escribes código fuente escribe-lo no lo copies).

Dulces Lunas!¡.
#1280
.
jeje no revisaste la liga al ejemplo de M$ que te puse, revisa el ejemplo de mi post anterior hay viene un código con la información respectiva para enumerar los recursos usa el api EnumResourceNames (Esta un ejemplo en la liga ejemplo de arriba).

pero por si las moscas:

Código (cpp) [Seleccionar]


HGLOBAL hResLoad;   // handle to loaded resource
HMODULE hExe;       // handle to existing .EXE file
HRSRC hRes;         // handle/ptr. to res. info. in hExe
HANDLE hUpdateRes;  // update resource handle
LPVOID lpResLock;   // pointer to resource data
BOOL result;
#define IDD_HAND_ABOUTBOX   103
#define IDD_FOOT_ABOUTBOX   110

// Load the .EXE file that contains the dialog box you want to copy.
hExe = LoadLibrary(TEXT("hand.exe"));
if (hExe == NULL)
{
    ErrorHandler(TEXT("Could not load exe."));
    return;
}

// Locate the dialog box resource in the .EXE file.
hRes = FindResource(hExe, MAKEINTRESOURCE(IDD_HAND_ABOUTBOX), RT_DIALOG);
if (hRes == NULL)
{
    ErrorHandler(TEXT("Could not locate dialog box."));
    return;
}

// Load the dialog box into global memory.
hResLoad = LoadResource(hExe, hRes);
if (hResLoad == NULL)
{
    ErrorHandler(TEXT("Could not load dialog box."));
    return;
}

// Lock the dialog box into global memory.
lpResLock = LockResource(hResLoad);
if (lpResLock == NULL)
{
    ErrorHandler(TEXT("Could not lock dialog box."));
    return;
}

// Open the file to which you want to add the dialog box resource.
hUpdateRes = BeginUpdateResource(TEXT("foot.exe"), FALSE);
if (hUpdateRes == NULL)
{
    ErrorHandler(TEXT("Could not open file for writing."));
    return;
}

// Add the dialog box resource to the update list.
result = UpdateResource(hUpdateRes,    // update resource handle
    RT_DIALOG,                         // change dialog box resource
    MAKEINTRESOURCE(IDD_FOOT_ABOUTBOX),         // dialog box id
    MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),  // neutral language
    lpResLock,                         // ptr to resource info
    SizeofResource(hExe, hRes));       // size of resource info

if (result == FALSE)
{
    ErrorHandler(TEXT("Could not add resource."));
    return;
}

// Write changes to FOOT.EXE and then close it.
if (!EndUpdateResource(hUpdateRes, FALSE))
{
    ErrorHandler(TEXT("Could not write changes to file."));
    return;
}

// Clean up.
if (!FreeLibrary(hExe))
{
    ErrorHandler(TEXT("Could not free executable."));
    return;
}



y para enumerar TODOS los recursos:

Código (cpp) [Seleccionar]


HANDLE g_hFile;   // global handle to resource info file
// Declare callback functions.
BOOL EnumTypesFunc(
       HMODULE hModule,
       LPTSTR lpType,
       LONG lParam);
   
BOOL EnumNamesFunc(
       HMODULE hModule,
       LPCTSTR lpType,
       LPTSTR lpName,
       LONG lParam);
   
BOOL EnumLangsFunc(
       HMODULE hModule,
       LPCTSTR lpType,
       LPCTSTR lpName,
       WORD wLang,
       LONG lParam);



HMODULE hExe;        // handle to .EXE file
TCHAR szBuffer[80];  // print buffer for info file
DWORD cbWritten;     // number of bytes written to resource info file
size_t cbString;     // length of string in szBuffer
HRESULT hResult;

// Load the .EXE whose resources you want to list.
hExe = LoadLibrary(TEXT("hand.exe"));
if (hExe == NULL)
{
    // Add code to fail as securely as possible.
    return;
}

// Create a file to contain the resource info.
g_hFile = CreateFile(TEXT("resinfo.txt"),   // name of file
    GENERIC_READ | GENERIC_WRITE,      // access mode
    0,                                 // share mode
    (LPSECURITY_ATTRIBUTES) NULL,      // default security
    CREATE_ALWAYS,                     // create flags
    FILE_ATTRIBUTE_NORMAL,             // file attributes
    (HANDLE) NULL);                    // no template
if (g_hFile == INVALID_HANDLE_VALUE)
{
    ErrorHandler(TEXT("Could not open file."));
    return;
}

// Find all of the loaded file's resources.
hResult = StringCchPrintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR),
    TEXT("The file contains the following resources:\r\n\r\n"));
if (FAILED(hResult))
{
    // Add code to fail as securely as possible.
    return;
}

hResult = StringCchLength(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), &cbString);
if (FAILED(hResult))
{
    // Add code to fail as securely as possible.
    return;
}

WriteFile(g_hFile,       // file to hold resource info
    szBuffer,            // what to write to the file
    (DWORD) cbString,    // number of bytes in szBuffer
    &cbWritten,          // number of bytes written
    NULL);               // no overlapped I/O

EnumResourceTypes(hExe,              // module handle
    (ENUMRESTYPEPROC)EnumTypesFunc,  // callback function
    0);                              // extra parameter

// Unload the executable file whose resources were
// enumerated and close the file created to contain
// the resource information.
FreeLibrary(hExe);
CloseHandle(g_hFile);

































































//    FUNCTION: EnumTypesFunc(HANDLE, LPSTR, LONG)
//
//    PURPOSE:  Resource type callback
BOOL EnumTypesFunc(
        HMODULE hModule,  // module handle
        LPTSTR lpType,    // address of resource type
        LONG lParam)      // extra parameter, could be
                          // used for error checking
{
    TCHAR szBuffer[80];  // print buffer for info file
    DWORD cbWritten;     // number of bytes written to resource info file
    size_t cbString;
    HRESULT hResult;

    // Write the resource type to a resource information file.
    // The type may be a string or an unsigned decimal
    // integer, so test before printing.
    if (!IS_INTRESOURCE(lpType))
    {
        hResult = StringCchPrintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), TEXT("Type: %s\r\n"), lpType);
        if (FAILED(hResult))
        {
            // Add code to fail as securely as possible.
            return FALSE;
        }
    }
    else
    {
        hResult = StringCchPrintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), TEXT("Type: %u\r\n"), (USHORT)lpType);
        if (FAILED(hResult))
        {
            // Add code to fail as securely as possible.
            return FALSE;
        }
    }

    hResult = StringCchLength(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), &cbString);
    if (FAILED(hResult))
    {
        // Add code to fail as securely as possible.
        return FALSE;
    }

    WriteFile(g_hFile, szBuffer, (DWORD) cbString, &cbWritten, NULL);
    // Find the names of all resources of type lpType.
    EnumResourceNames(hModule,
        lpType,
        (ENUMRESNAMEPROC)EnumNamesFunc,
        0);

    return TRUE;
}

//    FUNCTION: EnumNamesFunc(HANDLE, LPSTR, LPSTR, LONG)
//
//    PURPOSE:  Resource name callback
BOOL EnumNamesFunc(
        HMODULE hModule,  // module handle
        LPCTSTR lpType,   // address of resource type
        LPTSTR lpName,    // address of resource name
        LONG lParam)      // extra parameter, could be
                          // used for error checking
{
    TCHAR szBuffer[80];  // print buffer for info file
    DWORD cbWritten;     // number of bytes written to resource info file
    size_t cbString;
    HRESULT hResult;

    // Write the resource name to a resource information file.
    // The name may be a string or an unsigned decimal
    // integer, so test before printing.
    if (!IS_INTRESOURCE(lpName))
    {
        hResult = StringCchPrintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), TEXT("\tName: %s\r\n"), lpName);
        if (FAILED(hResult))
        {
            // Add code to fail as securely as possible.
            return FALSE;
        }
    }
    else
    {
        hResult = StringCchPrintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), TEXT("\tName: %u\r\n"), (USHORT)lpName);
        if (FAILED(hResult))
        {
            // Add code to fail as securely as possible.
            return FALSE;
        }
    }

    hResult = StringCchLength(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), &cbString);
    if (FAILED(hResult))
    {
        // Add code to fail as securely as possible.
        return FALSE;
    }
   
    WriteFile(g_hFile, szBuffer, (DWORD) cbString, &cbWritten, NULL);
    // Find the languages of all resources of type
    // lpType and name lpName.
    EnumResourceLanguages(hModule,
        lpType,
        lpName,
        (ENUMRESLANGPROC)EnumLangsFunc,
        0);

    return TRUE;
}

//    FUNCTION: EnumLangsFunc(HANDLE, LPSTR, LPSTR, WORD, LONG)
//
//    PURPOSE:  Resource language callback
BOOL EnumLangsFunc(
        HMODULE hModule, // module handle
        LPCTSTR lpType,  // address of resource type
        LPCTSTR lpName,  // address of resource name
        WORD wLang,      // resource language
        LONG lParam)     // extra parameter, could be
                         // used for error checking
{
    HRSRC hResInfo;
    TCHAR szBuffer[80];  // print buffer for info file
    DWORD cbWritten;     // number of bytes written to resource info file
    size_t cbString;
    HRESULT hResult;

    hResInfo = FindResourceEx(hModule, lpType, lpName, wLang);
    // Write the resource language to the resource information file.
    hResult = StringCchPrintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), TEXT("\t\tLanguage: %u\r\n"), (USHORT) wLang);
    if (FAILED(hResult))
    {
        // Add code to fail as securely as possible.
        return FALSE;
    }

    hResult = StringCchLength(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), &cbString);
    if (FAILED(hResult))
    {
        // Add code to fail as securely as possible.
        return FALSE;
    }

    WriteFile(g_hFile, szBuffer, (DWORD) cbString, &cbWritten, NULL);
    // Write the resource handle and size to buffer.
    hResult = StringCchPrintf(szBuffer,
        sizeof(szBuffer)/sizeof(TCHAR),
        TEXT("\t\thResInfo == %lx,  Size == %lu\r\n\r\n"),
        hResInfo,
        SizeofResource(hModule, hResInfo));
    if (FAILED(hResult))
    {
        // Add code to fail as securely as possible.
        return FALSE;
    }

    hResult = StringCchLength(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), &cbString);
    if (FAILED(hResult))
    {
        // Add code to fail as securely as possible.
        return FALSE;
    }

    WriteFile(g_hFile, szBuffer, (DWORD)cbString, &cbWritten, NULL);
    return TRUE;
}



Dulces Lunas!¡.