1
我想为我的按钮设置一个背景图像。我的背景图片没有出现在按钮上。所以我决定登录myButton。我想为我的按钮设置一个背景图像。我崩溃了
this->myButton->BackgroundImage->FromFile("c:\\red\\Desert.jpg");
myLog(this->myButton->BackgroundImage->ToString());
我崩溃,当我登录字符串:
message Object reference not set to an instance of an object
它看起来不像你需要在运行时做到这一点;你有没有尝试过在运行时通过属性窗口设置它? – tmwoods 2013-02-28 05:12:01