|
You don't need to use new with value types
only two letters away from being an asset
|
|
|
|
|
Hi,
I know that we don't use new on value types, but if we try to use that in actual editor, then it doesn't throw any error either. Then what exactly happens when we type in int Counter = new int();
Pls guide me.
Omkar Ghaisas
|
|
|
|
|
Please reade .Net FrameWork CareFully.
|
|
|
|
|
Mark Nischalke wrote: You don't need to use new with value types
How do you create a Point without new ? Point is a value type.
|
|
|
|
|
You're correct. I meant in the case he had; int somevalue = 0; would do, no need for new.
only two letters away from being an asset
|
|
|
|
|
|
I have just got the requirements to develop a project using .NET and c# codings. I have a good knowledge on database and UI. But i'm not able to understand the codes of C# very well... Can anyone tell me how to add C# files to ASP.NET, how to use methods and classes written in c# along with the business layer of ASP.NET.
|
|
|
|
|
HI
C# is a language. If you are using ASP.net then it can be done in many languages C# is one of them .............
Its very easy if you know C++ or java try to do some tutorials on C# and Google rest of the things Best Luck
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
priychai wrote: Can anyone tell me how to add C# files to ASP.NET, how to use methods and classes written in c# along with the business layer of ASP.NET.
You might want to read some tutorials on the subject. That's an awful lot to answer in a forum post.
Incidentally, ASP.NET sits on the presentation layer. You would be writing the business layer.
|
|
|
|
|
Hi,
Can I render text using postscript font directly.?
Without using any other third party tool or dll.
I am trying to render text on the form using postscript font ,but yet not able to do it.
If anyone of you can give me suggestion in this ,it would be great help.
Eagerly waiting for response.
Thanks in advance.
|
|
|
|
|
I have a class MyDataGrid which is inherited from Datagrid
which have two protected override functions.
i want to register the events.
for example
public class MyDataGrid : DataGrid
{
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
{
//dosomething
}
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
//dosomething
}
Now i want to register these events
i m registering as
this.dataGrid1.MouseDown+=new System.Windows.Forms.MouseEventHandler(this.OnMouseDown);
this.dataGrid1.MouseMove+=new System.Windows.Forms.MouseEventHandler(this.OnMouseMove);
error is
Method 'System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs)' does not match delegate 'void System.Windows.Forms.MouseEventHandler(object, System.Windows.Forms.MouseEventArgs)'
Method 'System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs)' does not match delegate 'void System.Windows.Forms.MouseEventHandler(object, System.Windows.Forms.MouseEventArgs)'
can anybody tell me waht's the solution?
i m coding in C# Windows application ,version 1.1(2003)
|
|
|
|
|
Hello,
bhavna816 wrote: Now i want to register these events
i m registering as
this.dataGrid1.MouseDown+=new System.Windows.Forms.MouseEventHandler(this.OnMouseDown);
this.dataGrid1.MouseMove+=new System.Windows.Forms.MouseEventHandler(this.OnMouseMove);
Where?
Hope not in the derived class!
You should also call the base methods inside the overriden methods!
All the best,
Martin
|
|
|
|
|
if u can see the second URL
the code is
public class MyDataGrid : DataGrid
{
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
{
// Get info to determine which cell to inspect.
DataGrid.HitTestInfo hti = this.HitTest(new Point(e.X, e.Y));
if(hti.Type == DataGrid.HitTestType.ColumnResize)
{
return; //no baseclass call
}
base.OnMouseMove(e);
}
|
|
|
|
|
Ok,
But that's not the real point.
Where are you doing
MouseDown+=.....
MouseMove+=.....
And how does the method look like which is linked?
All the best,
Martin
|
|
|
|
|
funtion definition should be same when ever you override any function.
number of arguments are different. it should be like
protected override void OnMouseDown(object sender,System.Windows.Forms.MouseEventArgs e) <br />
{ <br />
}
|
|
|
|
|
I have tried this also.I got error
'DTable.MyDataGrid.OnMouseMove(object, System.Windows.Forms.MouseEventArgs)': no suitable method found to override
'DTable.MyDataGrid.OnMouseDown(object, System.Windows.Forms.MouseEventArgs)': no suitable method found to override
|
|
|
|
|
do one thing see the definition of default MouseMove event then try your self
|
|
|
|
|
Hi,
there are basically two ways to set an event handler:
1) create a handler, name it whatever you want, and give it an argument list
consisting of an "object sender", and a "SomeEventArgs e".
AND add it to the event using "SomeEvent+=new SomeEventHandler(yourHandlersName);"
This way is always available.
2) If you are creating a derived class, and the base class already has a method
OnEvent(SomeEventArgs e), you can override it with yours in your derived class.
You must use the name as is, and must provide only one argument. And the event
wiring has already been taken care of in the base class.
Normally your OnEvent(e) method should also call base.OnEvent(e)
Now choose either one of these methods, but dont try to combine them for a single
event !
|
|
|
|
|
How to keep ftp long time connection use c# 2.0-- FtpWebRequest!
I don't know how to deal with it !
can you help me !
Thanks much.......!
give me an chance ,wo will work better.
|
|
|
|
|
Can someone please give a good explanation of why XMLDataSource control is only available in Visual Studio 2005 as part of ASP.NET and not for Windows Forms?
Thanks
|
|
|
|
|
I want to set the width of the column by hardcoding it and don't want to allow it to resize at runtime.
i.e. don't allow user to resize the column width.
How can i do this?
I have tried this code
public void SetColWidth(DataGridTableStyle ts1,int colNum,int width)
// {
// try
// {
// ts1.GridColumnStyles[colNum].Width = width;
//
// ts1.DataGrid.Refresh();
// }
// catch{}
//
// }
private void button1_Click(object sender, System.EventArgs e)
{
// DataGridTableStyle ts1 = dataGrid1.TableStyles["dtTest"];
//
// SetColWidth(ts1, 1,10);
}
but its not working !Can anybody have any idea!
I have to do this in:
language-C# Windows application
version-.net 1.1 or 2003
|
|
|
|
|
Hi Bhavana,
It is very simple.
Right click the data grid. go to properties.
Go to the last selection criteria --->Misc-> Columns.
you must have added your columns and column headers over here.
If not then you can add them over here.
For every column, for resizable criteria choose false. It is true by default.
I hope it works
Keshav Kamat
India
|
|
|
|
|
i m not getting u !
I m not able to see
Go to the last selection criteria --->Misc-> Columns.
Can u please explain me in bit detail?
Please remember mine is VS.NET1.1
C# Windows application
|
|
|
|
|
Well, I am working on 2005 version.
Still, try to choose the property of the data grid which allows you to add columns.
There should be a property called as columns, where you can add the collections.
If you find it, then for every column that you add, you can set resizable to false.
Please see if you can do it.
Keshav Kamat
India
|
|
|
|
|
that's the problem !
there is no such property !
we have to code this and i have tried
http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q792q
and
<a http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q872q
but its not working
|
|
|
|