Search:

Type: Posts; User: Megatron

Page 1 of 13 1 2 3 4

Search: Search took 0.18 seconds.

  1. Replies
    42
    Views
    2,148

    Re: Long Time members, not "seen" for a while...

    Ha, didn't know people still remembered me around here

    Well, I'd like to tell you guys something extravagant, like I'm a motorcycle daredevil, but the truth is I'm still the same guy. Just a bit...
  2. Re: ListView scroll not firing when a new item is added?

    I've ran some tests, and looks like this functionality of scrolling to the top is built into the ListView control, itself, and not linked with the scrollbar.

    An API-message spy will show you a...
  3. Replies
    6
    Views
    2,920

    Re: SafeArrayGetDim question.

    Bear in mind, the function also implies that you are creating the array with SafeArrayCreate(). Is this the case with you?
  4. Replies
    2
    Views
    1,010

    Re: create process *.cmd file execution failed

    You need to elaborate further.

    Is it just an executable file? If so ShellExecute() should work.
  5. Replies
    12
    Views
    6,417

    Re: sending text to cmd.exe?

    Well remember that the command prompt is "all one window" (I.e. the main window is not separated from the text entry part, like Notepad is) so sending WM_SETTEXT will only change the window's...
  6. Replies
    12
    Views
    6,417

    Re: sending text to cmd.exe?

    Rob: Since we're sending WM_CHAR directly, it will work with SendMessage too. If however, we tried to send WM_KEYDOWN and WM_KEYUP, it would fail, since it bypasses the message queue, and thus, the...
  7. Replies
    12
    Views
    6,417

    Re: sending text to cmd.exe?

    You shouldn't have to bring pipes into it

    The following works for me

    Private Declare Function PostMessage Lib "user32.dll" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal...
  8. Re: anyone know what message is sent when clicking on Internet Explorer menu items?

    What leads you to believe it isn't WM_COMMAND?
  9. Replies
    4
    Views
    790

    Re: magnify screen

    In terms of API, the StretchBlt function can be used to redraw an image with different dimensions.

    That's the basis of a ZoomIn program.
  10. Replies
    8
    Views
    20,141

    Re: Send mouse click within a window

    Chris's example looks OK to me; Except use PostMessage instead of SendMessage


    Private Const WM_LBUTTONDOWN As Long = &H201
    Private Const WM_LBUTTONUP As Long = &H202
    Private Declare Function...
  11. Replies
    12
    Views
    6,417

    Re: sending text to cmd.exe?

    If the window is already open, and you want to send text to it, treat it like any other standard window. I believe the classname is "tty" so pass that through FindWindow and then use PostMessage to...
  12. Thread: System Menu

    by Megatron
    Replies
    3
    Views
    526

    Re: System Menu

    Does 61587 take into account all 3?

    I haven't tested it, but the following should do the trick (modification of subclassed window's winproc)

    Private Const SC_CLOSE As Long = &HF060&
    Private...
  13. Re: How to detect from within program if it was started automatically at boot up?

    There is no API for it.

    Passing a startup switch looks like the easiest method
  14. Replies
    8
    Views
    857

    Re: Clicking Button On Another Program

    How does the window pop up? Does it have focus? And do you want to button to be pressed automatically? I.e. In Dreamvb's code you have to initiate it by clicking a button on your window first....
  15. Thread: Sending text

    by Megatron
    Replies
    28
    Views
    4,618

    Re: Sending text

    Have you tried sending WM_KEYDOWN and WM_KEYUP messages? (Using PostMessage)
  16. Replies
    6
    Views
    835

    Re: Why won't this code work?

    There's also the keybd_event() function.
  17. Thread: New Help

    by Megatron
    Replies
    2
    Views
    361

    Re: New Help

    Use FindWindowEx to get the handle of the top-level window, and children (pass the parent as the first argument to get the children).

    To click the button, use SendMessage to send the BM_CLICK...
  18. Re: Passing info from one form to another

    Pass the instance of your "main" form through a (modified) constructor of your "alert" Form.
  19. Replies
    1
    Views
    694

    Re: Hooking Api that openes files and urls

    You could set up a WH_SHELL hook, and scan the title of a window when it's created. See this link for setting up the hook.

    You'll need to modify the ShellProc callback function to look something...
  20. Replies
    2
    Views
    553

    Re: DoEvents ...?!?

    If you're using C++, it's easier just to run it in a separate thread.
  21. Thread: print

    by Megatron
    Replies
    2
    Views
    546

    Re: print

    You shouldn't need API's for this, as it can be done directly from VB.

    Printer.Orientation = vbPRORLandscape
  22. Replies
    11
    Views
    1,226

    Re: What to send to this textbox?

    I'm with SLH on this one: First figure out what kind of control it is: RichEdit or Edit? (or something else). In any case, find out the class name, as well as the window handle. In your application,...
  23. Thread: Video capture

    by Megatron
    Replies
    33
    Views
    21,769

    Re: Video capture

    When does this happen? I.e. Which message is sent just before this dialog pops up?

    Are you sending the WM_CAP_DLG_VIDEOSOURCE message?
  24. Replies
    15
    Views
    887

    Re: Can this be done without hooking?

    Just to clarify:

    The idea behind installing hooks is that the callback must be mapped in the processes own address space. This is achieved by storing the callback in a DLL module. Since VB can...
  25. Re: confused... can someone explain this?

    What's your question, exactly?

    wsprintf() is a C function that formats a string with specific values.

    In VB we do:


    myStr = "My name is " & sName & ". I live in " & sCity
  26. Re: is there a way to create cursors? or find cool ones off that internet thing?

    From the IDE:

    File > New > File, and select either Icon or Curosr.
  27. Replies
    11
    Views
    1,062

    Re: Program freezes in *.exe but works in VB?

    By Rebooting
  28. Replies
    35
    Views
    20,816

    Re: Save as Video File

    Set the fYeild member of the CAPTUREPARMS structure to 1. This will run the capture window in separate thread.
  29. Replies
    3
    Views
    659

    Re: change form style

    You need to be a little more specific. What do you need to change?

    The background colour can be changed via the BackColor property.

    To get rid of the title bar, set the Form's ControlBox to...
  30. Replies
    2
    Views
    1,142

    Re: Error with SqlConnection and SqlDataAdapter

    Add the following to the top of your class

    Imports System.Data.SqlClient


    Alternatively, you can reference it in the following manner

    Dim MyConnection As System.Data.SqlClient.SqlConnection
  31. Replies
    2
    Views
    628

    Re: retrieving data

    So which part are you stuck on? Transferring the data? Or determining the highest score?

    Transferring the data is just setting a property

    Dim frm As New frmHighScores
    frm.MyLabel.Text =...
  32. Replies
    18
    Views
    1,157

    Re: VB calling API [resolved - for now] :O)

    Bear in mind that the core Win32 API is antique, itself (pre-1999)

    That book will help you get a general understand and feel for the main components of the API

    Once you understand the guts, the...
  33. Thread: I Need Help!!

    by Megatron
    Replies
    2
    Views
    535

    Re: I Need Help!!

    Try:

    Option Explicit

    Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
    Private Declare Function FindWindowEx Lib "user32" Alias...
  34. Thread: Video capture

    by Megatron
    Replies
    33
    Views
    21,769

    Re: Video capture

    There are 2 messages you need to look into: WM_CAP_SET_CALLBACK_FRAME and WM_CAP_SET_CALLBACK_VIDEOSTREAM. Both of these set up callback functions just prior to displaying a frame in the preview...
  35. Re: How do I select a value in a database? :)

    Here's a sample using ADO.

    So be sure to include a reference to "Microsoft ActiveX Data Objects" under Project > References

    Dim cnn As New Connection
    Dim rst As New Recordset

    'Replace the...
  36. Re: Difference between a callback and an event?

    Here is that article

    "The key conceptual difference between an event interface and a callback interface is that an event is designed to be more like an anonymous broadcast, while a callback...
  37. Replies
    7
    Views
    993

    Re: Simulate Keypress

    First call: AppActivate "Unitited - Notepad"

    Then call SendKeys

    The other alternative is to use the FindWindow and SendMessage API's.
  38. Replies
    11
    Views
    1,062

    Re: Program freezes in *.exe but works in VB?

    Use file-logging or MsgBox statements to debug your EXE and trace its execution path.
  39. Thread: nevermind

    by Megatron
    Replies
    2
    Views
    450

    Re: nevermind

    An internal method retrieves the application's current directory and stores it in that read-only variable.
  40. Replies
    18
    Views
    1,157

    Re: VB calling API

    MSDN Library. In addition to the reference section, they also have an "About..." section for each category of the Win32 API (GDI, Common Controls, IPC, Debug, etc.). Click on these "About" topics for...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width