|
Hi.. someone please telling me how to connect MySQL.
|
|
|
|
|
|
|
Hey!
I'm having trouble using different colors to make parts of surfaces transparent. I'm using a ColorKey and I'm setting high and low values and then I set the colorkey to the surface, but the only color that works is Black (that is: RGB 0,0,0) . Does anyone have any experience in this and can anyone tell me how to conquer this problem...?
I'm using C# and VS.NET...
thanks
|
|
|
|
|
I'm looking into event properties, and I've found that there's very little out there that discusses them. Why? It seems that they are very useful.
Anyway, with event properties, you can do custom handling of the addition and storage of event delegates. It would seem that you can also do custom handling of the invocation of those delegates. Is this correct? In my case, I'm wanting to stop invoking event delegates when a Handled property in the event's EventArgs is set to true.
Also, I heard that event properties are slower than normal events. Why is this? Is there a way to minimize/get around this?
Thanks in advance!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
What are you talking about?
Those add/remove accessors for events?
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Yes. They're called event properties, because they have accessors just like properties.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
OK, just wanted to know if it wasnt something I have not ever seen or heard about
ANyways. The C# compiler allows one to define an event in a "shorthand" format, ie the way we all use. Behind the scenes however, the compiler does this:
Your input:
event EHandler MyEvent;
Compilers ouptut:
private EHandler MyEvent;
event EHandler MyEvent
{
add
{
this.MyEvent = ((EHandler) Delegate.Combine(this.MyEvent, value));
}
remove
{
this.MyEvent = ((EHandler) Delegate.Remove(this.MyEvent, value));
}
}
This can be easily seen in Reflector.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Thanks for the info. What I don't understand is:
* Why would this type of event be slower?
MSDN says: "Note that event properties are slower than event fields, as each event delegate has to be retrieved before it can be invoked. "
But wouldn't the cost of retrieval be minimal?
* Would I be able to handle the invoking of the delegates myself? Since I have access to each delegate, this shouldn't be too hard.
* In order to do what I'm wanting to do, I would have to call each of the delegates separately, rather than combining them and calling them together. What are the performance costs of this?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
Why would this type of event be slower?
Too small to notice
jdunlap wrote:
Would I be able to handle the invoking of the delegates myself? Since I have access to each delegate, this shouldn't be too hard.
No problems here either
jdunlap wrote:
In order to do what I'm wanting to do, I would have to call each of the delegates separately, rather than combining them and calling them together. What are the performance costs of this?
Multicast delegates are stored as a linked list. By defining a property, one can use a different container such as a hashtable, array, arraylist or some other ingenious datasource (SQL/XML).
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
OK, thanks for the info!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
How can I make my project (which result is .exe file) to be a screen saver (I think extension is .scr) ???
|
|
|
|
|
|
Can anyone tell me what is different about c# compared to visual c++ 6 and does the c# enviornment use the .net framework... if so what are some disadvantages and advantages to it + I'm new to c# and wondered will it be the future of visual c++ 6 and maybe replace mfc?? Please I would appreciate any responses.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Snyp wrote:
what is different about c# compared to visual c++ 6
One is a .NET language, the other a development tool which uses Microsoft's C+ compiler and has support for MFC.
Snyp wrote:
does the c# enviornment use the .net framework
Yes, of course. C# is a .NET language.
Snyp wrote:
what are some disadvantages and advantages to it
Some advantages of C#:
- syntactically very similar to C/C++/Java.
- simpler than C/C++ -- no need to deal with pointers and memory management.
- code written in C# can be used and extended by other .NET languages.
- has a few features not found in C/C++/Java, such as Properties.
Some disadvantages of C#:
- Some C++ features, such as multiple inheritance, default parameters, preprocessor macros, and templates (which are coming soon) are not there.
- Garbage collection scheme may not be suitable for some real-time, performance critical apps.
I hope to have shed some light on your doubts. Several people have brought up this issue in other forums, such as the Lounge. I recommend you do a Search on the topic to help you decide your direction.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Definition from MSDN for interactive processes:
"Interactive Processes
- A service that can communicate with the desktop."
Does that mean if a "Win32OwnProcess" or a "Win32SharedProcess" is not an "InteractiveProcess", some sort of mechanism prevents that process from interacting with Desktop.
I just wrapped up some code in Windows Services - didn't configure it specifically as interactive process, but when I query ServiceController object, it tells me that it's an Interactive Win32OwnProcess. My service does nothing more than listening on a Tcp port and spits out a block of byte in return when connection is accepted. Any client can interact with desktop in response to the byte sent out by my Windows Service. Is that what makes it "Interactive"?
Thanks.
|
|
|
|
|
Hi !
Can anybody please help me?!
I have an object which holds a System.Timers.Timer .
Unfortunately the GC doesn't collect the Object when the timer is running.
any ideas what I can do?!?
thanks.
andi
|
|
|
|
|
|
oh.... nope.
thank you.
andi
|
|
|
|
|
Hi , im trying to use MS Script Control (com) in my app.
it works wonderful but when a script has a syntax error , windows either shows a msgbox or a "do you wish to debug the script blabla"
is there ANY way to turn off this feature (i want to turn it off for my app ONLY , not for entire windows)
any ideas?
if this is impossible , does anyone know of any good VSA samples?
can i use VSA to evaluate expressions the same way as the scriptcontrol? (i only need to evaluate a expression ,no methods/functions or anything)
//Roger
|
|
|
|
|
|
i solved it.
i use jscript.net now instead.
very cool stuff
//Roger
|
|
|
|
|
Hi.
I'm currently working on a deployment package for a .NET Windows Application. The application use Windows Media Player 9 to pre-view media content. I've read trough many of the articles on MSDN about redistributing WMP with your applications, but most of the examples on how to do this code-vice is in C++. We allso found documentation on how to run the setup.exe file with command line switches to install it in silent mode (no gui for the user, it just gets installed).
Our application allso need MDAC 2.8 to run, so we're deploying that as well. Deploying MDAC was a charm, since we found a pre-made merge module we could include in our MSI.
So, question 1: Anyone know if there exist a merge module for WMP9?
If we don't find a merge module for WMP9, we'll have to go for the commandline install in silent mode. The problem is that in our installer class, that is inheriting System.Configuration.Install.Installer, we cant "find" the file. Caouse, once the MSI installer kicks in, then current path is set to c:\windows\system32. I'm 99% sure that the reason is that once the MSI runs, it starts the MSI runtime that's in the system32 folder.
So, question 2: How can i find files inside the MSI / find out where the MSI is started?
My third alternative is to write a setup boot strapper .exe that starts the MSI. Since our app is a .NET windows application, the computer need the .NET framework installed. Therefore we need to write a Delphi/C++/VB6 app to check if the .NET framework is installed, and if not install .NET before launching our MSI. We could check for WMP9 after checking for .NET.
And, some might wonder if you're allowed to redistribute WMP. The answer is yes, if you gain a redistributing licence from MS...
Hope some one could give me a few pointers on how to solve this problem.
Best regards,
Jonas Follesø
|
|
|
|
|
Jonas Follesø wrote:
So, question 2: How can i find files inside the MSI / find out where the MSI is started?
You can use GetModuleFileName() unmanaged API which return the path of current process. I think .NET must have something like this too but I don't have MSDN installed on this machine and my connection is too slow to check online MSDN.
For your third question I think when you create setup for your C# project and you add Installer class to it, this setup need .NET framework to run itself so I don't think you can check it inside the setup.
Mazy
No sig. available now.
|
|
|
|
|
I'd recommend you leave windows media player and in turn use Managed DirectX9 for playing your Audio and Videos.
In this case, you do not need to do anything special when deploying your project. The interesting thing is that the target machine doesn't need DirectX9 installed, any installed version of DirectX is acceptable(at least I remember that directX 7 was enough)
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|