|
with the object- ArrayList - you have to add :
using Sustem.Collection;
|
|
|
|
|
hi,
i'm developing a program with a transparent area. i want to draw a text on that area. how do i get to know the colors of the pixels underneath? i want to adjust the textcolor, so that the text is almost always easy to read (you know, white on black, black on white, etc...)
would be the same, if i would like to develop a screenshot-program.
any idea?
thx.
:wq
|
|
|
|
|
I think you'll have to use P/Invoke to call directly into the Win32 API to do this.
Here's a class I wrote that should get you started; it does screenshots now.
http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=win32window
One more thought - GDI+ supports alpha channel blending, which lets you do transparency. I don't know if it works for windows over the desktop, but it's worth exploring. You'll find it in the System.Drawing namespace.
|
|
|
|
|
i will look at your class in a minute. thx.
i know about the alpha-blending and i'm using it. that's why i need the background-pixels. i want to know which color to use for text in the transparent area. when the background is dark, i use a light color, when it is red i use ... you see?
:wq
|
|
|
|
|
yep. it works. great man!
so GetDesktopWindow is the magic function. hmm. i always thought it takes a picture of the background-image of the desktop...but luckily i was wrong and it really takes a screenshot
btw: what das msft mean?
:wq
|
|
|
|
|
Rüpel wrote:
what does msft mean?
Microsoft, if I remember correctly Eric is one of the higher ups of the C# team.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Hello everybody !
I want to use the WindowsXP FaxService COM API in my solution. I`m using Visual Studio .NET
I added a reference to the FaxService TypeLibrary in the project and the generated NameSpace is FAXCOMEXLib.
Then I wrote the following code:
try<br />
{<br />
FAXCOMEXLib.FaxServerClass FaxServer=new FAXCOMEXLib.FaxServerClass();
FaxServer.Connect("");
<br />
FAXCOMEXLib.FaxFolders FaxFolders=FaxServer.Folders;
<br />
}<br />
catch(Exception ex)<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
After creating the FaxServer object and connecting it to the local FaxService, the Properties that return an object (like Folders,InboundRouting,LoggingOptions) are not valid.
There is a {System.InvalidCastException} in the Value of the Autos section in the debugger. Why?
Thank you !
|
|
|
|
|
Hmmm? Something completely dedicated to C#/.NET/ASP.NET? Tired of hearing people battle languages or all the things Microsoft did wrong, just a good regularly updated source of information C#.
Rocky Moore
|
|
|
|
|
MSDN is a pretty good mag - I just resubscribed myself.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
If I I didn't lived in sweden and lived in US instead I would subscribe to that magazine!
It's too expensive to import to sweden!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Christian Graus wrote:
MSDN is a pretty good mag - I just resubscribed myself.
Yeah, it is pretty good for articles and is one of the most worn The only other one I read with any regularity is Visual Studio magazine but it is falling quickly. They keep pushing VB.NET. I guess most of their readers must be VB'ers but I don't care to ever read an article written in VB, I left the DIM statement over 20 years ago and don't care to go back
It surprises me that some company has not jumped on it yet. With .NET/C# the possibilities of coding have increased in such leaps that it put the fun back in programming. That is not to mention how you have to wrap you mind around a completely new programming model. Reminds me of when I jumped from C programming in DOS to C++ and Windows 3.0, totally different worlds.
I would love to find a magazine or eZine that similar to the old Compute! Magazine or even Byte for that matter just all consumed in .NET and C#. You know articles that help you code not argue compatibilities and capabilities. I am already sold on C#, no turning, I just want exciting articles on coding and best practices of coding in this new world.. There seems to be a large number of programmers involved in C#/.NET, well maybe the media will pick up more on it.
Just take a look here at CP. The C# forum runs usually 15%-40% of the volume of the C++ forum which CP has mostly been a C++ site. It’s catching on…
[stepping down from soapbox]
Thanks for the suggestion.
Rocky Moore
|
|
|
|
|
Visual Studio mag WAS VB Developer mag, they merged with their failed C++ mag, which failed because it moved entirely to C# without changing the name. I gave up on it long ago.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Christian Graus wrote:
Visual Studio mag WAS VB Developer mag, they merged with their failed C++ mag, which failed because it moved entirely to C# without changing the name. I gave up on it long ago.
And now Visual Studio Magazine is completely failing.. Have you noticed how thin they are I personally would be willing to pay a subscription to a decent magazine on the topic with an organized advertising section (I still like looking at the ads).
Rocky Moore
|
|
|
|
|
Hi,
My application will collect different parameters from user input. Once the "Execute" button is pressed, the parameters will be passed to related methods for exection. I try to figure out how to stop the program flow (not close the application but ask input for missing parameters)if I find some parameters missing (something like Exit() in VB) Can someone please tell me how to do this? Thanks!!
|
|
|
|
|
|
Thank you. Since I am new to C#, can you please show me how to throw an exception and catch it? Thanks!
|
|
|
|
|
|
Application.Exit()
?
Paul
|
|
|
|
|
He said:
D Shen wrote:
not close the application but ask input for missing parameters
;-PNnamdi told him how to do it.
David Stone
But Clinton wasn't a predictable, boring, aging, lying, eloquent, maintainer-of-the-status-quo. He was a predictable, boring-but-trying-to-look-hip, aging-and-fat-but-seemingly-oblivious-to-it, lying-but-in-sadly-blatant-ways, not-eloquent-but-trying-to-make-up-for-it-by-talking-even-more, bringer-in-of-scary-and-potentially-dangerous-new-policies. And there was also Al Gore. It just wasn't *right*.
Shog9
|
|
|
|
|
Yeah, misread the question completely. Such is life. I'm getting used to people pointing out stupid things I've said today.
I swear I should go back to bed
Paul
|
|
|
|
|
I've read the documentation on how to install an NT service using .NET but I'm unsure of exactly how it works. I 've created the installer object but hte documentation is unclear of what I should do in my Custom Action or even how to set one up properly. Does anyone know of a good tutorial on this?
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
I'm actually working on an article that includes coverage of services. Here's the code I use to install a service:
[RunInstaller(true)] public class ServiceInstaller: Installer
{
private System.ServiceProcess.ServiceInstaller svcInst;
private System.ServiceProcess.ServiceProcessInstaller processInstaller;
public ServiceInstaller()
{
processInstaller = new System.ServiceProcess.ServiceProcessInstaller();
svcInst = new System.ServiceProcess.ServiceInstaller();
processInstaller.Account = ServiceAccount.LocalSystem;
svcInst.StartType = ServiceStartMode.Manual;
svcInst.ServiceName = "EWService";
svcInst.DisplayName="EW Sample Service";
Installers.Add(svcInst);
Installers.Add(processInstaller);
}
}
The code basically establishes the service's name, display name, startup, and logon. Use InstallUtil to install the service and configure it as in the preceding class.
Erik Westermann
Author, Learn XML In A Weekend ^ (October 2002)
|
|
|
|
|
Can someone help me understand the Evidence objects as they pertain to Assembly.LoadFrom. I'd like to be able to load Assemblies from a file share or mapped drive, but have security issues. I'm not sure how to use the Evidence to do this or if I can really, but before I go flinging code I'd like some knowledge.
|
|
|
|
|
ya so apparently it is working... I'd still like to understand how it works and how to use it because it does not work with file shares (ie file://\\server\assemblies\asdf.dll).
Tanka
|
|
|
|
|
Hello,
I have a ASP.NET page that is rendered. However, I would like to store the rendered html code in a string. Is that possible?
Thanks!
|
|
|
|