Search:

Type: Posts; User: gyhu

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Re: [help] VB6, How to search/replace a pattern in the byte array?

    Wow, your code is good and has high efficiency, thank you very much.
  2. Re: [help] VB6, How to search/replace a pattern in the byte array?

    Sure, got it, thank you.
  3. [RESOLVED] [help] VB6, How to search/replace a pattern in the byte array?

    Used the code below to read a binary file into byte array.



    Private Sub cmdTest_Click()
    Dim fileNum As Integer
    Dim bytes() As Byte

    fileNum = FreeFile
    Open...
  4. Re: [help]WM_GETTEXT only can grap the title from some controls. How to grap content?

    Thank you very much for the demo.
  5. Re: [help]WM_GETTEXT only can grap the title from some controls. How to grap content?

    Hi fafalone,

    I just take "Immediate window" as an example, it seems a lot of controls don't response WM_GETTEXT message.

    Best Regards,

    Sniperhgy
  6. Re: [help]WM_GETTEXT only can grap the title from some controls. How to grap content?

    Thank your for your TIP, will have a look.
  7. Replies
    11
    Views
    2,990

    Re: [RESOLVED] Excel, copy entire worksheet, via VB6

    Ok, there is still a way can do it :



    Sub Test()
    Sheet3.Range("C1:C3").Formula = Sheet1.Range("A1:A3").Formula
    Sheet1.Range("A1:A3").Copy
    Sheet3.Range("C1:C3").PasteSpecial...
  8. Replies
    11
    Views
    2,990

    Re: Excel, copy entire worksheet, via VB6

    Hi Elroy,

    In my opinion, the Excel VBA provide a good method to finish this job:



    wshSource.Copy Before:=wbDestination.Sheets(1)


    wshSource : It's the sheet you want to copy.
  9. Re: [help]WM_GETTEXT only can grap the title from some controls. How to grap content?

    Hi LaVolpe,

    Thank you for your reply. Actually, I don't use FindWindowEx to get the Hwnd. I use WindowFromPoint to get the Hwnd directly. And in VB6.0, "Immediate window" only has one hwnd,...
  10. [RESOLVED] [help]WM_GETTEXT only can grap the title from some controls. How to grap content?

    Dear All,

    I use the code below to grab text from controls, but some controls may have a title, then the code only can grab title from those controls. How to grab content from them?



    Private...
  11. Re: [Help]How to let WM_GETTEXT support unicode characters?

    Hi fafalone,

    Your solution is perfect. Not only Chinese, Japanese, Russian or something else can also display properly. Thank you very much.

    Best Regards,

    Sniperhgy
  12. Re: [Help]How to let WM_GETTEXT support unicode characters?

    Thank you very much for the tip. I'll take a shot then reply to you.
  13. Re: [Help]How to let WM_GETTEXT support unicode characters?

    Thank you very much, I'll have a look.
  14. Re: [Help]How to let WM_GETTEXT support unicode characters?

    Thank you very much for your demo.
  15. Re: [Help]How to let WM_GETTEXT support unicode characters?

    Thank you for your reply. But Is there a way to solve this issue?
  16. Re: [Help]How to let WM_GETTEXT support unicode characters?

    Thank you for your suggestion.
  17. Re: Toolbar Display the dropdown menu on button click

    Please try to add a Click event to the button you want. Then in that event, you can call the dropdown menu.
  18. Re: [Help]How to let WM_GETTEXT support unicode characters?

    Thank you for your suggestion. But I prefer the native method in VB6.0.
  19. Re: [Help]How to let WM_GETTEXT support unicode characters?

    Sure, agree your point. SendMessage will put an byte array into my array "byt". I believe there is a way can let the textbox can display the unicode characters.
  20. [RESOLVED] [Help]How to let WM_GETTEXT support unicode characters?

    I'm using the code below to get text from controls, if the text only contains English letters, it works well. Once there are unicode characters involved, then the text becomes unreadable code.


    ...
  21. Re: [help]How to use SetWinEventHook to determine an application's window is created.

    Sure, thank you.
  22. Re: [help]How to use SetWinEventHook to determine an application's window is created.

    1) Yes, before want to use SetWinEventHook, I tried to use SetWindowsHookEx with WH_CBT, but only can available inside the process, not global.

    2) Sure, my propose is : In an Excel file, there are...
  23. Re: [help]How to use SetWinEventHook to determine an application's window is created.

    Hi Victor Bravo VI,

    Your code works properly. But there is a point need to be improved: After click the form, VB will call notepad, then the hook will send close message to it. In that moment,...
  24. Re: [help]How to use SetWinEventHook to determine an application's window is created.

    Hi The trick,

    Thank you for your reference, but I don't understand Russian T_T.

    Best Regards,

    Sniperhgy
  25. Re: [help]How to use SetWinEventHook to determine an application's window is created.

    Hi Victor Bravo VI,

    Thank you for your demo, I'll have a look first.

    Best Regards,

    Sniperhgy
  26. [RESOLVED] [help]How to use SetWinEventHook to determine an application's window is created.

    Dear All,

    I want to write some code to determine whether there is a application is started, and if its title satisfies some string, then close it before showing up.

    First step, use the...
  27. Re: How to use CallByName in a Class to call methods or functions in modules?

    Hi Elroy,

    Thank you very much for your help and suggestion.

    BTW, I found that if change that statement to With_One_Param(ByVal iType As Integer), it works as well.

    Best Regards,

    Sniperhgy
  28. Re: How to use CallByName in a Class to call methods or functions in modules?

    Hi Elroy,

    Please remove this sub, or just run frmMain without compile the exe file.

    Best Regards,

    Sniperhgy
  29. Re: How to use CallByName in a Class to call methods or functions in modules?

    Hi Elroy,

    It's my fault, please re-download the attachment from that post, I have re-upload a demo without the dll file.

    Thank you very much.

    Best Regards,

    Sniperhgy
  30. Re: How to use CallByName in a Class to call methods or functions in modules?

    Sure, it's my fault. I'm really sorry. And will upload again without the dll file.
  31. Re: How to use CallByName in a Class to call methods or functions in modules?

    Hi Schmidt,

    I just want to learn the usage of CallByName.

    Best Regards,

    Sniperhgy
  32. Re: How to use CallByName in a Class to call methods or functions in modules?

    Oh, it's my fault. Thank you for your help.
  33. Re: How to use CallByName in a Class to call methods or functions in modules?

    Hi Elroy,

    Could you please help to check the attachment above your last reply? Thank you.

    Best Regards,

    Sniperhgy
  34. Re: How to use CallByName in a Class to call methods or functions in modules?

    Hi LaVolpe,

    I followed your suggestion, tried to create one demo, I found that if there is no parameter, then CallByName can be executed successfully. But if I tried to pass one parameter to it,...
  35. Re: How to use CallByName in a Class to call methods or functions in modules?

    Ok, I'll take a shot, thank you.
  36. Re: How to use CallByName in a Class to call methods or functions in modules?

    Hi lisagreen,

    I'm not familiar with using CallByName. Only now Application.Run in VBA can do what I want.

    Best Regards,

    Sniperhgy
  37. Re: How to use CallByName in a Class to call methods or functions in modules?

    Yes, post #13 is very useful.
  38. Re: How to use CallByName in a Class to call methods or functions in modules?

    Hi Elroy,

    I have to create DLL, because excel can use import DLL, but can't import EXE.

    Best Regards,

    Sniperhgy
  39. Re: How to use CallByName in a Class to call methods or functions in modules?

    Thank you for your code.
  40. Re: How to use CallByName in a Class to call methods or functions in modules?

    Thank you for your code.
Results 1 to 40 of 64
Page 1 of 2 1 2



Click Here to Expand Forum to Full Width