|
Because they both deal with a similar concept, yet one enumeration is in its plural form, and the other enumeration is in its singular form. Consistency would have been nice.
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
stringbuilder.AppendFormat("{0,-10}", mn.Substring(3), j++);
Note the j
<a TITLE="See my user info" href=http:
|
|
|
|
|
AnchorStyles is plural because you can set multiple styles at once, where-as with DockStyle only one may be applied at a time.
Who knows if that's the real reason, but I do similar things with my code
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
OK, you get a 5 for a reasonable sounding explanation.
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
So how does the .NET framework do as far as compound documents? I'm guessing you're probably just supposed to write your own interface defs for all the compound document interfaces yourself, and then use those.
Also, is Isolated Storage the .NET equiv of IStorage?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I don't know enough about your first question to answer it...
jdunlap wrote:
is Isolated Storage the .NET equiv of IStorage?
Isolated Storage is a 'safe' storage mechanism that is meant more for HTTP deployed applications than anything else. I say this for three reasons: 1) you can use Isolated Storage event when running under the Internet permission set (assuming Internet isn't set to Nothing), 2) IIRC the default limit on what can be stored is 10KB and 3) there is no easy way for the user to see what is in isolated storage.
There is supposed to be some utility that you can run which will let you see the contents of Isolated Storage, but you can't expect your end-user to know about that utility.
This is really bad in a situation where the end-user is getting a new computer and wants to move your program to the new PC. How will they find your files (first they probably don't even know Isolated Storage exists), but if they do they just see a series of directories with very weird names.
Until MS makes an explorer work with Isolated Storage like they did for the GAC, I have a hard-time agreeing with people who want to use Isolated Storage to store settings or anything of critical nature.
Well that got off-topic didn't it
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
Thanks for the info. I suppose I'll use the OLE storage implementation.
I'm well versed in OLE document technology, including structured storage, so that shouldn't be too hard.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Something that just hit me, are you trying to read/write existing files/file formats or something brand new?
If the latter then serialization is one step in the same direction. You can either let the framework handle all of the details (simply apply the Serializable attribute to the class/struct) or you can customize it by also implementing ISerializable .
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
For my current project, I am going to use XML. But I want my documents to be able to be embedded in OLE documents, not just linked.
I really like the idea of serialization, and have tried it out. (Just think - persist your whole class and let .NET do the work (except for the attributes on the members)!) But can a legacy OLE document use it like IPersistStorage? (They'd be smart to do it this way, and it wouldn't be too hard.)
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
We have a Windows Service written in C# that simply host some remote
components. The service does nothing itself. We have an ASP.NET application
that initialises the remoting in global.asax and has a single aspx page that
creates the remote component and calls its method, which returns a small
string. Thing is that the service process leaks memory. Now I've read most
of the articles/books on the wonders of the GC and I know that what I'm
seeing is not normal behavour. And here the catch: if I run the application
as a standard process, i.e. I replace the call to ServiceBase.Run with a
long Sleep statement - the application does not leak memory. The CLR memory
performance counters show very different traces of #bytes on heaps running
the same test. What could be causing this behaviour? Could anyone from
Microsoft check to see if remoting components from a Service has memory
issues. In the ASP.NET page I simply release the object by setting the
reference to null. My tests run for several hours with several hour of low
and high load but the service never reduces it memory. The process version
remains very flat. I'm not using any unmanaged resources or any thing that
consumes loads of memory just small string (100 characters or so).
|
|
|
|
|
Do the remoting components make use of any unmanaged resources / should or do you implement the IDispose interface?
|
|
|
|
|
Is anyone doing much work with Graphics.DrawImage? It does an adequate job for small images, but if you start getting into large ( 5 meg + ) images it really sucks. It also does not appear to be any faster if you limit the size of the image that is actually being drawn (drawing only a small portion of it).
DrawImage appears to limit .NET's unusability for anything similar to the complex and efficient drawing capabilities available with the various bitblting techniques in Win32 (which I know are available in .NET with a little extra work, but you no longer get the Transform methodlogy etc. available with GDI+ under .NET, which is nice to have). I'm also aware of various image cacheing techniques which speed up DrawImage - but for large images they simply require too much memory to be practical.
|
|
|
|
|
All of the rendering capabilities in .NET are performed by GDI+ (1.0 at the moment). GDI+ 1.0 has zero support for hardware accelleration, from my understanding. I beleive that GDI+ 1.1 will have support for hardware accelleration (assuming your video card has the appropriate new drivers).
I, too, have noticed this nasty surprise. You can tweak the Graphics object to use lowest quality rendering, and you can use DrawImageUnscaled to try and speed things up a bit, but I don't think it will be an order of magnitude faster than it is currently, and it certainly wouldn't compare to real hardware accelleration of the blitting/stretching.
--
Russell Morris
"Have you gone mad Frink? Put down that science pole!"
|
|
|
|
|
hi,
does anyone know when the gdi+ v1.1 is shipped? even the dll-version for c++?
thx
michael
|
|
|
|
|
Hi all,
i've developed a c# windows application that envolves file I/O. Up to now all development has been on my own machine running win2k pro and i am logged in as an administrator. I recently tried running the code on another machine on which i installed the .net redistributable and as soon as the app tried to access the file system (i.e when opening a file dialog) it through an exception of the type System.Security.FileIOPermissions.
I've looked into it a bit and discovered how the clr assigns permissions to different assemblies at runtime etc.
What i'd like to know is, is there a way for me to configure my code so that it can always access the file system on other machines... i don't want the user to have to manually increase the trust level using the .net config tool as that would be very messy!!
any help is appreciated
Thanks
Paul
Paul Griffin
|
|
|
|
|
It seems that the .NET LicenseProvider does not work if the user is not allowed to modify the executing assembly, for instance, if the licensed control is consumed in an ASP.NET web application.
What are the possible workarounds?
|
|
|
|
|
In the .NET documentation Microsoft is recommending usage of SQL server .NET data provider for accessing MSSQL 7 and above.
Will any one please tell me what are the advantages of using .NET library over OLEDB?
Uday
|
|
|
|
|
Its recommened to use SQL Server .NET data provider because its made strictly for SQL Server and supports all its features. the OleDb.NET provider is a general provider and can be used for connectivity to any database Sql Server, Access, Oracel, etc...
Similarly you should use the Oracle.NET dataprovider for connecting to oracle.
There are finer points than what I've mentioned but that the bird's eye view.
|
|
|
|
|
... except the SQL Server .NET data provider doesn't support COMPUTE BY clauses ...
James.
|
|
|
|
|
I'm having a problem with a form that's supposed to be a topmost form, but it actually isn't. The form is created during the application startup by a method called on one of the main form's components. Here's what I do:
public class MyMainForm
{
CustomControl myControl; // Initialized during InitializeComponent()
public MyMainForm()
{
// Initialize Component then do other stuff
myControl.PerformCustomInit();
}
....
in class CustomControl:
public void PerformCustomInit()
{
TopMostForm newForm = new TopMostForm();
newForm.Topmost = true;
newForm.Show();
}
I hope the description is clear enough. Of course I omitted things that weren't necessary, the topmost form is created only under given conditions on the custom control. However it doesn't stay always on top, and I suspect this is due to the fact that it's created and the property is set in the constructor for the main application form. Anyone can confirm this and perhaps help me with a hint for a solution?
Thank you in advance!
|
|
|
|
|
Isn't there an event for when the form's z-order changes (or some such thing)? Maybe you can trap that and force it back.
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"
|
|
|
|
|
Hello,
i have to get access to the system image list. In MFC i used the SHGetFileInfo-methode to get a handle to the system image list. I need it to display files and their corresponding icon in a listview. What methode can i use in .NET framework c++ ? Maybe someone can help me.
Best regards
tabor25
|
|
|
|
|
|
Hi!
I wanna to build a flow chart program in c#. It is like a simpler IDE. The canvas contains the block (rectangle or circle), link shape, some buttons and lists. If these buttons and lists can make use of the control in dotnet, it will save us a lot time to simulate out ourselves. In the program's design time, user can draw the block and link them, drop the control of dotnet into the block. Adjust its position, size , change its title, and maybe assign some script of vbscript or jscript to the event like button's click. In run time, all element can't be moved, only the event are responsed.
Do you think it possible in dotnet? Is there any example or link to study?
|
|
|
|
|
Take a look at the MSDN docs for System.ComponentModel.Design.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|