|
if u could tell in detail i would be very thank full to u because i am doing mine final project and i am doing the same work for many days but couldnt succeed yet?
r00d0034@yahoo.com
|
|
|
|
|
There are quite a few (a lot actually) of articles listed here[^] on how to use C#. If you have a question about how to do something, show your code in a new thread here and I'm sure someone will try to help. I can not do your *project* for you as I am currently too involved right now. If you do have a question I would be glad to try and help you out though.
Nick Parker
|
|
|
|
|
How to make a color on a Graphics object or a Bitmap object transparent?
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++!
|
|
|
|
|
Why not use an ImageList ?
Once an ImageList object from the .Net toolbox is added to your form, you can change the properties and btw indicate the transparent color.
In fact, this works exactly the same than with MFC CImageList.(which itself is a wrapper of WIN32 ImageList API).
|
|
|
|
|
Say you have a graphics object named g you can do this:
g.Clear(Color.Transparent);
HTH
Nick Parker
|
|
|
|
|
There is a MakeTransparent method in the Bitmap class
James
|
|
|
|
|
public class Shell
{
[StructLayout(LayoutKind.Sequential)]
private struct SHFILEOPSTRUCT
{
public System.IntPtr hWnd;
public System.Int32 wFunc;
[MarshalAs(UnmanagedType.LPStr)]
public System.String pFrom;
[MarshalAs(UnmanagedType.LPStr)]
public System.String pTo;
public System.Int32 fFlags;
public System.Int32 fAnyOperationsAborted;
public System.IntPtr hNameMappings;
[MarshalAs(UnmanagedType.LPStr)]
public System.String lpszProgressTitle;
}
[DllImport("shell32.Dll")]
private static extern System.Int32 SHFileOperation(ref SHFILEOPSTRUCT lpFileOp);
private enum FileOpFunc {Delete = 3}
private enum FileOpFlags {Silent=0x04, AllowUndo=0x40, NoConfirmation=0x10}
static public void MoveFileToRecycleBin(string filePath)
{
SHFILEOPSTRUCT fileop = new SHFILEOPSTRUCT();
fileop.wFunc = (int)FileOpFunc.Delete;
fileop.pFrom = filePath;
fileop.fFlags = (int)(FileOpFlags.Silent|FileOpFlags.AllowUndo|FileOpFlags.NoConfirmation);
SHFileOperation(ref fileop);
if(System.IO.File.Exists(filePath))
throw new System.IO.IOException("Could not move " + filePath + " to the recycle bin.");
}
}
|
|
|
|
|
Sorry I hit submit instead of preview!
Anyway here is the problem. The call to SHFileOperation() on it's own works and the file is moved to the recycle bin. If I test the return value or test if the file exists the call to SHFileOperation() fails to move the file.
This is the strangest problem I think I have ever seen.
BTW my test file is a 0 length text file C:\Test.txt
HELP I'm scared!
Joel
|
|
|
|
|
Okay I found the problem, it was a combination of incorrect structure declaration and not double nulling the pFrom member (who's idea was that, a semi-colon would have worked with a single null at the end grrr).
Joel
|
|
|
|
|
|
|
|
Not directly.
If, when you browse to the directory on the website, you get a list of files you can parse the resulting page for the filenames.
There is also an HTTP extension called Web DAV but I only know the name; I don't know anything else about it
James
|
|
|
|
|
|
Nnamdi Onyeyiri wrote:
it give a little mesage saying whops, not alowed here
LOL exactly. In IIS for one there is a Directory Browsing option which the admin can enable or disable. The whole point is to allow or disallow people from snooping around, checking out your files etc.
However there are ways and means of circumventing the security and getting a directory list. However I am not about to go spreading that kind of info, you can search for it.
Nnamdi Onyeyiri wrote:
thats no use is it
Well search Google for Web DAV, you will find a ton of links and examples.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
|
|
|
|
|
|
Nnamdi Onyeyiri wrote:
Email
LMAO Nnamdi. No sorry won't do. I did not just mean I won't post the links to that info here on CP but that I simply will not spread that kind of info without a legit. reason.
I run IIS boxes and I naturally don't want this kind of info spreading. Anyway, you can get it from Google or even from Microsoft if you present a reasonable reason
"I will not be a part of the problem" or some such cliched nonsense.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
|
|
|
|
|
|
Paul Watson wrote:
However there are ways and means of circumventing the security and getting a directory list. However I am not about to go spreading that kind of info, you can search for it.
Translation:
We have a bug we cant fix.
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
I'm writing an application for collaboration where images are streamed from a capture source and it also allows users chat with text chat. So I've designed a network protocol where I can designate the type of command and various other arguments, etc... When this works it works very well, and when it breaks it really breaks. This has gotten me wondering how other developers handle these problems. Can anyone reccomend a good book or a web article, or even personal exprience on how to handle these issues concerning network protocol design?
Thanks,
Steven
|
|
|
|
|
Hi Gurus,
I've made a Dialog based in C# .. then copy the .exe to windows 2000 where no .NET is installed. When i run it, i asked for the mscoree.dll. I copied the file. THen it asks for the registry key which points to .NET framework...
So how do i run an .NET C# app in other OS without installing .NET?
Thanks in advance
NT
|
|
|
|
|
Trevor Vuong wrote:
So how do i run an .NET C# app in other OS without installing .NET?
Simply put: You don't
The framework HAS to be installed on the client computer for it to execute .NET code.
You wouldn't expect a game using DirectX to run without DirectX installed so why is .NET any different?
James
|
|
|
|
|
To clear things up more, the win2000 just need the .Net framework runtime, not the whole SDK.
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Here is the link to let your customers download the run-time : http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/MSDN-FILES/027/001/829/msdncompositedoc.xml
- That's 21MB, and that's just part of the story.
- If your app uses Data Access, you also need to point a link to download MDAC 2.7
- The DotNet Framework Service Pack 2 has been released yesterday, as an additional download.
And of course, the latest DotNet framework is strictly incompatible with an earlier, such like the one which came with VisualStudio DotNet beta 2.
Now you know...
I personally resent a lot over Microsoft for such philosophy. Not only Microsoft is relying on us developers to praise and evangelize DotNet, but we are actually forced to explicitely ask customers to download thse big chunks just to be able to run an .exe
At least, in the past, when you had finished installed your operating system, you could run .exes. That's not true anymore. That's a reason why I question Microsoft about whether DotNet is really an advancement...
By the way, comparing to DirectX is not exactly relevant. DirectX run-time is much shorter in size, much less frequent in updates (barealy once every one and a half year), and on top of that it carries a lot of very valuable values for the end user. DotNet framework is the exact opposite of that : no value for the end user itself.
|
|
|
|
|
Anonymous wrote:
I personally resent a lot over Microsoft for such philosophy. Not only Microsoft is relying on us developers to praise and evangelize DotNet, but we are actually forced to explicitely ask customers to download thse big chunks just to be able to run an .exe
Think of it like dynamically linked MFC. Your MFC app wont run without it installed. Or Java which which will not run without the Jave VM.
You just need to include it in your setup program just like any other API that is not shipped with all the OSs (DirectX, DAO etc.)
If you really feel strongly then don't write any .NET apps until the runtime ships with the OS and then wait until nobody uses Win98/2000/XP - should be about 7 years.
Joel
|
|
|
|