Click to See Complete Forum and Search --> : opening a new form in CLR
sudhavelvizhi
March 23rd, 2009, 12:04 AM
How to open a new form in CLR application?
Is it possible to open a text file in list box and allow the user to edit it and then save the same content again to the text file?
sudhavelvizhi
March 23rd, 2009, 01:48 AM
Is it possible to do so?
Plz guide me..
sunny_sz
March 23rd, 2009, 01:58 AM
Is it possible to do so?
Plz guide me..
Yeah, it is. But it seems that you've to sweat a little first before solution.
sudhavelvizhi
March 23rd, 2009, 02:19 AM
What i hav to do for this?
I hav complete this is by tomorrow
Actually, i hav display an output image... If any other choice is available for this say me..
sunny_sz
March 23rd, 2009, 02:31 AM
Take a look at VC++ Example: Listbox In-place Editing, CListBox, Text Input (http://www.********.net/Visual_C_MFC_Example/VC-Listbox-In-place-Editing-CListBox-Text-Input.htm), it helps.
-----------------------------
If find it helps, Please Rate this post. Thanks.
sudhavelvizhi
March 23rd, 2009, 02:36 AM
Can u give me any solution for opening new form
cilu
March 23rd, 2009, 02:41 AM
[ redirected ]
To open a form see Show() and ShowDialog() methods of class Form.
sudhavelvizhi
March 23rd, 2009, 03:03 AM
Yah sir,
i trying with tat...
I created one new form from new item and named it image.
In main form,
I did the following,
#include "image.h"
Then, i double clicked the button, and included the following event,
image ^ f2 = gcnew image;
f2->Show();
But i,m getting the following error,
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5934) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(251) : System::Windows::Forms::IDataObject IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5934) : error C3699: '*' : cannot use this indirection on type 'IDataObject'
1> compiler replacing '*' with '^' to continue parsing
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : error C2371: 'IDataObject' : redefinition; different basic types
1> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(251) : see declaration of 'IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(6110) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(6123) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(6136) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(6171) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(6184) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(6282) : error C2872: 'IMessageFilter' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(263) : System::Windows::Forms::IMessageFilter IMessageFilter'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IMessageFilter'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(6282) : error C3699: '*' : cannot use this indirection on type 'IMessageFilter'
1> compiler replacing '*' with '^' to continue parsing
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(6328) : error C2371: 'IMessageFilter' : redefinition; different basic types
1> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(263) : see declaration of 'IMessageFilter'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(12671) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(12677) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(12682) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(12688) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(12693) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(12700) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(374) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(1151) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(1157) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(3288) : error C2872: 'IDropTarget' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(173) : System::Windows::Forms::IDropTarget IDropTarget'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDropTarget'
1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(3288) : error C3699: '*' : cannot use this indirection on type 'IDropTarget'
1> compiler replacing '*' with '^' to continue parsing
1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(3328) : error C2371: 'IDropTarget' : redefinition; different basic types
1> c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(173) : see declaration of 'IDropTarget'
1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(3332) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(3345) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5948) : IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::IDataObject'
1>c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(96) : error C2872: 'IServiceProvider' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(53) : System::IServiceProvider IServiceProvider'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::IServiceProvider'
1>c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(96) : error C3699: '*' : cannot use this indirection on type 'IServiceProvider'
1> compiler replacing '*' with '^' to continue parsing
1>c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(103) : error C2371: 'IServiceProvider' : redefinition; different basic types
1> c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(53) : see declaration of 'IServiceProvider'
1>c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(120) : error C2872: 'IServiceProvider' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(103) : IServiceProvider'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::IServiceProvider'
1>c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(235) : error C2872: 'IServiceProvider' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(103) : IServiceProvider'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::IServiceProvider'
1>c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(242) : error C2872: 'IServiceProvider' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(103) : IServiceProvider'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::IServiceProvider'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\urlmon.h(5854) : error C2872: 'IServiceProvider' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(103) : IServiceProvider'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::IServiceProvider'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\urlmon.h(5856) : error C2872: 'IServiceProvider' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.0a\include\servprov.h(103) : IServiceProvider'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::IServiceProvider'
How to clear this?
sudhavelvizhi
March 23rd, 2009, 03:40 AM
To this now i included,
#include "windows.h"
Now the error has reduced to 2.
The errors are,
c:\project\project\Form1.h(129) : error C2039: 'GetEnvironmentVariableW' : is not a member of 'System::Environment'
1> c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : see declaration of 'System::Environment'
1>c:\project\project\Form1.h(129) : error C2660: 'GetEnvironmentVariableW' : function does not take 1 arguments
sudhavelvizhi
March 23rd, 2009, 03:54 AM
Again from code guru i got that i hav to include
#pragma once
#using <mscorlib.dll>
#undef GetEnvironmentVariable
#include <windows.h>
//#include <atlstr.h>
#include "image.h"
Again the error exixts.... Y? How to clear this?
sudhavelvizhi
March 23rd, 2009, 04:00 AM
Just i placed <windows.h> above, i got resolved of it.
Y it is so?
sudhavelvizhi
March 23rd, 2009, 04:04 AM
Hi sunny
Sorry, i could not open this page,
VC++ Example: Listbox In-place Editing, CListBox, Text Input,
Can u me some other suggestions
sudhavelvizhi
March 23rd, 2009, 05:04 AM
Now i one more doubt..
Is it possible to edit a text file in listbox and save the file again?
cilu
March 24th, 2009, 02:45 AM
Edit in list box? No. Why would you open a file in a list box. I don't see how that would work. Display it in a text box.
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.