16,004,653 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by christmars (Top 72 by date)
christmars
2-May-13 9:50am
View
You are welcome! I should thank you! ;)
-christmars
christmars
2-May-13 3:05am
View
Alright, I see! No, I definitly have no intreast about CHEETING points! They mean nothing to me! I prefer knowleges. Please also understand. :)
Then I would take your advice above from now on.
If you could understand, what I did was, I clicked "I've solved it myself". Then it goes automatically to "Add your solution here". If we want to stop some boring ones who cheat points. Then this is also a stupid design ("I've solved it myself"), I have to say.
Thanks again!
Regards,
christmars
christmars
1-May-13 4:56am
View
Hi dear SA,
>Please stop posting non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your >CodeProject membership. And the fact you even self-accepted some formally is just outrageous, a sure way for a ban. I hope you won't do >it after this warning.
Thank you for your kind warning! I thought this is a website where we can freely think and discuss and talk about our own ideas about programing. When you say it is "outrageous" or "a sure way for ban". I'd like to say that all the questions I gave were acturally problems I faced by my work. Only after lots of searchs and tests I got "my" answer. This solves my problem. And I just thought they are helpful when somebody else also handles the same thing.
I would like to ask you, is there any "official set rules" or whatelse by programing? I think programers should think and prove their solutions and make innovations. That's also why codes are so fun. Because there are many ways to solve every one small task. So, if you see the problems in my answers, that points out "it's wrong", please post me and prove it. I'll be very glad to know about it and reject the solution and improve and share it for other friends here. I'll accept the truth, but not the "words"! Futher more, if I saw any better solutions or new right solutions under my questions. There's no doubt that I'll take them as the "solutions". But in fact it doesn't happen until now. I'm looking forward for it! :)
>Comment on any posts, reply to available comments, or use "Improve question" (above).
>Also, keep in mind that members only get notifications on the post sent in reply to there posts.
I konw where they are, thanks for that all the same!
You mean "their", don't you?
I love codeproject because it's a place full of ideas! And I hope we can freely dicuss here for any "questions"!
Best regards from Germany,
christmars
christmars
22-Mar-13 8:34am
View
Thank you for the google-link! :P
christmars
22-Mar-13 8:32am
View
>There is really no point...
there's still point for codeproject here, maybe somebody else needs the answer. It's not only for the OP.
And I have to say, i would be always glad to learn what I still don't know! ;)
christmars
22-Mar-13 8:26am
View
Hi there,
thank you, this tool is cool!
But i already made an own prog to realise it. ;)
Sorry that my answer is a bit later...
christmars
21-Dec-12 5:14am
View
Hi there, so how should I MAKE it? :-)
christmars
17-Dec-12 6:19am
View
Hi, you need to select a capture device. See: http://msdn.microsoft.com/en-us/library/windows/desktop/dd377566(v=vs.85).aspx I'm intreasted to see how you get the video preview stream. Because I want to see what others are coding dor that. My codes have error when I captur several devices at the same time. Could you post it to let me see?
christmars
17-Dec-12 6:18am
View
Deleted
Hi, you need to select a capture device.
See: http://msdn.microsoft.com/en-us/library/windows/desktop/dd377566(v=vs.85).aspx
I'm intreasted to see how you gets the video preview stream. Because I want to see what others are coding that. My codes have error when I captur devices at the same time. Could you post it to let me see?
christmars
13-Dec-12 3:32am
View
Thank you for the message! According to the error description, it is possible that the device attached to the system is not funtioning.
christmars
13-Dec-12 3:27am
View
Hi,
I used your suggestion to check pMC value before the Run(),
and I the quering IMediaControl value for the forth webcam is only going to work with one value "0x003F751C"(as the first capturing device). When I make it for test2 or test3, it has also a value that seems to be "valid".
Could you please tell me what do you mean with "valid instance"?
christmars
3-Dec-12 6:06am
View
Hi CHill60,
sorry for my late reply.
thank you for your correction! I wrote the Filename as "false" refered what I read by msdn example. You're right, when it's a name, it should be a Type::Missing, or a string of the filename. And obviously I used "save" and "save the chages", which can be seen as unnecessary. I did this just for safer.
I have to say, you got my problem, but the article doesn't help to solve this. The solution should be like that, when the excel file is opened, the datas are also abled to be written on it.
I've also coded in another version to check if the excel is being opened more times(Read-Only), if so the user gets a warning. But that's not the best solutiion for an user who wants to get datas as well as see the excel sheet.
christmars
14-Nov-12 14:42pm
View
hey! It's not that complicated. I suggest you to do this:
String^ a = (String^) Cells->Value2;
Also the part is (String^), as a "enforced" type conversion. When the cell value has a double or int type, use this>> Convert::ToString(...->Cells->Value2).
It'll work. If you still have problem, call back! ;)
christmars
14-Nov-12 5:47am
View
Deleted
Yes, I just can't access the elements.All right. Thank you for reminding!
Of course I tried to use this method, and even clone(), copy(), copyto() etc., but I think I was wrong.
I used GetValue(0,0) and it showed me error. Now I tried GetValue(1,2) and so on,
and I know that the getvalue must beginn with (1,1)!
Thanks again! Shame on me, i was too careless.
christmars
13-Nov-12 5:30am
View
I have a better and easy link for this class:
http://www.c-sharpcorner.com/UploadFile/thiagu304/ExcelAutomation01052007080910AM/ExcelAutomation.aspx
christmars
13-Nov-12 5:21am
View
Hi, after reading and testing, I finally found that this article doesn't solve the problem. The using of namespace "Microsoft::Office::Interop::Excel" under c++/cli is such bad, that some declared methods of msdn don't go to work properlly...
christmars
12-Nov-12 8:10am
View
Thank you at first. I've read this article already. Maybe I shoule read it one more time and carefully? I'll see if it covers my prolem.
christmars
12-Nov-12 6:09am
View
Sorry I don't get what you mean, "sumbol"?
christmars
1-Nov-12 5:25am
View
Thanks a lot!
christmars
1-Nov-12 5:08am
View
Hi SA,
I got it!
Codes:
//make two funktions for EventHandler:
public : void DisableButton1(System::Object ^,System::EventArgs ^)
{this->button1->Enabled=false;}
public : void EnableButton(System::Object ^,System::EventArgs ^)
{this->button1->Enabled=true;}
private :System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
Form^ form2Obj = gcnew Form2();
form2Obj->Shown += gcnew System::EventHandler(this, &Form1::DisableButton1);
form2Obj->Closed += gcnew System::EventHandler(this, &Form1::EnableButton1);
form2Obj->Show();
}
I did't use anonymous methods to solve this problem, but without your advices I couldn't know where was my mistake. Thanks again for the articles you gave me, they are helpful!
christmars
1-Nov-12 4:49am
View
Deleted
Obviousely what I posted you before minutes was wrong. Because I just give disable button to the EventHandler "FormShownHandler". So I should acturally add this "disable_Button_Event" to the form_Shown_Event, right?
christmars
1-Nov-12 4:26am
View
Hi SA,I have read the articles. And I think your suggestion is like this:
//firstlly I declared Form to be openedauto Form^ form2Obj = gcnew Form2();
//Then, define FormShownHandler(here use the anonymous method)
//Although refers to the wiki samples, I didn't define this succesfully:
auto FormShownHandler = [ ] ( ) { button->Enabled=false; };
//After that, use the self created FormShownHandler instead of the system defined one:
form2Obj->Shown += FormShownHandler;
Have I gotten your idea? The use of anonymous function was wrong, could you help?
christmars
31-Oct-12 11:08am
View
Sorry I didn't see the reference. I would read the article you give me carefully.
Thank you!
christmars
31-Oct-12 10:41am
View
So I still can't make it. I tried:
form2Obj->Shown += gcnew FormShownHandler(System::Object, System::EventArgs) => {btnOpenForm2->Enabled = false;};
The error is, FormShownHandler is not identified.
Could you please show what you would write? What you meant is right, but I need to see the form for the functionality!
christmars
31-Oct-12 10:23am
View
Yes the version I am using is VS2010. But I don't really understand how to use the "anonymous delegates" under c++/cli.
I've tried :
form2Obj->Shown += delegate(System::Object^ o, System::EventArgs^ args ) => {btnOpenForm2->Enabled = false;};
which didn't work...
christmars
29-Oct-12 4:58am
View
Hi Marcus! Your code works perfect under c#. Can you tell me how can I code it into C++/CLI. I tried this:
auto form2Obj = gcnew Form2();
form2Obj->Shown += (Object^ o, EventArgs^ args)=> {button1->Enabled = false;};
...
But this is wrong.
I don't think I 've understood "(o, args)=>". Can you show me how they should look like under C++/CLI?
Thanks again!
christmars
29-Oct-12 4:56am
View
Deleted
Hi Marcus! Your code works perfect under c#. Can you tell me how can I code it into C++/CLI. I tried this:
auto form2Obj = gcnew Form2();
form2Obj->Shown += (Object^ o, array<string^>^ args)=> {button1->Enabled = false;};
...
But this is wrong.
I don't think I 've understood "(o, args)=>". Can you show me how they should look like under C++/CLI?
Thanks again!
christmars
29-Oct-12 4:54am
View
Deleted
Hi Marcus! Your code works perfect under c#. Can you tell me how can I code it into C++/CLI. I tried this:
auto form2Obj = gcnew Form2();
form2Obj->Shown += (Object^ o, array<string^>^ args)=> {button1->Enabled = false;};
...
But this is wrong.
I don't think I 've understood "(o, args)=>". Can you show me how they should look like under C++/CLI?
Thanks again!
christmars
29-Oct-12 4:53am
View
Deleted
Hi Marcus! Your code works perfect under c#. Can you tell me how can I code it into C++/CLI. I tried this:
auto form2Obj = gcnew Form2();
form2Obj->Shown += (Object^ o, array<string^>^ args)=> {button1->Enabled = false;};
...
I don't think I 've understood "(o, args)=>". Can you show me how they should look like under C++/CLI?
Thanks again!
christmars
29-Oct-12 3:49am
View
Thanks a lot!
christmars
29-Oct-12 3:47am
View
Thank you guys!
christmars
24-Oct-12 1:55am
View
Thank you very much for your introduction! I would get a closer knowledge about the topic "saving the image". I also think what I did was too simple for saving the image.
christmars
23-Oct-12 9:54am
View
To question why: Because what I need is only a picture with a transparent time-label on it. And this is a good way because it's really simple. The idea is to save a panel with all items on it.
To resulotion: No, I didn't mean "resulotion can help". I just want to know the reason, why the pictures have gray dots but not clean. And how can I overcome this. The resolution is anoter question, I want to know, how could I change the resolution of the fotos.
christmars
19-Oct-12 3:33am
View
I got it myself, thanks all the same!
christmars
18-Oct-12 7:17am
View
Hi! Thank you! I'm not familiar with java. So could you please translate the codes into C? As I understand, you make an array to save the finalnames, and get values in a for-loop. But I really can't "see" your codes.
christmars
16-Oct-12 8:41am
View
Hi Maxim,
I'm coding to get the camera names. I want to get the 3 names in 3 strings(not like you did, using wprintf).
But unfortunaly, I can only get one name but not three. My prog is:
while (pClassEnum->Next(1, &pReadMoniker, &cFetched) == S_OK)
{
hr = pReadMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void **)&pBag);
hr = pBag->Read(L"FriendlyName", &var, 0);
if (SUCCEEDED(hr))
{ String^ NAME = gcnew String(var.bstrVal);
}
VariantClear(&var);
}
I know a string can obviously get only one name. I think in the fact the names are made three times by prog and what be given is the last device name. So do I need a array string? Or can I get the three names each to a string? Could you help?
christmars
16-Oct-12 4:20am
View
thanks! that's also what Maxim suggested(Solution 1) i think. I'm coding that currently, namly use the webcams with their friendly names from system.
christmars
15-Oct-12 5:30am
View
Thanks a lot!! I'd review my code and learn more about COM basics, I am just a beginner in this area.
christmars
14-Oct-12 7:42am
View
thanks a lot! I'm reading your past answers.
christmars
14-Oct-12 7:35am
View
thanks for your advice!
christmars
8-Oct-12 6:22am
View
Thank you for that! I also thought what I did here is only a declaration of a "m_Class". Because when defination are duplicated is the error like this: new defination of ...
But you see the system tells me another error:
error LNK2005: "class WebcamShow::CamShow test" (?test@@3VCamShow@WebcamShow@@A) is already in Form2.obj defined.
So maybe I mixed up the defination and declaration due to the word "defined". But I really appreciate what you pointed :
Form1.cpp/Form1.h includes Form2.h and creates a global CamShow object (in namespace LOSCH).
Form2.cpp includes also Form2.h and creates another CamShow object with the same name in the same namespace.
This can't be handled by the linker.
You must make the CamShow object a member of each class where it is used (Form1 and Form2) or use only one global object.
And I've tested an easy programm with windows forms application. Open the next form with a button click(Form1->Form2->Form3). That I just take all the automatically created Form1.cpp, Form2.cpp and Form3.cpp away. And that has no influence on my programm. In conclusion, I think the Form.cpp is able to be cancled when they are not used.
christmars
8-Oct-12 1:56am
View
Sorry for my late rely! Thanks!
christmars
8-Oct-12 1:53am
View
Hi Maxim! Firstly sorry for my late reply and thank you so much for your answer. But there's nothing to do with a "different name". That's not the point, I have to say. The problem is that I want to declare and make use of a "global" class and it shows error that the declaration is duplacated.
Form1.cpp/Form1.h includes Form2.h and creates a global CamShow object. Form2.cpp includes also Form2.h and creates another CamShow object with the same name in the same namespace. So I took the Form2.h in Form2.cpp away and it works well.
But actrually I am a Win Form APP beginner. So I'm not sure if this is a right way for stable programms in this windows forms app.
christmars
6-Oct-12 5:37am
View
I've taken the Form2.h in Form2.cpp away. And the global definition of the class works. Do you think this is right in win form app?
christmars
6-Oct-12 4:38am
View
And the same error...
christmars
6-Oct-12 4:36am
View
I acturally did. And that was what i've done before i wrote question 2. But the error is the same.
But in the win form applications, the Form.cpp always just has StdAfx.h and Form.h, no more codes. That means maybe we only use .h file. It seems like they are not needed. What's your opinion?
christmars
5-Oct-12 10:09am
View
Thanks for that!! :) I removed the #include Form2.h in Form2.cpp, this time it's ok to make a global class. But i am not pretty sure if this is a stable solution or not.
christmars
5-Oct-12 9:54am
View
I've tried that, but it still makes error.
christmars
5-Oct-12 7:25am
View
so i've taken the "using namespace WebcamShow" away, but that leads to no changes. Please see the relatively more detailed version:
http://www.codeproject.com/Questions/471204/WinForm-app-Capture-a-videostream-in-a-new-form-Er
christmars
5-Oct-12 4:06am
View
hi, i'll make a new question with detailed codes to let you see the current state. And explain what is the trouble. Maybe you'll see my error. Thanks really a lot!
christmars
5-Oct-12 3:06am
View
I've tried to add the "#pragma once" to CamShow.h file, but this doesn't make sense. A class(CamShow test;) still can only be declared within a event section and only be useful there.
I'm not able to create a CamShow class, that across form2 to be used.
christmars
4-Oct-12 15:25pm
View
I made the declaration of a class(CamShow test) within button_click event. It seems like that the declaration outside or in public sections caused error. But it's not good when the defination of the class is within the event block. Because i can't access it all over in the form2.
To your question: no, my .cpp doesn't have pragma once in it. So does CamShow.h. I'll try to add this in .h to see, if this matters.
christmars
4-Oct-12 15:18pm
View
Deleted
I don't know it well. But it seems like that a class e.g. CamShow test can only defined in private sections. And then also only there useful. Defination outside or in public causes error. But it's not good because the class cannot be accessed all over within my form2.
To your question: No, my .cpp source file is without #pragma once. I didn't add it to my CamShow.h too. I'll see if this matters.
christmars
4-Oct-12 9:30am
View
No, i didn't.
But it works when I just put the class definition within the button_click event.
I definitated it after "using namespace WebcamShow;" earlier and it had error.
christmars
4-Oct-12 8:35am
View
Hi Jochen,
i used inline but another problem happens: i can't create a class. It tells me:
error LNK2005: "class WebcamShow::CamShow test" (?test@@3VCamShow@WebcamShow@@A) is already in Form2.obj defined.
And when i do the .cpp, there is the same problem!
christmars
19-Sep-12 9:16am
View
sorry! i've already translated it...
christmars
30-Aug-12 1:53am
View
thank you!! now i understand what exactly you mean. i see it when i made a little change of the messageboxes, when they are different, the logic is clear!
christmars
30-Aug-12 1:45am
View
Deleted
thank you! now i understand what exactlly you mean.
christmars
29-Aug-12 10:03am
View
so you mean the closing event and the application exit method is duplicated? or what? as i thought, the Exit() just breaks all the events down and the FormClosing is just an event that schould also be included, right?
christmars
28-Aug-12 1:45am
View
thanks! yep i've already changed that. But i think the only reason is that "declare a hidden" is actrually not possible. i would forget this "Hide()" and make a new way out.
christmars
27-Aug-12 1:53am
View
i just play it for learning. you know, i am a beginner and i am starting with some basic books like Windows Forms Programming with C# etc...
christmars
27-Aug-12 1:47am
View
ok, firstly thank you so much. knowing it's not possible is already helpful. i am a beginner:). But i would try to code a variable like you mean.
christmars
27-Aug-12 1:41am
View
yes you got it.
christmars
22-Aug-12 2:55am
View
where should i put this in?
christmars
21-Aug-12 1:40am
View
Thank you!! it makes sense! what i wrote was Showdialog(), there must have difference.
Can you please tell me, how can i get Form1 again after i close Form2?
christmars
20-Aug-12 9:58am
View
But with "Hide();" there is nothing anymore. Both Form1 and 2 are hidden. I can't see Form2 either...
christmars
13-Aug-12 5:35am
View
also i have changed my "Form1" and want to reload my project. But it runs as before, not refreshed. And now the big prolem is, it doesn't run at all!
christmars
10-Aug-12 1:50am
View
thnx!
christmars
7-Aug-12 4:24am
View
thank you! i will try to use it.
christmars
7-Aug-12 4:21am
View
for the realizing the project. How can i write the c# to connect my cameras with the pc and control them. i have no idea what to do right now. Thnx!
christmars
7-Aug-12 4:15am
View
sorry. I want to know how to realize the function with C#. How to make the codes able to control the cameras?
christmars
7-Aug-12 4:13am
View
Deleted
sorry, i mean if you know how to write such a c-program to realize the function.
Show More