cPrince's Q&A profile
Visual Studio 2008 (Pre-release) Problems and questions: ResourcesDictionary, styling Expander, setting width/height using % values
Hi!, I'm having some problems and questions with/about XAML. First the problem with ResourceDictionary. I created a file called "XamlResources.xaml" with some styles in it and now I'm trying to "include" it to the MainWindow.xaml using this code (which I found from MSDN documentation): <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="XamlResources.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Window.Resources> However, this results to an error "Value 'XamlResources.xaml' cannot be assigned to property 'Source'". What's wrong The XamlResources.xaml is in the same ...Show All
SQL Server SQL Server Express won't install with default service name
Anyone else had this problem I think I had a beta installed at some point. After a dozen attempts, I got SQL Server Express to install, but I had to change from the default service name (SQLExpress). When trying to configure the .NET samples that come with Visual Studio 2005, the ConfigSamples.exe does not recognize that I have SQL Server Express installed. I suspect this is due to my non-default service name. I have verifed that there is not a service installed (at least according the Services Admin Tool) that is named SQLExpress. I just dropped over $600 for a personal copy of 2005 Professional, and I would just like to view the samples. Someone take pity on my poor soul and help out. I promise to help you help me and show much ap ...Show All
Visual C# Start form minimized to tray?
Hello I want to start my application minimized to tray and only minimized to tray. I have been trying several approaches: - setting the Visible-property to false after component initialisation - calling the Hide()-function - raising an event that calls the Hide()-function if the form is visible None of these have worked. By the way in my main()-function I am creating my form like this: Application.Run(new Form1()); I also tried Form1 aForm1 = new Form1(); aForm1.Visible = false; // or aForm1.Hide(); Application.Run(aForm1); Didn't work either. Any help would be much appreciated. Sincerely Peregrin Peregrin, maybe you'll find this link helpful: http://www.windowsfo ...Show All
.NET Development CodeDom for 'is' operator
I would like to compare some types for membership in an inhertance tree. In C# I use the 'is' operator. VB also has a similar operator. Is there a CodeDom class that I can use to encapsulate the 'is' operator Thank you. Kevin No, Object.ReferenceEquals(obj1, obj2) "Determines whether the specified object instances are the same instance" (from MS help). This is different for the 'is' operator. var is type could be replaced by: var != null && typeof(type).IsAssignableFrom(var). More exactly: Object.ReferenceEquals(var, null) == false && ypeof(type).IsAssignableFrom(var.GetType()) The following code is on my web page: http://metasharp.net/index.php title=M ...Show All
Visual Studio 2008 (Pre-release) Inactivity Default value
I've been testing for few days with the inactivityTimeout and receiveTimeout. In my WCF app, I use WSHttpBinding and WSDualHttpBinding. No matter what I set the values of inactivityTimeout and receiveTimeout to be, I get the CommunicationObjectFaultedException. My application needs to be kept alive for Infinite but that didn't seem to work so I changed to 20 minutes and still the timeout is set to 10min. What else do I need to change Description: Failed to stop service. System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state. Thanks, Gina. Have you m ...Show All
Windows Forms DataGridView AutoFilter whitepaper and sample
Are you spoiled by the AutoFilter feature in Excel Do you want the same functionality in the DataGridView control Then my new whitepaper and sample are for you. See: http://msdn.microsoft.com/netframework/windowsforms/default.aspx pull=/library/en-us/dnwinforms/html/DtGrdVwAF.asp The DataGridViewAutoFilter library provides a custom DataGridViewColumnHeaderCell with a drop-down filter list that displays each unique value in a column, and updates the filter of the bound data source when a value is selected from the list. A custom DataGridViewColumn is also provided to make using the AutoFilter header cell easier, particularly in the Windows Forms Designer. Customizing DataGridView column header cells is not as easy as customizi ...Show All
Visual C# namespace overlap
Hi, Let's say assembly 1 has a namespace a.b Another assembly 2 has a namespace c.a.d ('a' just happens to be the same word, but conceptually the two namespaces are different.) In assembly 2 (i.e., within the block namespace c.a.d { } ) how do I reference the namespace in assembly 1 Is there a way to tell the compiler that when I say a.b, I want that to be within the global namespace Right now the compiler thinks I'm trying to use (the non-existant) c.a.b. Thanks! Hi you can use a namespace alias http://msdn2.microsoft.com/en-US/library/sf0df423.aspx using MyAlias = MyCompany.Proj.Nested; // Define an alias to represent a namespace. namespace MyCompany.Proj { public class MyClass { public static ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Stuttering in D3D application
Hello, we're experiencing stuttering in our D3D game. With stuttering, I mean that the game loop will generally take 20-30 milliseconds to complete, running smoothly at ~30 fps. But then, like once per second or so, the game loop will take like 150 milliseonds or more to complete. The stuttering happens on many different computers so I don't think it's a driver/hardware/setup problem, but rather something that we're doing in our rendering that's causing the stuttering. Many other games run fine on these computers. I've profiled parts of the code.. and usually the huge delays come from D3D Present() method or the actual rendering. Does this indicate that there's a problem with the rendering command queue being filled up and stalled or somet ...Show All
Visual Basic Visual Basic Try Catch with and If Then statement
this is my code: If radioButton1.Checked = True Then textBox1.Text = textBox2.Text ^ 2 + textBox3.Text ^ 2 ElseIf radioButton2.Checked = True Then textBox1.Text = textBox2.Text ^ 2 * textBox2.Text End If Where and how would I start to put a Try Catch in here I want a MsgBox to display when a user hits the accept button with an alpha character in the textbox. And you might want to put something in the catch block, so in the case that an exception is thrown that it is actually handled and provides the user with a messagebox containing the exception that occured. Without that your just swallowing the exception. Try If radioButton1.Checked = True Then textBox1.Text ...Show All
.NET Development Help trying to Insert to Access DB with error No value given for one or more required parameters.
I am trying to delete all the quotes from a csv file and then grabbing each line as a row in Access' database. Right now I am stuck after hours of research about the error: No value given for one or more required parameters. I have tried using @companyName and also the question mark. Here is the code that give me the error: Public Sub InsertLine(ByRef line As String()) Dim dbname = "dbase1.mdb" Dim dbpath = Server.MapPath("access_db") Dim commandStr As String, dbcomm As OleDbCommand Dim conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ dbpath & "\" & dbname) conn.Open() commandStr = "INSERT INTO [Contactsdb] ([company ...Show All
SQL Server Backup databases
Hi I'm trying to setup a back up plan for a number of databases, I initially set up one plan to include all user databases which worked fine or so I thought, when I check them a few days later I noticed that some of the databases were not appearing in the backup set, the only way I could get these to appear is to set the comp level to 90, now when we run certain applications we get an error, when I return the comp level back to 70 then the application works fine, is there a reason I can not back up any database on sql 2005 without it being a comp level 90 Thanks inadvance I'm guessing that the maintenance plan you've created uses some feature or syntax which didn't exist in SQL 7.0 Look o ...Show All
.NET Development Problem Sending Email
Hello Everyone, I a having problems sending an email. I have microsoft xp home edition and I am working on visual studio 2003 .net. Also, (and I think it is because I have the home edition) I do not have the IIS component. When I go to the Add/Remove WIndows components, IIS is not even there. I opened an account with google to be able to use the google smtp. This is my code: ------------------------------------ void sendEmail() { try { try { MailMessage message = new MailMessage(); & ...Show All
SQL Server Custom Connection Manger Doesn't Show Up In VS
I have created a custom connection manager and it was showing up fine as was the UI I created for it. For some reason now no matter what I do I cannot get it to show up in the list when right-clicking and choosing New connection... I have also created two custom tasks. One of them works perfectly. The second was working but now causes an error when you open the package. Here is the error message: TITLE: Microsoft Visual Studio ------------------------------ There were errors while the package was being loaded. The package might be corrupted. See the Error List for details. There are no additional errors in the list only this one. I have tried everything I can think of to fix these two issues. Both problems emerged at the sam ...Show All
Windows Search Technologies WDS Problem Opening Attachments Archived With Legato Emailxtender
We are using WDS v2.6.5 and/or 3.0 in an environment with Exchange 2003 and Outlook 2003 SP1 with cache mode enabled. We are archiving Exchange email over 90 days old and shortcutting attachments. The shortcutting modifies the message class on the email to IPM.Note.ExShortcut.owa. Working natively in Outlook, the addin "Emailxtender Launch Extension" supports pulling the attached item back from archive when the user opens the message and the attachment is available to launch. When we search for results via WDS and then launch items through its UI we get inconsistent results. In some cases the item returns from archive and works as expected. In other cases the custom message class item is opened and the attachment will not launch. ...Show All
Smart Device Development ComboBox droppeddown?
Hello, I tried to find how to know whether a ComboBox - sytle DropDown - has its list opened. For compact framework 2.0 I could not find an answer though there a several posibilities in .NET2.0 - but not for CF. Can someone tell me how to find out whether the list part of an DropDown-Combobox is open or not Thanks for all help. Jorg Take a look at this blog post. It should give you the idea on how you can do it for ComboBox: http://blog.opennetcf.org/ayakhnin/PermaLink.aspx guid=4069b90f-f53f-4726-8790-36a9d3830aed The notification messages are: const CBN_DROPDOWN = 7; const CBN_CLOSEUP = 8; HTH... Alex ...Show All
