|
Yeah, by unistalling .NET and installing visual studio 6.
Seriously though, .net is neither trendy or redundant. Depending on the language you are coming from you'll be amazed at how much more you can accomplish in .net compared to your previous language. Things that used to be difficult or require 3rd party tools are now easy and built-in to the language.
.net 2003 comes with an obfuscator(?) or you can get a tool for .net 2002 that will do it for you.
|
|
|
|
|
Does anyone know how I can get (and eventually set) the properties of a file.
I have some pictures take with a digital camera. In all the pictures properties (attributes?) are set for lot o things. E.g. Widht, Height, Bit Depth, Flash Mode, Focal Length, etc...
I guess that the attributes are dynamic. But how can I read them using the Framework?
I have not been able to find the attributes using a FileInfo-object.
I have seen someone doing this on the net using a COM-object with prog-id "DSOLEFILE.PropertyReader".
Do I have to use this in stead? And in that case where can I find it?
Thanks in advance,
Mattias
|
|
|
|
|
Here is a class I have used before:
Imports System.IO<br />
Public Class ProjectFile<br />
Private _path As String<br />
Private fi As FileInfo<br />
Private _Name As String<br />
Private _DirectoryName As String<br />
Private _Extension As String<br />
Private _Attributes As String<br />
Private _CreationTime As Date<br />
Private _LastAccessTime As Date<br />
Private _LastWriteTime As Date<br />
Private _Length As Long<br />
Private _FullName As String<br />
Public Sub New(ByVal path As String)<br />
_path = path<br />
fi = New FileInfo(_path)<br />
_Name = fi.Name<br />
_DirectoryName = fi.DirectoryName<br />
_Extension = fi.Extension<br />
_Attributes = fi.Attributes.ToString()<br />
_CreationTime = fi.CreationTime<br />
_LastAccessTime = fi.LastAccessTime<br />
_LastWriteTime = fi.LastWriteTime<br />
_Length = fi.Length<br />
_FullName = fi.FullName<br />
End Sub<br />
Public ReadOnly Property FullName() As String<br />
Get<br />
Return _FullName<br />
End Get<br />
End Property<br />
Public ReadOnly Property Length() As Long<br />
Get<br />
Return _Length<br />
End Get<br />
End Property<br />
Public ReadOnly Property Path() As String<br />
Get<br />
Return _path<br />
End Get<br />
End Property<br />
Public ReadOnly Property Name() As String<br />
Get<br />
Return _Name<br />
End Get<br />
End Property<br />
Public ReadOnly Property DirectoryName() As String<br />
Get<br />
Return _DirectoryName<br />
End Get<br />
End Property<br />
Public ReadOnly Property Extension() As String<br />
Get<br />
Return _Extension.ToLower<br />
End Get<br />
End Property<br />
Public ReadOnly Property Attributes() As String<br />
Get<br />
Return _Attributes<br />
End Get<br />
End Property<br />
Public ReadOnly Property CreationTime() As Date<br />
Get<br />
Return _CreationTime<br />
End Get<br />
End Property<br />
Public ReadOnly Property LastAccessTime() As Date<br />
Get<br />
Return _LastAccessTime<br />
End Get<br />
End Property<br />
Public ReadOnly Property LastWriteTime() As Date<br />
Get<br />
Return _LastWriteTime<br />
End Get<br />
End Property<br />
End Class
Also check out this link: LookCool, an image browser application (JPG only) and Photo Properties By Jeffrey S. Gangel
Jim
|
|
|
|
|
Thanks a lot...
That helpt me out completely.
/Mattias
|
|
|
|
|
how can I make a shortcut for button in .net cf (smart device application for windows ce .net)
Ignatov
|
|
|
|
|
Anyone know of a Diff component (like WinDiff, WinMerge, Araxis Merge, et al) which i can use to compare files, which preferably ALSO has support for reading from streams, not just from disk files?
Thanks in advance,
- Eidolon.
|
|
|
|
|
There are at least two different managed diff implementations posted as articles here on codeproject. Do a little searching.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Hi @ All!
I was wondering if anyone knows about a class in the .net framework to work with shortcut (.lnk) files.
Should be a class to get the path of the exe, the image etc...
I searched the .net help for hours, but i couldn't find anything. Now i might write a class myself, but i thought i'll ask if there already is one first...
thx!
|
|
|
|
|
Hi everybody.
Is there a way to use .NET Remoting with Visual C++ .Net?
In positive case, how to build the interfaces like they're
built in C#?
Thanks,
Moises.
|
|
|
|
|
With VS 2002 we could send a GET request to a web service and it would work. After upgrading to VS 2003 it doesn't work and doesn't seem to be available. Anyone know what happened?
ed
Regulation is the substitution of error for chance.
|
|
|
|
|
Here are some codes:
ICodeCompiler comp = (new CSharpCodeProvider().CreateCompiler());
CompilerParameters cp = new CompilerParameters();
cp.ReferencedAssemblies.Add("system.dll");
cp.ReferencedAssemblies.Add("system.data.dll");
cp.ReferencedAssemblies.Add("system.xml.dll");
cp.GenerateExecutable = false;
cp.GenerateInMemory = true;
StringBuilder code = new StringBuilder();
code.Append("using System; \n");
code.Append("using System.Data; \n");
code.Append("using System.Data.SqlClient; \n");
code.Append("using System.Data.OleDb; \n");
code.Append("using System.Xml; \n");
code.Append("namespace ADOGuy { \n");
code.Append(" public class _Evaluator { \n");
//code.Append("public static double MAX(double x,double y) \n");
//code.Append("{ \n");
//code.Append("public double max=0;\n");
//code.Append("if (x>=y) \n");
//code.Append("max=x;\n");
//code.Append("else \n");
//code.Append("max=y; \n");
//code.Append("return max; \n");
//code.Append("} \n");
code.Append("} }");
CompilerResults cr = comp.CompileAssemblyFromSource(cp, code.ToString());
I define a namespace and a class in the code string, it's ok. but when i add a method in the code string(marked as note://) ,it can't work. Who can tell me what format required of the code string.Thanks.
|
|
|
|
|
jian-ping wrote:
//code.Append("public double max=0;\n");
err, you should have seen that in the compilerresults...
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
That's not the problem,i just want to know how i can define a method in that class.
i think it may do that.but i wonder how to do it.
|
|
|
|
|
All,
I'm writing a data acquisition and control application that communicates with data boards and a control system using TCP/IP. I can design the application to use 1000's, 100's or 10's of sockets. My question is should I treat sockets and a scarce resource and try to conserve their use or create as many as I need without any performance worries?
Thanks for any comments.
Jeff Monheiser
|
|
|
|
|
A socket basically maps into a kernel object. It uses system memory - paged pool, IIRC.
The only answer I can give is to measure and find out. If your application will be the only thing running on a 1GB+ machine, thousands is probably OK. If on a 64MB system, you'll probably have horrible swapping problems.
|
|
|
|
|
We have four web servers each hosting our web service. We use DNS round robin to load balance across these four servers. In order to use SSL we have a certificate called for example, www.loadbalanced.com which is installed on all four machines. Things work beautifully.
However,
We now have a new internal application that needs to consume the web service over SSL but requires access to specific web servers, i.e. using they internal hostname, Unfortunely the SSL connection no longer works, I'm assuming this is because the hostname does not match the SSL certificate name. Can this be programmatically overriden? Just like clicking the security warning dialog box that appears when browsing a secure site using IE with a different hostname.
Many thanks in advance.
ps Alternative ways of depoloying the application to achieve the same affect also welcomed
|
|
|
|
|
Our web service occassionaly becomes unavailble to clients because the aspnet_wp.exe process is being restarted. We have some very strange event messages in the Application logs when this happens. Can anyone shed any light on these messages and what could be wrong?
Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1000
Date: 05/09/2003
Time: 10:40:48
User: N/A
Computer: SUENG01
Description:
aspnet_wp.exe (PID: 1632) stopped unexpectedly.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Event Type: Error
Event Source: .NET Runtime
Event Category: None
Event ID: 0
Date: 05/09/2003
Time: 10:40:48
User: N/A
Computer: SUENG01
Description:
The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: .NET Runtime version 1.1.4322.573- Setup Error: Failed to load resources from resource file
Please check your Setup.
Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1090
Date: 09/09/2003
Time: 00:34:23
User: N/A
Computer: SUENG03
Description:
Failed to execute request because QueryInterface for ASP.NET runtime failed. Error: 0x80004005 Unspecified error
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
|
|
|
|
|
Please guys HELP! How do I upload large data file from a client to a server located in different region. The webservice takes forever, is there anyway or special code ot do that job. I'm using "UploadFile" method of the webclient but it always generates an error that says"Method Not Allowed" . Help.
Thanks a lot.
Mohsen Farran
|
|
|
|
|
Seriously consider using FTP rather. You don't want to use HTTP post for that kind of thing.
regards,
Paul Watson
Bluegrass
South Africa
Miszou wrote:
I have read the entire internet. on how boring his day was.
Crikey! ain't life grand?
|
|
|
|
|
Thanks a lot, you are right. But I have a question, does FTP works from all computers to my Server after I configure and allow ftp to my server, or is there a possibility that a user might be disallowed due to his computer configuration?
Thanks a lot again.
Mohsen Farran
|
|
|
|
|
I have the same problem.
I need to copy some files to a server but I m not sure how to use ftp ???
I m still new to web developement and VS.NET
Nisrine
|
|
|
|
|
I am curious as to how the auto-scroll feature works in the .NET scrollable controls. How does it set the view-port into the virtual space of a control’s draw-able space?
I understand how to do it if I have a definable space (say like using a bitmap etc. with defined unchanging bounds) but am not sure how to do this if the region I’m using is infinite with changing bounds.
I have a situation where the width and height are fully scalable and dynamic with other controls (that know how to draw themselves in the proper place on their parent control) being “drawn” on the virtual area. I can get this to work with auto-scroll (I keep changing the AutoScrollMinSize as it changes) until I look at the requirement that another control above it (same width) has to scroll in lock-step for the horizontal scrolling.
The documentation states that you can set the AutoScroll property to true and then optionally turn off the horizontal or vertical scroll bars by setting the protected members HScrollBar or VScrollBar to false. In practice, it doesn’t seem to work for me. If the AutoScrollMinSize property changes (which mine do constantly), it resets the values to true. At this point, even if I reset the variables back to false, they still show up regardless of how they were set and I have scroll bars where I don’t want them.
Here are my questions:
•Is there a way to make the auto vertical/horizontal scroll-bars stay invisible with AutoScroll turned on (like the documentation states)?
•If not, what is the best way to override this functionality to mimic the auto-scroll functionality? I’d really like to not have to play with the WM_H/VSCROLL window messages. But if this is the best way, again, how do I change the view-port position into the virtual space I’m using?
•Is there a better way?
Thanks,
Mike
|
|
|
|
|
Hi dear,
www.shahabfar.com a persian website that introduces Microsoft .NET technology is released.
If you are familiar with farsi language you can visit this website.
Thank you in advance.
|
|
|
|
|
Hi,
How do I create Modal DialogBoxes in VS.NET
Plz help me.
bye
raheel
|
|
|
|
|