I recently downloaded a sample app that resizes a background image on a MDI
form. The app works fine but if I modify it I cant get it to work in the
IDE, however the .exe works fine.

The sample uses the following code to get resources from the compiled app
while running in the IDE.

If RunningInIde() Then
hModule = LoadLibrary("PMDIBackground.exe")
Else
hModule = App.hInstance
End If

I think the problem is something to do with compiling the .exe as LoadLibrary
only works when pointed at the original .exe. and even if I create a new
.exe from the original unmodified code it fails.

I have tried all the different options on the compile tab except advanced
options to no avail.

I have never compile anything with a resource file before, could I be missing
something there?

Thanks in advance.