ISIMike's Q&A profile
Windows Forms Problems with MonthCalendar
I have a MonthCalendar Control with CalendarDimension set to 3,1 so I get 3 months across. I set the SelectionRange to 4/13 so it will be 3 months, Prev, Current and Next. But this doesn't work. Where is the FirstMonth property so I can set it to month-1 it could be 0 if we don't care I hope somebody can tell me what events to use or methods. But I googleed for an answer and saw this question from several years ago and they never got an answer . There is no easy way to do this. I believe this may get you want you need: this .monthCalendar1.SetDate(DateTime.Now.AddMonths(-1)); this ...Show All
SQL Server How can i get the first day of the month and the last day of the month?
Is there a function that do id or i need to calculate it by myself Hi, there is no built in one, but you can use these ones here which is just wrote for you: CREATE FUNCTION FirstDayofMonth ( @InputDate DATETIME ) RETURNS DateTime AS BEGIN RETURN ( SELECT LEFT( CONVERT ( VARCHAR ( 10 ), @Inputdate , 112 ), 6 ) + '01' ) END GO SELECT dbo . FirstdayofMonth ( GETDATE ()) CREATE FUNCTION LastDayofMonth ( @InputDate DATETIME ) RETURNS DateTime AS BEGIN RETURN ( SELECT DATEADD ( dd ,- 1 , DATEADD ( mm ,+ 1 ,LEFT( ...Show All
Software Development for Windows Vista When does vista beta 2 come out?
not sure what day the public beta 2 of vista releases, anybody know the date I'm sorry, but your question does not relate to programming for Windows and is therefore off topic here. www.codeproject.com is an example of a programming site that has a general discussion area where this sort of question would be allowed. ...Show All
Visual C++ 64-bit -Data Type conversion problem
Hi, I have a code and build on VS2005. Set the properties Yes (/Wp64) in Detect 64-bit portabilty issue. How to resolve the following warning Following sample code are showing warning: 1. HFILE fileH=OpenFile( pFN, &of, OF_WRITE|OF_SHARE_DENY_NONE ); if ( fileH!=HFILE_ERROR ) { CloseHandle( (HANDLE) fileH ); } //Complier warning for above code when build on VS2005 and enable Yes (/Wp64) ..\Utility.cpp(871) : warning C4312: 'type cast' : conversion from 'HFILE' to 'HANDLE' of greater size 2. TBool LegacyPrinterExistsCallback2(TChar const * pFriendly, void * pParam1, void * pParam2, void * pParam3) { &nbs ...Show All
Windows Search Technologies Cannot install/re-install MS DeskTop Search
Cannot install/re-install MS DeskTop Search (nor toolbar): "cannot remove older version"; running XP Pro on Intel 865 motherboard with 1 gig of ram and 3Mhz Pentium 4. Error message "cannot remove older version" is response to running new download; nothing which looks remotely similar to desktop search shows up in {Remove Software} nor do I find any version of anything which looks like desktop search in \Programs\..., including complete invisibility of any of prior third-party (Google, Yahoo/X1, Copernic) desktop search utilities which I have previously installed and removed. What to do How to "remove older ve ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Problem migrating to Managed DX 2.0...
Well here is the deal. My app modifies an offscreen surface each frame and then updates a texture with that surface's data. Then that texture gets rendered on a quad that uses the whole screen with TransformedTextured Vertices. This all worked right with the previous version of MDX but it doesn't show anything now. My render method looks like this: dev.UpdateSurface( this .frameBufferSurface, null , this ._frameBufferTexture.GetSurfaceLevel(0), null ); dev.BeginScene(); dev.VertexFormat = TransformedTextured.Format; dev.SetStreamSource(0, this ._vertexBuffer, 0); dev.SetTexture(0, this ._frameBufferTexture); dev.Dr ...Show All
.NET Development Is CLR profiler suited for C++ applications?
Hi, Is CLR profiler suited to profile C++ programs If not, is there another C++ profiler that is available I am working with the following tools: Microsoft Development Environment 2003 Version 1.13088 Microsoft .NET Framework Version 1.1.4322 SP1 I'm trying to profile a simple application (built with Visual C++) with CLR Profiler v1.1 The CLR Profiler's dialog box opens OK but when I try to connect to a process through File->Profile Application, the CLR Profiler crashes. I debugged the CLR Profiler to the location of the crash. It happens on line 1309 in the source file: Forms.cs try { readBytes ...Show All
.NET Development Interop problem
hello, I have to load an unmanaged dll written in Delphi to my C# 2.0 application. The unmanaged function has one parameter; pointer to an interface and return this pointer. I am not sure how to declare the delegate and to use it. My code below; //here unsure about the signature internal delegate MyDel (out IntPtr IModule); IntPtr hModule = LoadLibrary( "mydll.dll" ); //if the handle is valid try to call members if (hModule != IntPtr .Zero) { //get the function pointer IntPtr fptr = GetProcAddress(hModule, "GetInterface" ); if (fptr != IntPtr .Zero) { MyDel ...Show All
.NET Development Using reflection to load GAC assemblies
I just want to use reflection to load an assembly in the GAC. Is the only way to do this to use Assembly.LoadFrom("path to GAC\Assembly name") That seems a bit naff. This post should help: http://blogs.msdn.com/junfeng/archive/2004/08/24/219691.aspx (you should checkout that blog for more info on how assemblies are loaded.) So if you're loading the assemblies only for reflection, the new APIs in v2.0 should be the way to go. hope that helps, Imran. ...Show All
.NET Development WebClient and ports other than 80
How do i get WebClient functions to work with web pages that are not port 80 Nothing is even sent CheckFinalStatus() of WebClient throws the error, thus nothing is sent I checked with netmon and nothing was sent I already said in a previous message that CheckFinalStatus() was throwing the error have never tryed port 8080 but as one guy said 8080 seams to work, but none of the sites i want to scan are port 8080 I can setup an iis 6 web page on a port other than 80 and 8080, and webclient throws a error as to HttpWebRequest it throws the same error The setting mod seems to work, but i dont li ...Show All
Windows Forms How to show a different text for bool
Hi, is there a simple way to display a different text on a bool-bound text. Assume I have an app with a label showing some bool value from an SQL-Table. This shows True or False - what I want is to show (for an example) Yes / No, or 1 / 0 on "Out off office" / "In the office". Another "problem" is that I sometimes want to bind reverse. So for an example I want to hide a button if some expression is true. The other way is simple - I bind the Visible attribute to the bool - but what if this is different. Or what if I want to enable when a textfield has a certain value In ASP.NET I would write something like Attr="<%# Eval("F ...Show All
Visual Studio 2008 (Pre-release) Any opinions on the untyped-ness of xaml?
I love xaml and I think it's super powerful. However, the whole system gets much of it's productivity by being untyped. Meaning, if I can bind to a 'path' that is found in a datacontext that I can set/change in the code-behind, no compiler will ever be able to help me figure out that I made a typo in the path. Actually, when I change a property name on the dataobject I'm binding to, goodluck finding all the references in xaml files. This seems like a step back (mind you, we get lots of power back ofcourse). Are there any thoughts on this Should we start binding in the codebehind instead of the xaml (ouch, that would lose mucho producti ...Show All
Windows Forms Problem deploying .NET application
Hi, Can anyone help me by suggesting a solution, I am creating a small application in VB.NET, and the size of that application is approximately 5.00 mb, Now to make it working I have to deploy it with the DOT.NET framework and the MDAC2.7, which is making this application (the setup program) upto 30.00 mb in size, This is very disappointing for me ...Show All
.NET Development X509Certificate2.PrivateKey fails even if HasPrivateKey == true
Hi, I am trying to exercise the methods and properties of X509Certificate2 class as I wish to convert an application from .Net Framework 1.1 with its many P/Invoke and CAPICOM calls to a pure .Net app using .Net 2.0 improved certificate/crypto support. I am playing with the MSDN C# sample app for X509Certificate2.PrivateKey Property with one small modification (suggested improvement ) Any thoughts why I get an exception "System.Security.Cryptography.CryptographicException: Keyset does not exist" on the line Console .WriteLine( "Private Key: {0}{1}" , x509.PrivateKey.ToXmlString( false ), Environment .N ...Show All
Visual Basic Asset Tracking Database
Hi, I am a newcomer to VB.NET I am creating an asset tracking database using SQL Server 2000 and this will keep track of PC's, Servers, Notebooks and eventually software as well as Purchase Orders, Contracts and a Helpdesk. I am using VB.NET 2002 to develop the application and will use Crystal Reports 8.5 to create the reports. I am developing the application from home and I then wish to deploy the application at my workplace once it has been completed. How do I go about deploying this if my workplace do not have SQL Server Can the database be accessed as a run time version. If I then want to make changes to my application and the database, ...Show All
