Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: Adding resouces to project

$
0
0
This is my code:             declare img as type System.Drawing.Image             set img to type System.Drawing.Image::FromFile("S:\V60\AWMGD\AG_100_EnterTrans\AG_100_MaintTrans\Resources\Checks.jpg")             declare rsxw as type System.Resources.ResXResourceWriter             set rsxw to new type System.Resources.ResXResourceWriter("frmMaintTrans.resources.resX")             invoke rsxw::AddResource("Checks", img)             invoke rsxw::Generate()             invoke rsxw::Close()             DECLARE rm  as type System.Resources.ResourceManager             SET rm to new type System.Resources.ResourceManager("AG_100_MaintTrans.frmMaintTrans", type System.Reflection.Assembly::GetExecutingAssembly())             DECLARE anObject as type Object             SET anObject to rm::GetObject("Checks") GetObject always returns null. As a workaround, when I create the form I create separate Image variables for each .jpg file, in working storage.

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>