Search:

Type: Posts; User: baka

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    13
    Views
    235

    Re: VB6 QUESTION: Check if API exists

    ok.
    so it need to be loaded first. and if the DLL doesn't exist in the system it will not run to begin with. so the API is useless here.
  2. Replies
    13
    Views
    235

    Re: VB6 QUESTION: Check if API exists

    loadlibrary and all that u mean?
    yeah, u can do that, its usually used to run a dll that is not registered.
    and what about getmodule API?
  3. Replies
    14
    Views
    305

    Re: How to let call sub more fast ?

    and u compile and run the exe, not run it from the IDE?
    and is the code in freebasic really the same?

    also important to use "byval" in freebasic as well and not "byref"
  4. Re: [RESOLVED] Best/Fastest Way to Generate Checkboard Background

    u dont need more performance wise,
    its just checkboard we are dealing with.
    sure u can create a memorydc, and create a "screen*screen" sized checkboard
    after that just use bitblt to render the...
  5. Re: Best/Fastest Way to Generate Checkboard Background

    yeah. exactly, no need for it. and with autoredraw = false it will render even faster.

    but with false, u need to move the "resize" to Form_Paint() instead.

    edit:
    really? well it works at least...
  6. Re: Best/Fastest Way to Generate Checkboard Background

    Private Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
    Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long,...
  7. Re: Best/Fastest Way to Generate Checkboard Background

    yeah, using a picturebox to "store" the color (u can even use setpixel) and after that stretchbitblt,
    hard to make it smaller. also stretchbitblt is quite fast as well.
    even GdiAlphaBlend is...
  8. Re: Best/Fastest Way to Generate Checkboard Background

    the pictureboxes are only use for color. those are invisible.
    this so stretchbitblt can copy and stretch it to whatever rectangle.
    of course u could create a memorydc and apply fillrect with a...
  9. Re: Best/Fastest Way to Generate Checkboard Background

    use stretchbitblt
    and a couple of pictureboxes with the color u want to use.
  10. Thread: VB6 exe

    by baka
    Replies
    17
    Views
    518

    Re: VB6 exe

    some machine will not run without installing Visual Basic 6.0 Runtime (vbrun6)
    they will tell theres a missing DLL.

    but a empty project, should run.
    its some of the components that can cause...
  11. Re: Mouse wheel scrolling on VB6 compiled app (not the IDE)

    yeah exactly. this is just the basics. u need to implement what u want to react with the wheel.

    remember that subclassing can crash your application.
    so ALWAYS save your project before u run it.
  12. Re: Mouse wheel scrolling on VB6 compiled app (not the IDE)

    did u try subclassing?
    thats what most people are using.

    very easy.
    create a project, add this in Form_Load

    StartClassing Me.hWnd

    add a module:
  13. Replies
    31
    Views
    835

    Re: Error Trapping in an Executable

    well, the msgbox are added to find the crash.

    so

    1
    2
    3
    4 crash
    5
  14. Replies
    31
    Views
    835

    Re: Error Trapping in an Executable

    yeah. its interesting how things changes with OS.
    new bugs appears, or reveals.
    even so they have done a great job making VB6 applications survive that long and still works for the most part.

    I...
  15. Replies
    9
    Views
    214

    Re: CreateCompatibleDC

    u r not using CreateCompatibleDC alone

    hDC = CreateCompatibleDC(0)
    DIB = CreateDIBSection(hDC, DIBHeader...

    the hDC is a clone of "0" that is the desktop hDC, so using GetDeviceCaps will point...
  16. Replies
    31
    Views
    835

    Re: Error Trapping in an Executable

    the "best" way seems to be to add in all your fuctions:

    Sub/Function BlaBla()
    On Error Goto TErr
    - code -
    Exit Sub/Function
    TErr: ErrHandler Number/String
    End Sub/Function

    or
  17. Replies
    31
    Views
    835

    Re: Error Trapping in an Executable

    my game is mostly modules. I have 2 classes. one is the direct2d engine and one is the directsound8 engine.
    and the reason is mostly because I need to initialize/destroy/restart the class. surely I...
  18. Replies
    31
    Views
    835

    Re: Error Trapping in an Executable

    hm.
    usually a crash without knowing where is if u use a class.
    so it will only tell that the call crashed but not where inside the class
    I would change the class into a module if possible.
  19. Replies
    31
    Views
    835

    Re: Error Trapping in an Executable

    as I wrote, u can use subclassing, here an example:

    in a module


    Option Explicit

    Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex...
  20. Replies
    31
    Views
    835

    Re: Error Trapping in an Executable

    U will need to add on error everywhere.
    I think itís possible to subclass. Or u need to check err.number each function
  21. Replies
    16
    Views
    399

    Re: GetSystemMetricsForDpi alternative

    I tried with that, something similar using GetDeviceCaps,
    but if I remember correctly it didnt work
    if showed differently if compiled or in IDE. Im in windows 7.
    but I will give it a try tomorrow...
  22. Replies
    16
    Views
    399

    Re: GetSystemMetricsForDpi alternative

    yeah, its a mess.
    not sure how to get it I have even tried to get from Direct2d, but its not correct.
    instead my solution was to just "skip it" and use the screen resolution since that gave me the...
  23. Replies
    24
    Views
    568

    Re: [RESOLVED] Last Class to Go

    I use WIC+D2D for just my needs. I have actually not looked deeper.
    but playing around I see theres tons of functionality.

    just check here
    ...
  24. Replies
    16
    Views
    399

    Re: GetSystemMetricsForDpi alternative

    the problem is to get the "correct" DPI value.
    it depends on many factors, is the application aware or not (manifest or API), are we in 7-8-10?
    but if you have a good function, like

    Function...
  25. Replies
    24
    Views
    568

    Re: [RESOLVED] Last Class to Go

    I did post an example here
    https://www.vbforums.com/showthread.php?896313-RESOLVED-CreateIcon-vs-GDI-Scaling
  26. Replies
    24
    Views
    568

    Re: [RESOLVED] Last Class to Go

    WIC = Windows Imaging Component / WinCodec
    its used to load pictures and create direct2d bitmaps.
    of course theres a lot more u can use it for....
  27. Replies
    24
    Views
    568

    Re: [RESOLVED] Last Class to Go

    u can use direct2d/wic, no 3rd party dll needed.
    so again. u can replace if u want. not sure why.
    and to draw and rotate oval shapes, should not be a problem with direct2d.
  28. Replies
    24
    Views
    568

    Re: [RESOLVED] Last Class to Go

    I think its mostly because theres tons of sources about it, not because u can't use Direct2D.
    I mean, the reason to use GDI+ (rendering and image manipulation) is most of the time u have a...
  29. Replies
    24
    Views
    568

    Re: [RESOLVED] Last Class to Go

    I like it The trick
    I think thats a good way of coding and bundle all together.

    I don't agree with wqweto. u should "always" destroy a class or any GDI objects.
    in GDI we are not initializing...
  30. Replies
    24
    Views
    568

    Re: Last Class to Go

    LaVolpe used 1 token for all his classes.
  31. Replies
    30
    Views
    560

    Re: DPIAware Issues on Multiple Monitors

    you can use your approach, but that doesn't mean you can not do differently.
  32. Replies
    30
    Views
    560

    Re: DPIAware Issues on Multiple Monitors

    do u really not understanding DPI dilettante? I thought u where.
    but u fail miserably here.

    when u "INCREASE" DPI you also "DECREASE" resolution.
    meaning "EVERYTHING" gets "BIGGER".

    if my...
  33. Replies
    30
    Views
    560

    Re: DPIAware Issues on Multiple Monitors

    the user can change the size of the form. *1, *n..x, maximized, fullscreen
    so, n..x is factors. could be *1.5, but it can also be x3, x4 or another combination depending on your screen resolution....
  34. Replies
    30
    Views
    560

    Re: DPIAware Issues on Multiple Monitors

    its not manually. u can not drag and move. like most windows.
    the other is pre-defined sizes. so its not manually resizing but change size.
    a lot of games are like that. or u never played a game...
  35. Replies
    30
    Views
    560

    Re: DPIAware Issues on Multiple Monitors

    they can not "manually resize". they can only use the settings to change the size. but the size is dynamic, so it will adjust depending on screen. a big screen will give u bigger factors.
    again,...
  36. Replies
    30
    Views
    560

    Re: DPIAware Issues on Multiple Monitors

    that "issue" will be dealt with when someone is reporting that they want that feature.
    I mean, I get feedback and people want all kinds of features. but not that. at least not yet.

    right now the...
  37. Replies
    30
    Views
    560

    Re: DPIAware Issues on Multiple Monitors

    that is why u should work with pixel.
    I have 0 problems in any system and dpi.
    the only thing I need to check is the screen size and monitor.
    but sure, that means u need to "dynamically" control...
  38. Replies
    2
    Views
    217

    Re: Rotate a special PictureBox

    search for RotateTransform and RotateFlip
  39. Replies
    12
    Views
    397

    Re: GetMonitorInfo API

    yeah. I agree with that. null pointer are used. I even use it. and I myself changed a few to "any" but that mostly because there was a need for it.
    for this particular API, Im not sure theres a...
  40. Replies
    12
    Views
    397

    Re: GetMonitorInfo API

    why would u pass a null pointer when the whole reason u call this API is to retrieve MONITORINFO/EX?
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width