Nicw's Q&A profile
Visual C# params parameter must be a single dimensional array - (It is! Tell me it isn't!)<g>
Wasn't the goal, and hope for .Net 2 / the next version of C# not to rely on boxing of objects For it is the cornerstone of Generics... typesafe arrays and no more boxing ! But one area was overlooked.....take for example this code using the params keyword public void Columns(params string[] ColumnNames) { ... } Nice convention! It saves keystrokes and makes code easier to use ...but it was not updated to use generics! The following code in .Net 2 gets the dreaded CS0225 error erronously telling the user that a single dimensional array is not being used.... public void Columns( params List<string> items ) { ... } Feel free to tell me that List<string> is not a single dimensional array. I sure think it is. Obviously the err ...Show All
Software Development for Windows Vista Dynamic Update from Custom Activity
How can I do Dynamic Update from Custom Activity I could not access ApplyWorkflowChanges() from within the Custom Activity. Any ideas to solve this are appeciated. Thanks Thanks Serge, I have tried your suggested solution in the past BUT when I ApplyWorkflowChanges() (when the Workflow Instance is not suspended/idle) I get this error "Instance operation is not valid on workflow runtime thread"! In the past I have also posted this problem in the forum but I got no answer ( http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=684011&SiteID=1 ). Any further ideas are appreciated. Thanks ...Show All
.NET Development Best Practice: Activity status
I'm back again! For me this is a bit hard to grasp/tackle. My application has a UI and several other classes. I know that no class should interact with the other if its not needed, which is fine. I know about these things. If I have a class doing some work (not the UI), I want to be able to notify the UI of the status/activity that is going on in this work. Is it correct for me to say that I should create events which would be raised from this class, so that the UI will catch it and display the status to the user Obviously this "work" class knows nothing about the UI class, nor does it need to. All it needs to do is its work and then display the status of what its doing, wherever this status is displayed is none ...Show All
Silverlight (formerly WPF/E) Linetypes
Are linetypes available in wpfe such as dashed, dotted, and different variations such as long dash, short dash, long dash etc.. Is it possible to draw a line or polygon with a dashed linetype, any examples appreciated. Richard StrokeDashArray will set you free. http://msdn2.microsoft.com/en-us/library/bb188513.aspx ...Show All
.NET Development Need to do Form Based Authentication from VB.NET
I've searched a LOT here and elsewhere and can find nothing to help me. I need to logon to a MS Exchange server that uses Form-Based Authentication (with SSL of course). I know it can be done as there is a commercial product (WebDAV .Net for Exchange) that can do it. I've tried POSTing via HttpWebRequest, but when I get to the: MyWebResp = LogonWebReq .GetResponse() I get a WebException. Last one is: "Cannot handle redirect from HTTP/HTTPS protocols to other dissimilar ones." However, that's just the latest roadblock. I've done forms posting before (from other languages), understand headers, URLEncoding, and such, but I just can't make this work. Has anyone out th ...Show All
Smart Device Development CABs of multiple platform in single MSI
Hi, Have created respective .CABs for WM 2003 SE PPC, WM5 PPC and WM5 Smartphone, bundled and built them into single .MSI release. However, ActiveSync doesn't seem to be able to pick and install the right WM5 CAB onto right WM5 device. Have set the OSVersionMax/Min to 3.00 to 4.99 for WM 2003 CAB; and 5.00 to 5.99 for WM5 CABs. The .ini file was defined as such: CabFiles = WM5PPC.CAB,WM5SP.CAB,WM2003SE.CAB On running the .MSI generated, which then activates ActiveSync, the WM5 PPC CAB was being installed on my WM5 Smartphone. Question 1: Any further definition in .MSI to help ActiveSync differentiate WM5 PPC from WM5 Smartphone Question 2: Could I reduce two .NET CF2 projects, WM5 PPC and WM5 Smartphone, into a single ...Show All
Visual Studio Express Editions seek function in CFile..
Hello all, can i use seek seek function to determine the no. of bytes of a file my coding is try { CFile cfile_object("D:\\IW-Workspace\\yogi\\file1.pmd",CFile::modeRead); int r=cfile_object.Seek(0,CFile::end); char szSampleText[100]; UINT lBytesRead = cfile_object.Read(szSampleText,100); AfxMessageBox(szSampleText); CFile object; object.Open( "D:\\IW-Workspace\\yogi\\filenew1.excel",CFile::modeCreate|CFile::modeReadWrite); object.Write (szSampleText,100); } catch(CFileException e) { AfxMessageBox("error"); } and i want to pass the no of bytes to that character array... can u please help me.... Yes, you can use Seek for that, but if will return ULO ...Show All
Silverlight (formerly WPF/E) Can't catch Ellipse.MouseEnter in an EventTrigger element
Hi there, I want to have an animation that starts playing on the MouseEnter event of an Ellipse object. If I use the following XAML then the animation starts playing immediately: < Ellipse x:Name = " circle " Height = " 116 " Width = " 116 " Canvas.Left = " 12 " Canvas.Top = " 12 " Stretch = " Fill " > < Ellipse.Fill > < SolidColorBrush Color = " Blue " /> </ Ellipse.Fill > <!-- Animations --> < Ellipse.Triggers > < EventTrigger RoutedEvent = " Ellipse.MouseEnter " > < EventTrigger.Actions > < BeginStoryboard > &n ...Show All
.NET Development Frustrated. How do I start?
I have a vista ultimate machine with vs2005 and the .net sdks. I have defined an iis web application at http://localhost/testapp I have tried to create a hello-world type html page to use jscript. When it runs I get the messge: Microsoft JScript runtime error: 'System' is undefined <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml" > < head > < title > Untitled Page </ title > </ head > < body > < script type ="text/jscript.net"> System.Windows.Forms.MessageBox.Show( "Hello World" ); </ script > </ ...Show All
Game Technologies: DirectX, XNA, XACT, etc. N XNA Framework wish list
XNA Framework wish list. - System.Net.Sockets o Socket (Tcp & UDP transport) o Do not really need support for TcpClient, TcpListener and UdpClient - System.Security.Cryptography o Rijndael o MD5 - System.IO o FileStream o StreamWriter / Reader - System.Text o StringBuilder o Full UniCode support - System.Threading - System.Diagnostic Thanks, Roger Larsen You already have access to these for Windows games and for 360 games some pose a security risk so could not be accessed as they exist in the regular Framework. It's been said that there will be support fo ...Show All
Visual C# Join W2K Domain
Hi, how can i join a Workstation to a W2K3 Domain with a C# Prog Please post a code sample. Andi Has anybody got this code to work. I get an error # 1323 ie. unable to update the password. The value provided as the current password is incorrect. Anybody has any ideas Any help appreciated. thank you. ...Show All
Visual Studio Installing Crystal Reports XI release 2 for BOTH ASP.NET 1.1 and ASP.NET 2.0 on same server
Hi - We currently have a case where we are supporting multiple versions of our product on the same web server (a windows 2003 server). However, we have 2 versions of our application on the same server, but one is in ASP.nET 1.1 and the other is in ASP.nET 2.0. Our applications are fine and can co-exist ok on the server. They both use Crystal REports XI, Relesae 2, which supports both 1.1 and 2.0. Our developer machines run just fine wtih both products and crystal reports, but the problem we are having is deployment. When we install the runtime redistrubutale for ASP.nET 2.0 on the machine a file(CrystalReports11_5_NET_2005.msi) then our ASP.NET 2.0 application works fine. However, when we install the crystal runtime redistributable fr ...Show All
SQL Server sum of a column in matrix
hi reporters! i m using matrix in my project and i want to calculate the (cell_value/sum_of_column). for data cell values we have to use sum or another aggregate function for subtotaling, so for the cell value i m wirting sum(column) / A. how to write A that points to sum of all cells on the column. x_column y_column z_column sum(y_column)/A A thanks a lot mohd sufian and Yicong Shen sufian's solution solved my problem, s um(Fields!OrderQty.Value)/Sum(Fields!OrderQty.Value, "MatrixSource") this is what i wanted, appreciate ur big help, mohd sufian ...Show All
Gadgets google calendar
can someone help convert the google calendar to windows sidebar i tried using amnisty generator but i cant get it to work right can somebody help Yea, I've been trying to find one that works well and I haven't been able to find one I like. I'm starting to try to create my own. I think a gadget that would let us simply paste the HTML code from the Google Embeddable Calendar Helper ( iframe, etc.) would be best. ...Show All
Visual Studio Team System unicode with SQLCMD
I have a bunch of DML scripts which contain Unicode characters (i.e. German Umlauts such as a,o,u). When I use the post deployment script to execute the DML using the following syntax: :r .\DML\Umlauts.sql the unicode characters are not loaded properly into the DB. The script works fine from the command prompt or using SQL Studio. Is there any way to pass along the "-u" parameter to the SQLCMD If not, is there any way to execute cmd files during the deployment process Thanks in advance for your help. Markus Gallagher I opened both the original DML file and the Build Output file with Ultra Edit and neither of them indicated that they were Unicode i.e. both displayed as DOS Format. I then converte ...Show All
