Search:

Type: Posts; User: LaVolpe

Page 1 of 13 1 2 3 4

Search: Search took 43.68 seconds.

  1. Re: how can i get the GDI+ declaration functions\types?

    If the image file cannot be opened exclusively by GDI+ (i.e., open it and lock it), then GdipLoadImageFromFile fails. The error code of 3 does not always mean "out of memory". It seems that GDI+ uses...
  2. Re: Help with an error in a simple mouse simulation script

    You still have code where you are calling GetDC but may not be calling ReleaseDC.
    1) initializeTrainer
    2) Timer_Logout_Timer

    In both of those routines, your ReleaseDC call is inside an IF...
  3. Re: LVM_CREATEDRAGIMAGE truncating half the item

    ImageList_BeginDrag m_lIL, 0, 10, 10
    Have you played with the last 2 parameters above? Per MSDN:
  4. Replies
    4
    Views
    201

    Re: LVS_OWNERDATA and sorting

    The only project where I use virtual listview & sort, the data is not recordset-bound. In my case, the items are initially sorted when read from unsorted source. As suggested, use a fast sorting...
  5. Re: how can i get the GDI+ declaration functions\types?

    One of my favorite sites:
    http://www.jose.it-berater.org/gdiplus/iframe/index.htm
  6. Replies
    21
    Views
    452

    Re: Read background color of a bitmap

    As dilettante asked, what is the goal?

    For example, "PNG" clipboard format is not standard from what I've read. In other words, there is no guarantee it will exist and no guarantee if it exists,...
  7. Replies
    21
    Views
    452

    Re: Read background color of a bitmap

    With image formats that support transparency, you would parse the format to determine a specific pixel location that is 100% transparent. Then you would locate that pixel position in the rendered...
  8. Replies
    21
    Views
    452

    Re: Read background color of a bitmap

    without knowing if transparency can even be applied, this is kind of a question with no good answer.

    For example, look at this image:
    1) If black is "transparent", you see a white vase
    2) If...
  9. Replies
    21
    Views
    452

    Re: Read background color of a bitmap

    A standard bitmap on the clipboard? Out of luck. Any color you choose, via pixel location or color-usage-count, is a guess at best. If you know the content of the bitmap, then you can theoretically...
  10. Replies
    21
    Views
    452

    Re: Read background color of a bitmap

    No, unless you know a pixel offset or know the 'content' of the bitmap.

    Otherwise if image content is unknown, then how would one define background color? You cannot just assume it is the...
  11. Replies
    21
    Views
    716

    Re: Problems with IDE and W10

    So, including the ".dll" in the declaration fixed the crashing?
  12. Replies
    21
    Views
    716

    Re: Problems with IDE and W10

    What happens if you you declare it like one of these two:

    Private Declare Function APIGetCurrentThreadId Lib "kernel32" Alias "GetCurrentThreadId" () As Long
    Private Declare Function...
  13. Replies
    12
    Views
    500

    Re: VB6 Draw Smooth Text

    If dilettante's suggestion does not fix the problem...


    Compare only at 100% unless your IDE (or compiled exe) is manifested as DPI-aware and/or scales fonts. If your screenshot is from a non-DPI...
  14. Replies
    12
    Views
    500

    Re: VB6 Draw Smooth Text

    DPI was asked about, but not answered. Are you having problems at all DPI settings, i.e., 100%, 125%, etc, or just DPI settings above 100%?
  15. Replies
    21
    Views
    716

    Re: Problems with IDE and W10

    32/64 bit shouldn't be a problem since VB runs in a 32 bit process, even on 64 bit machines. There really isn't a lot of information to go on from your description though.

    Many IDE issues can be...
  16. Re: LVM_CREATEDRAGIMAGE truncating half the item

    Out of curiosity, if LV style is default (no checkboxes), does it work as expected?
  17. Re: Can you refer to a recordset by a variable rather than explicitly?

    You could also use a collection, i.e.,

    Dim colRS As Collection ' declared form-level or module-level

    If colRs Is Nothing then Set colRs = New Collection
    colRs.Add rsCustomersBM, "BM"...
  18. Replies
    39
    Views
    1,356

    Re: Load image into STATIC control Win32

    Won't that cause a memory leak.

    In fact, I got the code working, but after a couple of dozens of draging operations, the screen freezes probably a symptom of a memory leak somewhere... This issue...
  19. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    Here are some threads that may help?
    https://www.vbforums.com/showthread.php?854963-VB6-IEnumVARIANT-For-Each-support-without-a-typelib...
  20. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    This is likely one reason why you are crashing...

    hResult = EnumCall(e, 4, ...)
    4 cannot be correct. Since IEnumVARIANT inherits from IUnknown, then the 1st 3 entries of IEnumVARIANT vTable are...
  21. Re: Using a downloaded zip-file, that's read only....

    After you download the zip, extract the project files to another folder. Simply right click on each file to show the properties. Ensure the "read-only" checkbox is not selected. Now try to open the...
  22. Replies
    39
    Views
    1,356

    Re: Load image into STATIC control Win32

    See my previous reply also

    So, your image windows are separate owned windows? If so, each time you move the owner, you have to synchronize moving the owned windows too. I'd imagine on some slower...
  23. Re: Vb6: search for more than one word in textbox

    You should provide the code you are using. We can look at it and offer possible changes. In many of your threads, you continue to ask for code without showing us little, if any, effort on your part....
  24. Replies
    39
    Views
    1,356

    Re: Load image into STATIC control Win32

    Why not subclass the owned form to prevent it from being dragged outside the owner's bounds? Subclassing in this case is only needed during the dragging operation, which you seem to have control...
  25. Re: Vb6: search for more than one word in textbox

    Ummm, the example gives you what you asked for. Either lCnt = 3 or it doesn't. Maybe you should explain why you can't use it that way?

    And by the way, searching using Instr(Text1.Text, "a") will...
  26. Replies
    39
    Views
    1,356

    Re: Load image into STATIC control Win32

    Because in your CreateStdPicture routine you are copying the bitmap and that copy is wrapped in a stdpicture:

    hPtr = CopyImage(hBitmap, IMAGE_BITMAP, 0&, 0&, LR_COPYRETURNORG)

    As noted in...
  27. Replies
    39
    Views
    1,356

    Re: Load image into STATIC control Win32

    You probably need to call UpdateWindow API on the static hWnd? Refreshing the form likely does nothing because a form is not going to know to refresh an API-generated window you created. The form...
  28. Replies
    4
    Views
    241

    Re: copy a control at run time

    Well, if you continue with your original approach...

    You can place a control from another form onto your target form via SetParent API. The downside is that any events for those controls trigger...
  29. Re: How to display VB MessageBox to right screen in multimonitor system.

    Use MessageBox API instead of VB's MsgBox. If desired, you can create a public function in bas-module called MsgBox(... params ...). In that new function, call MessageBox API. That should reroute all...
  30. Replies
    9
    Views
    633

    Re: [RESOLVED] DPI Aware question

    Maybe try this? Add a manifest and in the <dpiAware> element, make the value: false. Idea is that by including a manifest and saying it is not dpi-aware, then maybe your Win7 system will honor that?
  31. Re: How to display VB MessageBox to right screen in multimonitor system.

    I'm trying to replicate what you are describing:

    Main form opens a secondary Form2. The results are the same, regardless which form is on which monitor and the forms are on different monitors.
    --...
  32. Replies
    9
    Views
    633

    Re: [RESOLVED] DPI Aware question

    Here are some notes I have

    If your system has that option set, then that would explain what you are seeing. That setting can be seen on the screenshot from this site; jump to Figure D and you'll...
  33. Re: VB6 Question: Is there a method of reading an embedded image in a DLL using GDI+?

    If that is the goal, I'd suggest a more low-level approach.

    1. Use resource enum APIs on the icon resource group to know all the individual icons
    2. Within each group, parse the 14-byte...
  34. Re: VB6 Question: Is there a method of reading an embedded image in a DLL using GDI+?

    What method are you using? Also, are you talking about png-encoded icons in icon resources or pngs in custom resources?
  35. Replies
    15
    Views
    542

    Re: UpdateLayeredWindow() Drove Me Crazy

    I haven't played with that API for at least 10 years. But from what I recall, you are not wrong. The 32bpp pARGB bitmap is rendered by Windows. You don't draw to the form, your draw to the memory DC.
  36. Replies
    58
    Views
    1,468

    Re: need 2 decimal places

    Val() method is relatively ok if the input is not locale-dependent; otherwise, consider using CDbl() instead.

    However, Val() allows potential garbage to be considered as valid numeric data......
  37. Replies
    58
    Views
    1,468

    Re: need 2 decimal places

    Suggestion: while cleaning up the code, give your variables meaningful names. x, c, d, etc isn't very descriptive. Avoid naming textboxes with "txt" prefixes and also creating variables with "txt"...
  38. Replies
    58
    Views
    1,468

    Re: need 2 decimal places

    I think you confused us even more. It appears you were settng the formula result to totcubic? If so and it was declared as Integer, that explains the rounding. And now you are saying that when you...
  39. Replies
    58
    Views
    1,468

    Re: need 2 decimal places

    Thinking that Txttotcubic is probably returning the right result.

    You mention that Txtsize(7).Text contains 4.5, but in your code just before the formula, you overwrite it with: 2.25 * Txthm.Text...
  40. Replies
    2
    Views
    253

    Re: CoTaskMemFree vs ILFree

    I'd almost expect the opposite behavior. Per MSDN: "Note When using Windows 2000 or later, use CoTaskMemFree rather than ILFree."

    For now, ignore that fact that it was working before. Look at...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width