Program compiles but does not run on device

dlfallen

Active Member
Licensed User
Longtime User
I am writing a calendar app as I cannot find one that does what I want (displaying a month's worth of bridge dates at a glance - see screenshot).

The program runs fine on the desktop and when I do an optimized compile for the device I get no errors. However, when I try to execute the program on the device I get:

An error occurred on sub _main_fileloadmnu_click.
An error message cannot be displayed because an optional resource assembly containing it cannot be found
Continue?
Yes No

I have attached the relevant files. Can anyone spot the problem?
 

Zenerdiode

Active Member
Licensed User
Yep, I understand why it works on your desktop but not on your device. The error I get on my desktop is shown below - when I run your .exe file.

Its because your config file packaged with your program contains the reference to your desktop folder. If I delete the .cfg file; it runs. You need to think again how and why your config is created.

Is it a :sign0161: type moment? :)
 
Last edited:

robinathome

Member
Licensed User
Longtime User
Use of Control Keyword

If you add the type of control to the lines where you use Control then it appears to solve this issue; ie
Line 143 becomes

Control("Label" & (i+7*(j-1)),Label).text = daytext

Hope this helps
Robin
 

Cableguy

Expert
Licensed User
Longtime User
Yep, I understand why it works on your desktop but not on your device. The error I get on my desktop is shown below - when I run your .exe file.

Where?

Edit:
A few seconds may pass freely in one's life, and make a huge difference in another's
 
Last edited:

dlfallen

Active Member
Licensed User
Longtime User
Thanks Zenerdiode, it sure was a :sign0161: moment!

I tend to save support files in the AppPath. I just need to save the file name I need (sans path) in the config file, then look for it thereafter in the AppPath. Then I should be able to create a default file (e.g., bridge.vc) on the desktop and use it on the device, and vice-versa.

Your response was quick - thanks, and thanks to others who also replied!
 
Top