Hi, I've been learning how to use the bit blt and associated API functions recently for some simple game programming and have finally hit a stumbling block that I can't seem to find any information on.

Originally, I had all my graphics related code (such as getting DCs, etc) in the Form_Load part of my program. After this getting really messy to edit, I decided to start using a module to separate out graphics related commands. All I did was copy and paste blocks of code from various parts into the module and only changed a few references (such as when I needed information about the size of something on the form and so on). Now, a process which used to take ~350 ms now takes ~2500 ms. I've gone through step by step and it's following the exact same logical process that it was before, but, for some reason, is taking a whole lot longer. Unfortunately, I have no clue why this is.

The variables I use within the module are declared as private for the entire module, as are the api functions. I removed all similar declarations from the form, so there isn't any sort of conflict there. There aren't any unnecessary calls, so that's not it.

If anyone can help explain this quirkiness, I'd certainly appreciate it. I'd hate to have to go back to being sloppy again.