|
hi all ,
I store a data in sql with sqlmoney type but when i try to divid sqlmoney value it give me error that it cant apply this operans with sqlmoney
SqlMoney salary;
salary/2;
please help
hay
|
|
|
|
|
The second operand has to be a SqlMoney structure too. Take a look at the documentation for more information regarding division of SqlMoney.
www.troschuetz.de
|
|
|
|
|
Ok, i'm trying the DirectX.Capture Class Library and it itsn't working.
i have a problem here because hr=1 after this
hr = enumDev.CreateClassEnumerator( ref category, out enumMon, 0 );
so it doesn't enter this "if"
if( hr != 0 )
throw new NotSupportedException( "No devices of the category" );
can anybody tell me what this means
Thanks,
|
|
|
|
|
Hi.
I want to know if there is any material availbale in the internet regarding soap extensions. I have a project where i have to construct the soap message by myself. so it would be very useful for me, if somebody can guide me to that.
Thanks
|
|
|
|
|
All,
I'm new to C#, coming from a C++ background. Is it possible to have a single namespace span multiple files and if so how?
Thanks,
Bill Weiss
|
|
|
|
|
Yes, it is.
File 1 (MyClass1.cs):
namespace MyNamespace
{
class MyClass1
{
}
}
File 2 (MyClass2.cs):
namespace MyNamespace
{
class MyClass2
{
}
}
www.troschuetz.de
|
|
|
|
|
Hi, guys and girls
How can I change the font of text displayed in a MessageBox?
Thanks
vigorous
|
|
|
|
|
AFAIK you cannot.
But it should be pretty simple to write your own MessageBox, which provides this feature.
www.troschuetz.de
|
|
|
|
|
Like Stephen said, you can't change the font in a message box put by the function call. You'll have to write your own MessageBox class, just a Form really, and format it the way you like.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello,am a new user to .NET. when i use a datetimepicker ( format set to short), along with some more controls in a form, the first time i executed the project, Iam able to get the focus in the Datetimepicker control(by pressing tab).
But if u select a new value in the control and use tab again am not getting the focus in datetime control. IS THIS A PATCH IN DATETIME CONTROL?
But when u click on it , the mousedown event makes the selection. so, iam thinking of invoking the mousedown evnet in the Enter Event(when the control is active by pressing tab). But not sure how to do it. or is there any other way of achiveing this?
Please help me at the earliest. Much Thanks.
Regards,Manivannan.P
|
|
|
|
|
Does anyone know of a custom listbox that supports multiline and multicolumn with headers? An example of what I'm thinking of
1 Error request Priority: High
user complaining of
2 Error request2 Priority: High
bad data and other
Column1: Numbers
column2: Error request header with multiple lines underneath different font.
Column3: Additional info
So on and so on. I saw something like this. I have searched everyday for a custom listbox or maybe even a treeview with multiline listview like this. I am out of ideas on what other words I could google for. If anyone has encountred any custom control like this, please reply.
|
|
|
|
|
Try the ListView control, setting the View property to Details. Then just use the Columns collection property to create all the fields u need.
|
|
|
|
|
|
hi forum,
I want to integrate an old C application with a C# library (dll). I know there are various alternatives but i have choosen the "managed C++ extensions" way.
What i do is to modify the compiler options by adding the /clr option and to recompile the old C application... but the compilation returns this error:
Command line error D2016 : '/YXstdafx.h' and '/clr' command-line options are incompatible
do u know what is the problem and its solution?
I am using Visual Studio .NET 2002 (.NET Framework 1.0)
Thanks in advance!
Sergio.
|
|
|
|
|
hi,
I have solved the problem by setting the "Not Using Precompiled Headers" option, but now i have got another problem: I dont know how to use the imported C# dll.
What i do is to copy the c# dll in the "debug" folder. Then, I set the path of the "debug" folder in the "resolve #using reference" project property and finally, I import in the C++ program the C# dll by using the #using directive:
#usign "MyDLL.dll"
But now, how can I create an object contained in the DLL?
Thanks a lot!!
Sergio.
|
|
|
|
|
Your question belongs in the C++ Forum, not C#. If your trying to use the C# .DLL in Mnaged C++, it's a question for the Managed C++ Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, guys, I want to export my data into some standard file format, eg. excel and word. How can I do that?
Thanks a lot
vigorous
|
|
|
|
|
If anyone could help I posted this last week. I am having a problem and getting the following error on this piece of code:
A namespace does not directly contain members such as fields or methods.
I placed the web generated code inside the brace and it got rid of that error but i now got another one
Class FriendsReunion Default already defines a member called InitialiseComponent() with the same parmater types.
I do have other pages with .cs code holding initialisecomponent() however the other pages work fine. I did try adding numbers to it (initialisecomponent2()) but it still gave me the error above, with the respective number ofcourse.
I have added the code below and would be grateful if anyone could point me in the right direction.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
//I removed using System.Drawing from here
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace FriendsReunion
{
public class _Default : System.Web.UI.Page
{
protected FriendsReunion.SubHeader ccSubHeader;
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
private void Page_Load(object sender, System.EventArgs e)
{
Table tb = new Table();
TableRow row;
TableCell cell;
Image img;
Hyperlink lnk;
if (Context.User.Identity.IsAuthenticated)
{
//Create a new blank table row
row = new TableRow();
//Set up the News image
img = new Image();
img.ImageUrl = "Images/globe.gif";
img.ImageAlign = ImageAlign.Middle;
img.Width = new Unit(24, UnitType.Pixel);
img.Height = new Unit(24,UnitType.Pixel);
//Create a cell and add the image
cell = new TableCell();
cell.Controls.Add(img);
//Add the new cell to the row
row.Cells.Add(cell);
//Set up the News link
lnk = new HyperLink();
lnk.Text = "News";
lnk.NavigateUrl = "News.aspx";
//Create the cell and the add link
cell = new TableCell();
cell.Controls.Add(lnk);
//Add the new cell to the row
row.Cells.Add(cell);
//Add the row to the table
tb.Rows.Add(row);
}
else
{
//code for authenticated users here...
}
//Finally, add the table to the placeholder
phNav.Controls.Add(tb);
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler (this.Page_Load);
}
#endregion
}
}
|
|
|
|
|
And this question was answered twice then with the correct answer
You have mistakenly deleted a } brace and VS.NET has re-indented all your code wrong. (A lovely feature of VS.NET)
Look very carefully at your opening and closing braces ( {'s & }'s ) and you will see there is an uneven number of opens/closes.
|
|
|
|
|
Hi guys,
Here i am having one image on one scanned page that is already skewed at any angle so i want to rotate that skewed image so after rotating that image it fixed up to Left TOP part of the page.(0,0).
so i had find out the rotation angle and i am rotating it from the left,top corner of that skewed image(i.e. point).so now i want to find out the six co-ordinate(left,top),(top,right),(bottom,left) of the image after rotation from which i can get that how is now the position of my image.so now how to get that co-ordinate?
Here i am using GDI+ class. and matrix.rotateat method.
Here is some sort of code.
Matrix M = new Matrix();
Point p = new Point((int)x0posext,(int) y0posext);
M.RotateAt((float)AngleThetaDegree, p);
regards.,
montu3377
montu3377
|
|
|
|
|
If anyone could help I posted this last week. I am having a problem and getting the following error on this piece of code:
A namespace does not directly contain members such as fields or methods.
The problem occurs with the web generated code at the bottom of this thread. I have tried to move it inside the last brace as below but I am still getting the errors. Many thanks.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
//I removed using System.Drawing from here
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace FriendsReunion
{
public class _Default : System.Web.UI.Page
{
protected FriendsReunion.SubHeader ccSubHeader;
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
private void Page_Load(object sender, System.EventArgs e)
{
Table tb = new Table();
TableRow row;
TableCell cell;
Image img;
Hyperlink lnk;
if (Context.User.Identity.IsAuthenticated)
{
//Create a new blank table row
row = new TableRow();
//Set up the News image
img = new Image();
img.ImageUrl = "Images/globe.gif";
img.ImageAlign = ImageAlign.Middle;
img.Width = new Unit(24, UnitType.Pixel);
img.Height = new Unit(24,UnitType.Pixel);
//Create a cell and add the image
cell = new TableCell();
cell.Controls.Add(img);
//Add the new cell to the row
row.Cells.Add(cell);
//Set up the News link
lnk = new HyperLink();
lnk.Text = "News";
lnk.NavigateUrl = "News.aspx";
//Create the cell and the add link
cell = new TableCell();
cell.Controls.Add(lnk);
//Add the new cell to the row
row.Cells.Add(cell);
//Add the row to the table
tb.Rows.Add(row);
}
else
{
//code for authenticated users here...
}
//Finally, add the table to the placeholder
phNav.Controls.Add(tb);
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
|
|
|
|
|
You declare the OnInit and InitializeComponent methods directly inside of a namespace, which is not allowed, as the Compiler message states.
So move the "Web Form Designer generated code" region up past the next brace, so both methods are defined inside the _Default class.
www.troschuetz.de
|
|
|
|
|
Hello from a confused programmer...
I'm having a problem with a custom control of mine.
I have created a UserControl which inherits from System.Windows.Forms.Label.
I have added an custom object property to the control which contains an integer, and I have added a normal integer property to the control.
In the property editor the normal integers current value gets saved when I close the solution, but the current value on the integer on my custom object does not.
Why is that? Do I need to do something special on my custom object - i.e. inherit an interface, use some special attribute.
I can't seem to find anything on the subject.
yours truly
Spif2001
|
|
|
|
|
I've added toolbar to application, added buttons, imageindex, icons to image index (48×48 8bpp) and set ImageIndex property of ToolBarButtons. In the begining it all worked fine. But when I enable visual styles in application icons don't show up on buttons.
When I add another toolbar with buttons and everything and dock it somewhere both toolbars show normal, how they should.
I can't find anywhere answer to this problem so if anyone knows how to fix this please help.
|
|
|
|
|
Does anyone know of a way that I could take an algebraic expression and evaluate it? for example, lets say i had the equation I=Prt (simple interest), and had values for I, r, and t, and wanted to solve for P. Is there anyway this could be done or do i need to write 4 seperate equations and pick the approprite one (if solving for P use I/rt, or if solving for t use I/Pr)
|
|
|
|