|
Oops, wrong forum ... sorry!
http://www.asura.co.uk
|
|
|
|
|
Hi everyone,
I set my main form's icon. When I tested it in debug mode, a System.Resources.MissingManifestResourceException gets thrown by at the point where the forms designer code attempts to load the icon:
this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
When I view the .resx file in VS however, I can see the icon is there. Does anyone know what the cause of this problem could be?
TIA,
Ralph
|
|
|
|
|
I discovered that my form was declared inside a namespace `Configuration1'. The name of the project is `Configuration'. Changing the namespace to `Configuration' seems to have solved the problem.
|
|
|
|
|
II would like to capture the word (text) under the mouse from any program in real time. If the mouse pauses over a word, I would get a callback or notification that includes the actual text. This would not be limited to my own program. I want to catch the text on any program.
I know I could watch the clipboard and use cut or copy to get the text from another app.
I want to make a program that checks the word against a local word table so that my program window can show information about the word the mouse is over.
chvt_smpt
|
|
|
|
|
Are you using C++/CLI, or are you in the wrong forum ?
there's an API called GetWindowAtPoint ( from memory ), which would allow you to call GetWindowText. Getting the word under the mouse is a little harder.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Looking for someone who has basic knowledge of writing a AMX plugin for CS 1.6
Basically it has to take a command the admin does and store it in a text file on a server to check for proof of admin abuse.
|
|
|
|
|
What's CS 1.6 ? It supports .NET ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Counter-Strike 1.6.
The admin commands are input through Steam at www.steampowered.com
I tried to google to see if Steam supports .NET but nothing came up
-on the other hand-
There is a "guide" at www.amxmodx.org on the constants and such. They also have downloadable plugins and you can open the .sma files in notepad. The following is a link to plugins that record stats:
http://www.amxmodx.org/compiler.php?mod=2&cat=3&plugin=&author=&go=search[^]
So pretty much when admin uses: amx_kick or amx_slap or amx_ban it needs to record his STEAM id and write it to a text file in the database.
|
|
|
|
|
Hi all,
I'm having trouble with my multithreading. I am doing video capturing so have and infinite loop in which frames are captured, unfortunately while the thread is running the class (containing the loop) the UI freezes.
I'm wondering if anyone knows how i am able to create a simple worker thread which executes the class and keeps the UI responding?
Here is the code that executes the class. I have attempted to create what i thought was a worker thread, with no avail.
<br />
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {<br />
<br />
ThreadStart^ t1 = gcnew ThreadStart(this, &FYProjV4::Form1::detectThreadStart);<br />
Thread^ recogThread = gcnew Thread(t1);<br />
<br />
recogThread->IsBackground = true;<br />
recogThread->Start();<br />
<br />
<br />
}<br />
<br />
private: System::Void detectThreadStart() {<br />
<br />
if(reportBox1->InvokeRequired == false)<br />
{<br />
<br />
FaceRecognition recogTools;<br />
recogTools.StartRecognition(reportBox1, faceBox1);<br />
}<br />
else<br />
{<br />
<br />
this->BeginInvoke(gcnew DetectThreadStartDelegate(this, &FYProjV4::Form1::detectThreadStart));<br />
this->EndInvoke(result);<br />
<br />
}<br />
<br />
}
I am in a real rush to get this sorted so any suggestions would be greatly appreciated.
Also, Removing the loop is not an option and it must be in managed c++.
Thanks for your time
|
|
|
|
|
|
this->BeginInvoke causes the call to be executed on the main thread, so you're still blocking the main thread while StartRecognition runs (and the worker thread just waits at this->EndInvoke).
You have to run the code that takes a long time on the separate thread and Invoke only for the parts that update the UI.
|
|
|
|
|
With VS2005, I'm having a problem figuring out how to get new directories (from dirctx SDK Feb 2007) to be added to the standard ones.
I have tried Tool / Options, Project Options "Additional Included Directories" (/I), and cannot get it to work.
Clearly I'm missing the boat on this one... help.
|
|
|
|
|
You're trying to use managed DirectX, or are you in the wrong forum ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
OMG, sorry was totally in the wrong forum.
I got it solved anyways, thanks.
|
|
|
|
|
How do I disable the com1 port from being used by the debugger? I am writing a Mobile 5.0 application which uses com1 and it is in conflict with the debugger. Thanks.
|
|
|
|
|
Do you want to use C++/CLI, or just vanilla C++ ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
Under certain conditions, I would like my C++/CLI Windows Forms application (i.e. its main form) to show up maximized in the foreground, even if it is minimized or under other windows. Unfortunately, BringToFront and Focus functions don't help.
I have even imported and called the SetForegroundWindow API, with no effect:
[System::Runtime::InteropServices::DllImport("user32.dll")]<br />
extern bool SetForegroundWindow(IntPtr ^hWnd);
I call the code in Click event of the System::Windows::Forms::NotifyIcon component, and it gets called, but it has no effect.
|
|
|
|
|
I think you will need to import and call ::SetWindowPos()
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
There's a WindowState property, from memory. There is certainly a property that takes an enum for maximised. And, TopMost is a property you can set to true.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you!
TopMost actually brings the window up. I am turning this property off afterwards, because I don't want this window to be permanently topmost, but it stays on the top of the z-order, which is what I needed.
|
|
|
|
|
Hi All,
I am writing code snippet that insert records into a table which has a primary key on 2 columns..say for example Column X and Column Y..
I want to prevent duplication of records from being inserted into the table using C++..is there any way i can acheive this..i dont want to use Maps for storing the already inserted combination and thereby comparing before insertion..is there any other way to acheive this..
Thanks In Advance
|
|
|
|
|
Subramaniam s.V. wrote: is there any other way to acheive this..
You mean like using the database? Yes there is.
led mike
|
|
|
|
|
Can you tell me how we go about doing it?
|
|
|
|
|
The obvious brute force way is to query the database for the key, however most modern databases allow you to put a unique constraint on the key which will cause the insert to fail. If you are interested in using a database solution ( I recommend it), try asking a question in the SQL forum here on CodeProject.
led mike
|
|
|
|
|
yeah thats right Led.
Ultimate solution would be to handle it in the database level. I completely agree with you on this point. Infact, my database by default handles this duplication. The problem is, my requirement is that, i need to insert records into a table by traversing up a Tree hierarchy and in my requirement there is a bright chance that duplicate records can be inserted into the database. when i try to insert a duplicate record it throws an error and comes out. All that I want is, if there is duplcaition, I want to skip that insertion from happening and proceed with further insertion of other records
hope you got the problem now..if not let me know i ll explain you the scenario in detail
|
|
|
|