nightchaser's Q&A profile
Visual C# DateTime.ToShortDateToSting()
protected DateTime _CreatedOn = Convert .ToDateTime( DateTime .Now.ToShortDateString()); I thought this method return the date in this format 10/12/2005 but mine is giving me the time too....I just want the date and thats all...is there something wrong with how I am doing this _Vendor.CreatedOn = Convert .ToDateTime(lblCreatedOnValue.Text.ToString( "MM/dd/yyyy" ) I get this error when doing it this way The best overloaded method match for 'string.ToString(System.IFormatProvider)' has some invalid arguments cannot convert from 'string' to 'System.IFormatProvider' ...Show All
Visual C# C# Interop causing memory leak
I'm having a very strange issue with an inter-op between my C# application and an unmanaged DLL written in C++. The problem is that I have a memory leak on the C# application. I'm mostly a C++ programmer so I'm having great difficulty debugging it. Commenting out all calls to my unmanaged DLL will remove the memory leak error however, so I'm sure it has something to do with the inter-op. I tried to create a separate unmanaged C++ application that loads the exact same DLL, and to my surprise the new unmanaged C++ application does NOT have a memory leak. I repeat, this is verified to be using the exact same DLL. So my real dilemma is that I have a memory leak in C# that I can't reproduce in C++. I know, funny isn't it There are a few techni ...Show All
.NET Development Compression of SOAP message in web service
I'm trying to get the SOAP messages from my web service compressed to reduce the data size when send to the client. Most examples I found are using external GZip libraries, but of course from .NET 2 it is possible to use GZipStream. This is what I have so far: [ AttributeUsage ( AttributeTargets .Method)] public class CompressionSoapExtensionAttribute : SoapExtensionAttribute { private int priority; public override Type ExtensionType { get { return typeof ( CompressionSoapExtension ); } } public override int Priority { get { return priority; } set { priority = value ; } } } public class CompressionSoapExtension : SoapExtension { Stream oldStream; Stream newStream; ...Show All
Audio and Video Development Starting Focus Stuck
I set my top button to focused()=true on startup - the intention is to have one button start with focus. However in the iHDSim, I cannot nav away from this button. If I do not set focused(), then no buttons have focus, however I can click on one and then get proper navigation. Just set state:focused="true" on that button in markup. If you must do it through script, then might I suggest you revist my blog post :-) http://blogs.msdn.com/ptorr/archive/2006/09/08/746678.aspx ...Show All
Game Technologies: DirectX, XNA, XACT, etc. developed 3dmax integrated with direct x
please something can explain me how i can developed 3dmax integrated with direct x 3d max alreay uses DirectX to display its objects, you have the choice of OpenGL or DirectX at setup. If this is not what you ment, please post some more details on what you are trying to do. ...Show All
Smart Device Development Form inheritance
I have to have form2 inheriting all the methods and variable in form1. but I don't want to have the graphical stuff from form1. how to by pass that because when i specify form2 inherit from form1 and run the program, it shows on the graphical components of form1 on form2. I want to access un button properties on form2 from form1. like changing the button text. I set the visibility to public and still can't see it. I didn't do any inheritance at this point yet. ...Show All
Visual Basic possible to automate ms word if Ms word is not installed?
Is it possible to automate a Ms word file using vb.net while there is no Ms Word installed on tat pc The interop assemblies are basically wrappers around the com methods from the actual product install. That is one of the issues with the PIA's in that you have to code against the same version that the end user has installed. If you write your application against the Word 2003 PIA, but the user only has Word 2000, it may not work. The client does need to have Word (and be licensed). Jim Wooley http://devauthority.com/blogs/jwooley/default.aspx ...Show All
Software Development for Windows Vista CreateProcess does not return a value
Hi, I encountered a weird phenomenon while trying to run a program on Vista. When the program reach CreateProcess, the function is being called but it doesn’t return any value, the program never exits this function. To make this problem weirder, sometimes, although very rarely, like after reinstallation of the OS, the application does work (The process is created and the function returns a value), I couldn’t find the reason why something it does work. As far as I know, CreateProcess should always return a value (Success or Failure), but in this case it doesn't return anything, just stuck inside the function. The Windows version is: Windows Vista RC2 Build 5744. The program which calls CreateProcess is wr ...Show All
Visual Studio Express Editions How To Resize Picture Box at Runtime
Anybody here can help me on how to resize the picturebox at runtime Thanks I want to use the mouse to resize the picture box, that when I hover on the side of the pi cturebox the bounding will appear like on the IDE Thanks;) ...Show All
Windows Forms Start application in system tray
I am writing an application which I want to run in the system tray. Everything is set so that when it open it puts an icon in the system tray, and if I minimize it, it will also go to the system tray. The problem I am having is having it so that when it opens the form shows, however I want it to be hidden until the user selects it from the system tray. So basically, how do I start the applicatin in hidden mode. Hope this is clear. Thanks, Russ Ok, you may want to experiment with around with other messages I got this one to fire on the initial load. private void Form1_LocationChanged( object sender, EventArgs e ) { if ( this .WindowState == FormWindowState.Minimized) this .Hide(); } ...Show All
SQL Server Problem notifying operator SS2005
Hi there! I expercience some problems in sending the alert mails to the operator when an Agent Failure Alert happens. I have setup MSSQL 2005 with merge replication and have setup mail the ss2005 way. I also can send test mails via the Database mail context menu. I have setup a operator with a valid emailadress and enabled is checked On the notifications page 'Agent Failure Alert' is checked. When this alert fires the number of occurences in the history of this alert is incremented (as I can see via the alertsection-Agentfailure-history) this alert is also enabled. The problem is that the operator does not get notified! So I can send test email from the DB, have setup an Operator with emailadress, have enabled an alert and s ...Show All
SQL Server Opening View does not reflect SQL statement
I am having trouble with a VIEW. I modify the view to add a sort criteria. I can Execute the SQL and get the results I am looking for. I save the VIEW. Then if I open the VIEW using the OPEN VIEW menu option(right clicking the VIEW name) the sort order I set does not work. Please help. Using Microsoft SQL Server Management Studio Express to access the SQL Server 2005 Hi Jens, Sorry to say u that ur post was not helpfull, still same problem on using SELECT TOP 100 PERCENT I have found one link where it was written if we use SELECT TOP (100) PERCENT it will work, actually it worked but only for NUMBER and DATE. Why not for STRING(varchar). I am working at tokyo and my database has japanes ...Show All
Game Technologies: DirectX, XNA, XACT, etc. GameComponent Designer Kludginess
Unless I'm missing something, I don't see how to explicitly control the order in which components are updated/drawn except for the order in which I drop them (you have to render the HUD last for example). Maybe I'm misunderstanding the intent of the GameComponent concept, but in a larger project this is going to be hard (kludgy) to deal with. Suggestion (unless I missed something): Add an order property to the GameComponent class, a collections box somewhere so that the order can be specified, and then sort at startup. You could possibly work around it, by in your constructor, after InitializeComponent, sorting the list If you derive all your components from a new base that has a Priority field or something, it should work quite well ...Show All
Visual Studio 2008 (Pre-release) ADO.Net and databinding to a listbox
If I databind an ado.net datatable to a listbox, the content of every listboxitem is a DataRowView, which is fine I guess. But what's the easiest solution to find the matching ListBoxItem if I have a normal typed datarow I wanted to use the ListBox's ItemContainerGenerator.ContainerFromItem(), but this doesn't work as the listboxitems' content aren't the datarows but instead datarowviews. Right now since I haven't found any other solution, I have to iterate through the whole list of listboxitems and compare the datarowview.Row to my typed datarow, which really doesn't seem like a good solution. Suggestions Josh Smith wrote: Ted, You can use ItemContainerGenerator.ContainerFromI ...Show All
Silverlight (formerly WPF/E) WPF/E vs. XBap
Hello Community! I was recently trying to evaluate why there is seemingly two ways to write web-based applications with WPF. Am I way off Can anyone explain to me when I would use an XBap over a straight up WPF/E application Thanks, Alan Actally I'm not sure what the issue is here... if I can get to javascript I can use any number of tools to get to the c# code behind page for server-side coding (e.g. AjaxPro et al)... combining WFP/E and C# is a piece of cake ...Show All
