|
it was really valuable indeed. thanks is a small word for that.
regards
|
|
|
|
|
What is required for Black-n-White Invert before printing ( or previewing) any picture?
How to do it programatically?
please guide.
|
|
|
|
|
|
Hello Mr Mark
Thanks for the help, but what i am up to is , to change only balck to white or white to balck, rest of the colour should remain as it is. where as the referred link's sample changes other color too.
regards
|
|
|
|
|
Just wondering how to hide a property of an interface in a sub-class?
For example in .net framework,
OracleCommand implements IDbCommand, but OracleCommand doesn't have the CommandTimeout property where IDbCommand has.
IDbCommand has<br />
int CommandTimeout {get; set;}<br />
<br />
<br />
public class OracleCommand : IDbCommand<br />
try using OracleCommand.CommandTimeout gives an compile error.
How???
|
|
|
|
|
You must cast OracleCommand to IDbCommand.
Hide interface property you can do in this way
public class MyCommand : IDbCommand
{
...
int IDbCommand.CommandTimeout
{
get
{
...
}
set
{
....
}
}
}
vlado
|
|
|
|
|
Server Error in '/log_on' Application.<br />
--------------------------------------------------------------------------------<br />
<br />
Syntax error: Missing operand after '@yuy' operator. <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing operand after '@yuy' operator.<br />
<br />
Source Error: <br />
<br />
<br />
Line 89:
Line 90: <br />
Line 91: DataRow[] matches = users.Select(cmd);<br />
Line 92: <br />
Line 93: <br />
<br />
<br />
Source File: c:\inetpub\wwwroot\log_on\logon.aspx.cs Line: 91 <br />
<br />
Stack Trace: <br />
<br />
<br />
[SyntaxErrorException: Syntax error: Missing operand after '@yuy' operator.]<br />
System.Data.ExpressionParser.Parse() +2753<br />
System.Data.DataExpression..ctor(String expression, DataTable table, Type type) +149<br />
System.Data.Select..ctor(DataTable table, String filterExpression, String sort, DataViewRowState recordStates) +76<br />
System.Data.DataTable.Select(String filterExpression) +37<br />
log_on.Logon.btnLogon_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\log_on\logon.aspx.cs:91<br />
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108<br />
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57<br />
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18<br />
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33<br />
System.Web.UI.Page.ProcessRequestMain() +1277<br />
<br />
<br />
<br />
<br />
--------------------------------------------------------------------------------<br />
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
I've ravaged through MSDN and the KB articles and I am still not sure what is the problem here. cmd is a string for a validated and well formed email address.
Thanks for any suggestions or help.
Best,
Jerry
Contrary to the cliche, genuinely nice guys most often finish first or very near it.--Malcolm Forbes Toasty0.com
|
|
|
|
|
|
private void btnLogon_Click(object sender, System.EventArgs e)<br />
{<br />
<br />
if (!Page.IsValid)<br />
{<br />
lblMsg.Text="Some required fields are invalid.";<br />
return;<br />
}<br />
else<br />
{<br />
string cmd=txtBoxEmail.Text;<br />
<br />
<br />
DataSet ds= new DataSet();<br />
<br />
<br />
FileStream fs= new FileStream(Server.MapPath("Users.xml"),FileMode.Open,FileAccess.Read);<br />
StreamReader reader= new StreamReader(fs);<br />
ds.ReadXml(reader);<br />
fs.Close();<br />
<br />
<br />
DataTable users= ds.Tables[0];<br />
<br />
<br />
DataRow[] matches= users.Select(cmd);
Thanks for looking at this.
Best,
Jerry
Contrary to the cliche, genuinely nice guys most often finish first or very near it.--Malcolm Forbes Toasty0.com
|
|
|
|
|
The '@' character might be causing you problems:
From the SQL Server Books Online:
SELECT @local_variable
Specifies that the given local variable (created using DECLARE @local_variable) should be set to the specified expression.
It is recommended that SET @local_variable be used for variable assignment rather than SELECT @local_variable. For more information, see SET @local_variable.
Syntax
SELECT { @local_variable = expression } [ ,...n ]
Arguments
@local_variable
Is a declared variable for which a value is to be assigned.
Marc
MyXaml
Advanced Unit Testing
|
|
|
|
|
Would this also apply to a XML data file?
Best,
Jerry
Contrary to the cliche, genuinely nice guys most often finish first or very near it.--Malcolm Forbes Toasty0.com
|
|
|
|
|
Toasty0 wrote:
Would this also apply to a XML data file?
Oops. Somewhere I got the idea that this was an SQL statement.
Marc
MyXaml
Advanced Unit Testing
|
|
|
|
|
Hi,
My application contains a Panel which in turn contains some more panels, that are added and removed at runtime. I draw some lines and strings also at runtime. Usually there will be many controls that do not fit into the visible area of the parent panel. So, I would like to implement zoom in and zoom out in that panel ( as we do in Flash pages ).
To best of my knowledge, normally zooming is implemented on images. How to implement on objects like panels ??
Thanks.
Cheers
CNU
|
|
|
|
|
AFAIK, the hard way--you have to do code all the functionality. There's no built in API stuff to do that.
Marc
MyXaml
Advanced Unit Testing
|
|
|
|
|
I am not going to try to take credit here, and will just link to the article.
I thought it was funny how the Standard Edition would not let me make a windows controls library project, but it is fully possible in SharpDevelop using just the SDK compiler.
I did some googling, and this article came up.
http://www.devcity.net/net/article.aspx?alias=vbnet_se_dll
A great find, and I can finally make Dll user control libraries in the standard edition as well.
PS! although the article is for VB, I have testet it with C# myself, and it works great.
Enjoy!
HalfAsleep
|
|
|
|
|
You can make a Windows control library - there's just to project for it (a template of files and settings). Just start a regular class library and add a class that derives from a control. There's no difference other than the base classes from which your classes derive.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Ah, nice to get that confirmed. I was a bit miffed that the standard version did not have that project template.
If a normal class library template will do, and everything will work as long as you have classes that inherit from controls, that is good news indeed.
Thanks a bunch!!!
By the way, is there any way of adding your own project templates in the "new project" dialogue?
HalfAsleep
|
|
|
|
|
Explore your Visual C# installation directory. The default is C:\Program Files\Microsoft Visual Studio .NET 2003\VC#. There's several directories involved and it's really not too difficult to figure out, but I believe you might find some articles here on CodeProject and elsewhere on the 'net if you try a search.
There is one tutorial in the Visual Studio .NET Product Documentation, but it's targetted at the Enterprise Architect edition which include a project for making projects (it's fairly close to what you need, though).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Anyone know anything about reading the game port in C# ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Man, Chris, you write so much interop code and unsafe code (remembering your previous articles about graphic manipulation), you should just use C/C++, or at least switch to MC++!
Have you looked into Managed DirectX at all at http://msdn.microsoft.com/directx[^]. Much of this is encapsulated in a nice object-oriented fashion (and the Managed DirectX libraries are written from the ground-up, not simply interop libraries or 1-to-1 mappings of managed code like some libraries).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Heath Stewart wrote:
or at least switch to MC++!
*grin* I hate the idea of MC++, as far as I am concerned, it's useful only for porting code to .NET. Otherwise, I may as well use the language that was written for .NET. Plus, C# is actually full of some really cool stuff.
Heath Stewart wrote:
Have you looked into Managed DirectX at all at http://msdn.microsoft.com/directx[^]. Much of this is encapsulated in a nice object-oriented fashion (and the Managed DirectX libraries are written from the ground-up, not simply interop libraries or 1-to-1 mappings of managed code like some libraries).
Yes, I am using it. The AudioVideoPlayback namespace is an utter disaster. It occured to me after posting though that it would probably be the way to go for the joystick, DirectInput and all. I just need to make sure we wire our device the same as a joystick, so I get the right messages
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
If you don't want to use DirectX you could also interop the joy* Win32 functions.
There are just a few and they're really easy to use. Basically you call joySetCapture and then start receiving MM_JOY1MOVE , MM_JOY1BUTTONDOWN and the other joystick messages in your overridden WndProc .
The only disadvantage is that WindowsXP messed up the joySetCapture /joyReleaseCapture functions. Trying to open a Joystick a second time in your application (after releasing it first, of course) fails with some obscure error, but only with WindowsXP.
Hope this helped,
mav
|
|
|
|
|
Couple of questions about ListView:
Is there a way to make column headers invisible?
Is there a way to increase the padding between rows?
I have long text inside of some cells. How do I make the text wrap around and the cell height grow to make all the text visible? (instead of having the text all in one line and having to resize the column to read all of it.)
Thanks,
Elena
|
|
|
|
|
The first is simple: set ListView.HeaderStyle to ColumnHeaderStyle.None .
For the latter, I urge you to search CodeProject for "ListView" or something simple and browse the results. There have been several articles detailing this. It's not an easy thing to handle, since you have to go back to handling windows messages, declaring structs, and interoperating with unmanaged code using P/Invoke for functions like SendMessage .
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Is there any way to access and delete cookies obtained by the Microsoft Web Browser Control?
|
|
|
|