|
> Also, an ArrayList, or any other array for that
> matter, can only be indexed by a 32 bit integer
> and, therefore, can only hold a maximum of
> Int32.MaxValue, which is about 2.147 billion,
> elements. Try and exceed this limit, and you'll
> get an OutOfMemory exception.
is this limit also true for Windows 64?
for .NET 2.0 ?
--Max
|
|
|
|
|
Don't know. I would suspect the indexer limit would be the same size as the processor data width.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
> What are you using that's taking up all this memory?
I was using an array of 15 million states:
public class State
{
ArrayList transitions; // {char,state,char,state...}
int infonb;
int canonicalstate;
}
I did not realize how expensive the ArrayList is. Since most states have less than 2 outgoing transitions, I replaced the arraylist with two synch pure arrays:
public class State
{
char[] char;
int[] targetstate;
int infonb;
int canonicalstate;
}
and that came to 1/3 of the previous memory usage.
--Max
|
|
|
|
|
Hi,
I get error
"Couldn't get process information from remote machine" when i try to run Process.GetProcesses().I understand that this is because i dont have administration rights.How can i solve this problem.Is there a way where in i can give some permissions to the user to execute that part of code alone.
Hope to get replies soon.
Thanks
|
|
|
|
|
The user account running the code must have Admin rights to the remote machine in order to get it's Process list. There is no way around this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
When developing Word Add-in programs and I want to insert a file into my currently open file I normally do the following:
object nRef = Type.Missing;
doc.Bookmarks.Item(ref oEndOfDoc).Range.InsertFile("c:\\temp\\filetobeinserted.doc",ref nRef,ref nRef,ref nRef,ref nRef);
My question is how do I do this when I want to insert a password protected file into my open file? I know the password for the file so I can supply this programmatically (I'm not concerned with possible security issues associated with this approach).
Any help would be much appreciated.
|
|
|
|
|
Hai,
In my Application i need to give the chance to the change the Property to any controls (say textbox,datagrid etc.,) Is it Possible to show the Property Window in Runtime... Help Me.
|
|
|
|
|
No, the property window is just enumerating the properties of the control. You'd have to write your own window to do the same thing in your code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Right-Click the ToolBox --> Add/Remove Items --> Check PropertyGrid (namespace System.Windows.Forms) --> Press OK --> Drag it to your Form.
The PropertyGrid.SelectedObject property is the object who's properties will be shown. In designtime you can only select a Component, but it can be any object you wish if you specify it at runtime.
Hope this helps!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Really ? Wow. I did not know that...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Now you do!
When i'm testing a new control, i always make a toolwindow with a propertygrid, so i can set all the control-properties. I love the propertygrid...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
I wonder if anyone can help. I need to take data from a dataset/datatable in vb.net and do a word mail merge with it.
Obviously i have to CreateObject word application, and give it a document etc.
But then how do i do the actual mail merge. how do i put the data from my table into the fields in the mail merge document?
If you have some sample code i could look at or could explain it, i would be grateful
|
|
|
|
|
|
hi,
What does .net stand for? or What is the .net original name?
Thanks
|
|
|
|
|
Mark Anthony Sabado wrote:
What does .net stand for?
It's just a generic term for the Internet and distributed applications, e.g., mobile devices.
Mark Anthony Sabado wrote:
What is the .net original name?
It was originally called NGWS - "Next Generation Windows Services."
Kevin
|
|
|
|
|
hi
i have some experience in c++ and vc++
i want to migrate to .net
would u tell me which language should i learn first for .net??
ive heard that c# is the mother of .Net .so i should learn c# first or go directly to visual c++.net??
thx
|
|
|
|
|
whatever you want i think. if you most like C++, use C++.NET, otherwise, C#, VB.NET, etc will work the same way.
what only mathers is the framework. all these languages depend only on the framework (if they are well written) because they call only framework functions...
so, calling in C++ System::Console::WriteLine() or in VB/C# System.Console.WriteLine() would behave the Same I believe.
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I think you'll find it easier to learn C# first. Learn C++.NET (i.e., Managed C++ or C++/CLI) only if you have specific problems which require those languages, otherwise you'll just get confused.
Jesse Liberty's Programming C# is a good book for C++ developers who want to get up to speed quickly. However, one thing to be aware of is that his recently-released 4th edition covers C# version 2. The 3rd edition focuses on C# for .NET 1.1.
Otherwise just learn from online tutorials.
Kevin
|
|
|
|
|
hamidreza_buddy wrote:
ive heard that c# is the mother of .Net
LOL - that's great.
C# is definately easier to learn than C++.NET, and I'd recommend it. I use C# much more than MC++, and I'm a C++ MVP, so I know my C++ pretty well. I just find C# to be better, MC++ is a hack on the side of C++.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have an imagelist with a few pngs loaded into it set to the SmallImageList property of a ListView control.
Now all is well, the images are shown in the first column (details view), but when an item is selected the image disappears and the item becomes selected.
Does anybody know what the problem is?
Thanks in advance.
|
|
|
|
|
Hi,
I have a .NET app, which needs to load multiple WebBrowser controls at startup (MDI app, multiple instances of one wrapper form containing just a WebBrowser control).
The problem is, they take AGES to load, and i just cannot find a way of loading them asynchronously or in a multithreaded environment, as all the loading gets done in the object constructor, and I cannot pass objects between threads, so I cannot load in a seperate worker thread.
This produces a half-rendered application window during startup, as no paint messages are processed, which looks pretty naff. Can anyone help me please?
Mankeyrabbit
|
|
|
|
|
Hi. In my code I have a PrintDialog that allows the user to select a page range to print. I've been following the API documentation as well as articles/tutorials online but I still can't get it to work. Multiple copies print fine. Print to File works fine. Just the page range doesn't work.
I've tried manually setting the ToPage and FromPage members in the PrintDocument's PrinterSettings and DefaultPrinterSettings members as well as in the PrintDialog's PrinterSettings member. I've also set the MinimumPages and MaximumPages in each one with no success.
Here's my code (...well the latest version anyway). I really don't know what I'm doing wrong. Any help at solving my problem would be very appreciated.
Public PageCount As Integer
WithEvents Doc As New PrintDocument
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Diag As New PrintDialog
Diag.Document = Doc
Diag.AllowSomePages = True
Diag.PrinterSettings.MinimumPage = 1
Diag.PrinterSettings.MaximumPage = 3
Diag.PrinterSettings.FromPage = 1
Diag.PrinterSettings.ToPage = 3
If Diag.ShowDialog() = DialogResult.OK Then
PageCount = 1
Doc.Print()
End If
End Sub
Private Sub PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles Doc.PrintPage
'Dim f As New Font(FontFamily.GenericSerif, 18, FontStyle.Regular)
'e.Graphics.DrawString("Page #" & PageCount, f, Brushes.Black, 10, 10)
PageCount += 1
If PageCount <= 3 Then
e.HasMorePages = True
End If
End Sub
|
|
|
|
|
Nevermind. I've solved the problem.
|
|
|
|
|
How do i parse the url or the type of resources requested by a client in mshtml programming ?? I got problem while downloading html page, it did not work. At last i could come to know it was a word file .
love2code
|
|
|
|
|
hi!
i wanted to create an instance of a web service using the Assembly.CreateInstance("FullPath") method.
but it doesnt create the instance. but if i use this same line of code for the other class that i have in my project then it works fine but its not working in case of a web service. i think i am giving the correct namespace but i dont know why it isnt working...
the example code goes like this.
e.g i am using google service then the name space of the proxy class created is:
CommManager.Google
so i use this:
Assembly asm = Assembly.GetExecutingAssembly();
object serviceToCall = null;
serviceToCall = asm.CreateInstance("CommManager.Google.GoogleSearchService", true);
where GoogleSearchService is class whose instance i want to create.
but this line of code returns null.
Help is really appreciated!!!!
KZ
|
|
|
|