garalo
11/03/2008, 15:12
frmView.cpp isminde bir dosyam var
namespace imageArrayCplus {
public ref class frmView : public System::Windows::Forms::Form
{
...
void frmView::frmView_Load(System::Object ^sender, System::EventArgs ^e)
{
//imgDisplay->Image = System::Drawing::Image::FromFile(Form1::ImageToSho w); // burada hata geliyor
imgDisplay->Image = Image::FromFile(Form1::ImageToShow);
lblImageName->Text = Form1::ImageToShow;
// Center image
imgDisplay->Left = (this->Width - imgDisplay->Width)/2;
}
...
}
ayrica baska bir dosyam daha var buradan yukaridaki dosyayi cagirincada hata geliyor.
namespace imageArrayCplus {
public ref class Form1 : public System::Windows::Forms::Form
{
// The Event to click the image
void Form1::ClickImage(System::Object ^sender, System::EventArgs ^e)
{
// imageArrayCplus::frmView ^f;
// On Click: load (ImageToShow) with (Tag) of the image
ImageToShow = (safe_cast<System::Windows::Forms::PictureBox^>(sender))->Tag->ToString();
// then view this image on the form (frmView)
/*imageArrayCplus::frmView ^f = gcnew imageArrayCplus::frmView();*/
frmView ^f = gcnew frmView(); // burada ne yaptiysam surekli hata veriyor???? verdigi hatalar asagida..
f->ShowDialog();
}
};
}
1>------ Build started: Project: imageArrayCplus, Configuration: Debug Win32 ------
1>Compiling...
1>stdafx.cpp
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(151) : error C2065: 'frmView' : undeclared identifier
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(151) : error C2065: 'f' : undeclared identifier
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(151) : error C2061: syntax error : identifier 'frmView'
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(152) : error C2065: 'f' : undeclared identifier
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(152) : error C2227: left of '->ShowDialog' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>Build log was saved at "file://c:\Users\ahmet\Documents\Visual Studio 2008\Projects\imageArrayCplus\imageArrayCplus\Debu g\BuildLog.htm"
1>imageArrayCplus - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
C++ ya baslayali bir hafta oldu. C++ ile yapmam gereken bir proje var ve ben bunu bu hafta icerisinde bitirmem
gerekiyor lutfen yardim.
namespace imageArrayCplus {
public ref class frmView : public System::Windows::Forms::Form
{
...
void frmView::frmView_Load(System::Object ^sender, System::EventArgs ^e)
{
//imgDisplay->Image = System::Drawing::Image::FromFile(Form1::ImageToSho w); // burada hata geliyor
imgDisplay->Image = Image::FromFile(Form1::ImageToShow);
lblImageName->Text = Form1::ImageToShow;
// Center image
imgDisplay->Left = (this->Width - imgDisplay->Width)/2;
}
...
}
ayrica baska bir dosyam daha var buradan yukaridaki dosyayi cagirincada hata geliyor.
namespace imageArrayCplus {
public ref class Form1 : public System::Windows::Forms::Form
{
// The Event to click the image
void Form1::ClickImage(System::Object ^sender, System::EventArgs ^e)
{
// imageArrayCplus::frmView ^f;
// On Click: load (ImageToShow) with (Tag) of the image
ImageToShow = (safe_cast<System::Windows::Forms::PictureBox^>(sender))->Tag->ToString();
// then view this image on the form (frmView)
/*imageArrayCplus::frmView ^f = gcnew imageArrayCplus::frmView();*/
frmView ^f = gcnew frmView(); // burada ne yaptiysam surekli hata veriyor???? verdigi hatalar asagida..
f->ShowDialog();
}
};
}
1>------ Build started: Project: imageArrayCplus, Configuration: Debug Win32 ------
1>Compiling...
1>stdafx.cpp
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(151) : error C2065: 'frmView' : undeclared identifier
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(151) : error C2065: 'f' : undeclared identifier
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(151) : error C2061: syntax error : identifier 'frmView'
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(152) : error C2065: 'f' : undeclared identifier
1>c:\users\ahmet\documents\visual studio 2008\projects\imagearraycplus\imagearraycplus\Form 1.h(152) : error C2227: left of '->ShowDialog' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>Build log was saved at "file://c:\Users\ahmet\Documents\Visual Studio 2008\Projects\imageArrayCplus\imageArrayCplus\Debu g\BuildLog.htm"
1>imageArrayCplus - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
C++ ya baslayali bir hafta oldu. C++ ile yapmam gereken bir proje var ve ben bunu bu hafta icerisinde bitirmem
gerekiyor lutfen yardim.