Resources->getobject(l"picturebox.image")

  • Автор темы aandreevich
  • Дата начала
A

aandreevich

#1
yна второй модальной форме имеется pictureBox c картинкой, разумеется.
при компилировании никаких ошибок, а вот при вызове этой формы сразу ступор на этой строке
this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox1.Image")));
А дальше еррор (

Код:
System.Resources.MissingManifestResourceException was unhandled
Message="Could not find any resources appropriate for the specified culture or the neutral culture. Make sure \"programm.programm.new_W.resources\" was correctly embedded or linked into assembly \"programm\" at compile time, or that all the satellite assemblies required are loadable and fully signed."
Source="mscorlib"
StackTrace:
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
at System.Resources.ResourceManager.GetObject(String name)
at programm.programm.new_W.InitializeComponent() in d:\programming\projeckt\ostc3\programm\programm\new_w.h:line 67
at programm.programm.new_W..ctor() in d:\programming\projeckt\ostc3\programm\programm\new_w.h:line 27
at programm.Form1.button1_Click(Object sender, EventArgs e) in d:\programming\projeckt\ostc3\programm\programm\form1.h:line 87
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat
iveMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at main(String[] args) in d:\programming\projeckt\ostc3\programm\programm\programm.cpp:line 16
InnerException:
Хотя на главной форме то же pictureBox и картинка, и всё без проблем...