|
This seems to be a common question again. If you developed your application using C#, VB.NET or Managed C++, you need the .NET Framework. You can't just redistribute parts of it - you need the whole 20MB package. Download the redistributable here[^]. Windows Server 2003 includes .NET Framework 1.1.
I don't think this download currently contains Service Pack 1. It's advised that you apply this service pack. Download here[^] (or here[^] for Windows Server 2003).
If you want to install the .NET Framework along with your application, see Microsoft's Setup Bootstrapper Sample[^].
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
|
Greetings, I have a datagrid in a parent form that created a child form when one of the cells in the parent form is double clicked, a dataset is then passed to the child form in the constructor. With that dataset, I'm creating a new datagrid. When I try to set the column width values or capture a MouseDown event, it seems as though the Child Form is ignoring all attempts and defining events and column width values. The same code works fine for the parent form; any thoughts?
--Mike
|
|
|
|
|
Normally this should function properly. Without any further details I dont think anyone can help you. If it isnt too much you should post the relevant parts of your code.
|
|
|
|
|
Okay, I call the new form passing it a dataset. In the new form, I call a method to initialie the datagrid; here is that code. The Alternating back color, the mousedown events, and the column width seem to be ignored. Seems like I'm missing something simple here:
The steps I'm taking in the constructor of the new form are:
public ClientActivity(DataSet ds)
{
//
// Required for Windows Form Designer support
//
this.gridMouseDownTime = DateTime.Now;
this.ds = ds;
this.WSID = WSID;
InitializeComponent();
InitializeDataGrid(ds,WSID);
//
// TODO: Add any constructor code after InitializeComponent call
//
}
private void InitializeDataGrid(DataSet ds)
{
try
{
//AddCustomDataStyle(ds);
dataGrid1.DataSource = ds.Tables[0];
dataGrid1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dataGrid_MouseDown);
int rowCount = ds.Tables[0].Rows.Count;
DataGridTableStyle tableStyle = new DataGridTableStyle();
tableStyle.MappingName = "ClientActivity";
tableStyle.AlternatingBackColor = System.Drawing.Color.Gold;
//tableStyle.BackColor = System.Drawing.Color.White;
tableStyle.GridLineStyle = System.Windows.Forms.DataGridLineStyle.Solid;
tableStyle.GridLineColor = Color.Red;
tableStyle.SelectionBackColor = System.Drawing.Color.Blue;
// tableStyle.SelectionForeColor = System.Drawing.Color.Blue;
int numCols = ds.Tables[0].Columns.Count;
DataGridTextBoxColumn aColumnTextColumn ;
for(int i = 0; i < numCols; ++i)
{
aColumnTextColumn = new DataGridTextBoxColumn();
aColumnTextColumn.HeaderText = ds.Tables[0].Columns[i].ColumnName;
aColumnTextColumn.MappingName = ds.Tables[0].Columns[i].ColumnName;
//add handler
//MessageBox.Show(ds.Tables[0].Columns[i].ColumnName);
aColumnTextColumn.TextBox.MouseDown += new MouseEventHandler(TextBoxMouseDownHandler);
aColumnTextColumn.TextBox.Width = 100;
aColumnTextColumn.TextBox.DoubleClick += new EventHandler(TextBoxDoubleClickHandler);
tableStyle.GridColumnStyles.Add(aColumnTextColumn);
}
label1.Text = label1.Text + " For " + WSID;
dataGrid1.TableStyles.Add(tableStyle);
}
catch (Exception e)
{
MessageBox.Show(e.StackTrace);
}
}
|
|
|
|
|
First of all:
Happy new year!
Now to your problem:
I think you are not setting the right mapping name for the tablestyle
Instead of
<br />
tableStyle.MappingName = "ClientActivity";<br />
you should write
<br />
tableStyle.MappingName = ds.Tables[0].TableName<br />
Explanation:
A Grid can show multiple DataTables (eg. when showing a dataset). Thus you can also add multiple TableStyles (foreach DataTable). The MappingName is used to identify to which DataTable the TableStyle is bound. When the DataGrid shows a DataTable and cannot find a TableStyle (like in this case) with the appropiate MappingName it shows it with automatically generated style settings.
|
|
|
|
|
Hello all!
As I understand, static object pointers are considered root of the application and for that reason they are never removed by the Garbage collector.
Is there any way to force the GC to remove those elements?
Thanks
|
|
|
|
|
That would sort of change the static nature of static objects, no? Alot of things would break if you could do what you're asking.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Not automatically. And this is very good as it would break the underlying paradigm.
You can set static members to null. The GC will then remove the underlying object from memory.
|
|
|
|
|
Iam working with an pocket pc application in .NET Compact framework and run it the emulator. I dont know where the EXE and other application files are stored in that emulator.
Sridhar
|
|
|
|
|
Can u please tell me where can i find the emulators ??? I also need them
|
|
|
|
|
If you install .NET 2003 you can get the emulator. it has an in build emulator.
sdaf
|
|
|
|
|
They will be stored this way(i assume the Emulator is english): \Program Files\[Project Name]\[App.exe]
Google: "Windows CE X.X emulator" to all the others looking for a emulator.
|
|
|
|
|
Hi,
What model/make of Pocket PC cum mobile phone would you recommend to buy for experimenting the .NET for devices as well as to use it as a mobile phone..
Please help
"He that is good with a hammer tends to think everything is a nail." - Abraham Maslow
|
|
|
|
|
i can defenatly recommend the NeoNode: www[dot]neonode[dot]com
There is also a "non-official" forum for this phone at: www[dot]redneo[dot]com
It is running Windows CE 5.0
You should know that this phone isn't fully developed yet, but the NeoNode team are releasing updates etc. very often.
|
|
|
|
|
Please, how should I read and display thousands items on ipaq and I dont want to encounter performance issue. Reading and displaying with the help of dataset and datagrid seems to be slow.
Thx
|
|
|
|
|
What do you mean with thousands? Even on a smart device a few thousand items should be no problem. If you have really many thousand (or million) items the DataGrid isnt probably the best choice for you (because it always holds the whole data - not only what is shown). Have a look at http://www.devage.com/SourceGrid/SourceGrid2_EN.html. There youll find a free grid with a virtual mode (which means that only the data which is displayed is hold in memory) which is also available for the compact framework.
For reading your data I cant give you any hints because that depends on how your data is stored (DB, XML, ..)
|
|
|
|
|
The .NET Framework 1.1 install fails when regsvcs.exe attempts to register System.EnterpriseServices.dll.
it will install on Windows NT with Pentium 3 processor, but not on Windows NT with Pentium 4 processor.
The necessary prerequisites are installed - ie SP6a and IE6 SP1.
thank you
|
|
|
|
|
|
Hi all, I am a little confused by the static function GetType(string) of Type.
if I pass in "System.Int32", it will return a type, but if I pass in "System.Windows.Forms.Button", it will return null, but if I pass in "System.Windows.Forms.Button, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
it works a again.
The document didn't mention I must supply a strong name. Is there anyway to make it work with name like "System.Windows.Forms.Button"?
Here is a small test code
static void Main(string[] args)
{
Test("System.Int32");
Test("Int32");
Test("System.Windows.Forms.Button");
Test(typeof(System.Windows.Forms.Button).AssemblyQualifiedName);
Test(typeof(System.Windows.Forms.Button).FullName);
}
static void Test(string s)
{
Console.WriteLine("typename : {0}",s);
Type t = Type.GetType(s);
if(t!=null)
{
Console.WriteLine("GetType succeeded");
Console.WriteLine("Fullname : {0}",t.FullName);
Console.WriteLine("AssemblyQualifiedName : {0}",t.AssemblyQualifiedName);
}
else
{
Console.WriteLine("GetType failed");
}
Console.WriteLine();
}
Thx!
|
|
|
|
|
I would have thought it also works with normal names. There is another way to get a type. If you already have the adequate assembly object you could use:
<br />
System.Reflecten.Assembly a = System.Reflecten.Assembly.GetAssembly(typeof(Label));<br />
Type t = a.GetType("System.Windows.Forms.Button");<br />
|
|
|
|
|
|
I get the following error when i run my test.exe
Any idea why I get this error
'JIT Debugging component registration is incorrect.
Please repair the installation of the most recent version of Visual Studio
.NET or Remote Debugging components.
Alternatively, execute the following command as an Administrator to
manually repair the JIT Debugging component registration: "C:\Program
Files\Common Files\Microsoft Shared\VS7Debug\vs7jit.exe" /RegServer.'
Thanks
Anu
|
|
|
|
|
I am creating an instance of class at runtime from assembly through reflection.I then Serialize the class(including the delegates) and send it to remote machine from where I deserialize the received bytes.I can get an Exception i.e. its not deserialized in short!
However when I perform this whole mechanism without including Delegates... it works and the result is exactly what i want.
Can somebody help me on this ?
Thanks in Advance!
|
|
|
|
|
Wll Im not exactly sure but here are my thoughts:
A delegate is some kind of pointer to a specific function. If your serialize an object with a delegate to anothers object function the reference to this object will be missing in the other context where you try to deserialize it.
The question is what you think how those delegates should behave on the remote location. Should invoking these delegates invoke functions on the original machine? If yes I think you are in trouble (I dont think that will work with the default remoting mechanisms in .NET). If they are not needed just mark them with the appropriate attribute (dont know the exact name) and their values will be left null.
|
|
|
|