KaiserSozeTR's Q&A profile
Visual Studio Indentation in code-tag in included xml-tag
If I want to use a <code>-tag containing indentation in an Xml documented member, I can do it like this: /// <remarks: /// <code> /// <MyKey > /// <registrations default="<i>MyDefaultRegistration</i>" > /// < /MyKey> /// </remarks> This works fine. However, I have some sample code that I need to use a couple of times so I wanted to copy this sample code to a separate Xml-document and then reference this sample code using the <include>-tag. Like this: /// <include file='ApplicationDoc.xml' path='docs/member[@name="ApplicationLogon"]/*'/> The contents of my xml-document looks like this: < ...Show All
.NET Development Delayed Datareader column error
In a live application which i created, i noticed that after a day or two, i get a datareader error, specifically the error which returns a column name as it's message. i.e if i had written reader["col_name"] i get col_name as the error message. The problem is that i read 5 column names in a single read, and the messages vary, it not always the same column name. However, whenever i restart the server, the problem goes away for another day or two. Recently i increased my max pool size because i was having pooling issues, this had an effect on the datareader error in that it now occurs every 2-3 hours instead of the 1-2 days. pls i need help on this one Thanks I don't see anything wrong w ...Show All
Visual Studio Express Editions Norton like Taskbar icon
Hi. I was wondering if it is possible to make an icon like Norton has on the taskbar (Not the tray icon), the yellow one on it's left. It is directly a button on the task bar. Is there an API function (win32) for it Or maybe even a .NET function Thanks. Hi I got it. code: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( ByVal lpclassname As String , ByVal lpWindowName As String ) As Long Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" ( ByVal hWnd1 As Long , ByVal hWnd2 As Long , ByVal lpsz1 As String , ByVal lpsz2 As String ) As Long Dim hTaskbar Dim hReBar ...Show All
Visual C# generics: T Create<T>() where T : MyClass, new(...)
Is there a way to enforce a non default constructor And if not, why not ! I wrote a class that implements a constructor that is in need of an XmlDocument as a parameter. Several other classes inherit from this base class. Now I would like to write a generic create method that instantiates one of the child classes and sets some base properties: class MyClass { public MyClass(XmlDocument xmlDoc) { ... } public ElementName { get { .. } set{ ... } } } class ChildClass1 : MyClass { ... } class ChildClass2 : MyClass { ... } class MyClassFactory { ... public T Create<T>(XmlDocument xmlDoc) where T : MyClass, new() { T myClass = new T(xmlDoc); ... } ... } Obviously that does not work because the generic all ...Show All
Visual C# Update DataGridView?
I have following code for the form closing event: private void CurrenciesList_FormClosing( object sender, FormClosingEventArgs e) { dataGridView1.EndEdit(); if (dsCurrencies1.HasChanges()) { DsCurrencies chngs = ( DsCurrencies )dsCurrencies1.GetChanges(); sqlDataAdapter1.Update(chngs); } } Now, problem is the current cell: when I close the form changes on the current cell are not updated if I do not leave the current row. If I close form while I am still in the row all changes to this row are not accepted. It is like this that method EndEdit does not saves the curent row. How can I save current row in the DataGridView I believe if ...Show All
Visual Studio Express Editions Problem with RSS reader project
Hi, I downloaded the beginners videos from http://msdn.microsoft.com/vstudio/express/visualcsharp/learning/#beginners and all was going well, I'm on lesson 15 and have read the additional writing for this project and have done everything shown in the video and I've looked extensively at the snapshot included in the download, my code is identicle and up until now always compiled and executed, after adding the code from this lesson however my application crashes. The problem seems to be here: // Begin the WebRequest to the desired RSS Feed System.Net.WebRequest myRequest = System.Net.WebRequest.Create(rssURL); System.Net.WebResponse myResponse = myRequest.GetResponse(); // Convert the RSS Feed into an XML document ...Show All
Windows Forms Leave Event
I have a set of codes which on load the first time ...i set a control's to focus and this trigger the lost focus event of the control. And when i click on other controls, the lost focus is triggered again follow by the Leave event. While I am using the Leave event for some codings,i need to use the leave event only when the control is out of focus. However this only happen the first time correclty, the subsequent focus on the control will not only trigger the Lost focus but also the leave event which i doesnt want it to happen. How do i prevent that and what could be the reason thanks Regards Alu Alu, whenever I find myself thinking of using Leave, Got and Lost focused events I know I've lost the plot somewhere - I think I h ...Show All
Visual Studio How to create a snippet function
Hi, I would like to know how can I create and nest a function inside the <Function/> element in a snippet definition The switch snippet has a nice GenerateSwitchCases function to generate dynamic snippet code. Is it possible to create my own function like that Thank you very much, Jaco Typically, Service Packs are used to deliver fixes to commonly encountered code defects and much more rarely for new features. We are not planning any new functionality for Code Snippets in VS 2005 SP1. Thanks, Sean Laberee ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How can I start the XBox360 development progress?
Hi, In the company, I'm working for a great xb360 game now. Also I want to develop my own smart games for xb360. There are so many xb360 kits and other xb360-related hardware resources in my company but I can't use them for my business. So the question is: How can I get/buy the XBox 360 kit machine I can't see them opening up native development and C++ on the 360 without the $$ becuase of the way the console games are handled financially. The Console manufacturer has to control that process. Also there is a lot more security risk allowing this. We may see C++/CLR happen in Game Studio express at some point but it will all be managed code to allow security control. You can request this on the connect website for XNA http://forum ...Show All
Visual C# OleDb Provider, SQL Server 2005 problem
Here is my problem: I have a windows application that should work equally with SQL Server 2005 and SQL Express. This application uses Crystal Reports as report engine. When i use sql server, then for report i create diferent type of connection using OleDb, because crystal reports doesn't work with Sql Provider. And this works ok. But when i use SQL Express, then i can't open another connection because express alow only one connection. So i decide to always use OleDb connection for Sql Express. But my problem is executing command with parameters. When i have command like Select * from Users Where Username = @username and then add paremeter in that command with name @username , then it raise error with message Must declare the scalar variabl ...Show All
Software Development for Windows Vista Volume Filter?
I am writing out a WAV file using a directshow filter graph. The filtergraph mixes two WAV file inputs (File Source - Async) using the AVI mux filter which is then outputed by a File Writer to a WAV file. However I would like to control the volume of the input WAV files and mix them. Is there any DirectShow volume filters Thanks in advance, Don Have you looked at using the DES methods (DirectShow Editing Services) I know there is volume stuff in there. ...Show All
Visual Studio Express Editions Simple client and server applications
how do i make server and client (but very basic, just to transmit a string would do). I've been programming in VB.NET for a year so im good, but not great. Transmit the string from where to where From server to client or from client to server From or to a database or a text file Where does the string reside We need more information.... ...Show All
Visual Studio Express Editions View many database tables in one form
Hi. My program has a menu where you can choose between 90 database tables to view. My plan is to open another form with a parameter that says which table to show. So I have a form named Table. But the Table form needs to be able to choose between the 90 different tables. I drag and drop a table from the DatabaseDataSet, and thats one. But then I need to drag over another, and I got the problem. I need to be able to hide/'not create' all the other tables' datagridviews that I don't want to show. And without wasting resources on getting data from the other tables. Another problem is that the BindingNavigator (which I have modified) needs to operate with the chosen table. It has got a button which is going to export the table to Excel, and I' ...Show All
Visual Studio Express Editions Breaking a long code line?
How can I break a long code line The correct code : Me.Text = "........................................................" _ & "................................" ...Show All
Visual Studio Express Editions how some help fix my code?
'Create a new MailMessage object and specify the"From" and "To" addresses Dim Email As New System.Net.Mail.MailMessage(" From@abc.com ", " To@abc.com ") Email.Subject = "test subject" Email.Body = "this is a test" Dim mailClient As New System.Net.Mail.SmtpClient() 'This object stores the authentication values Dim basicAuthenticationInfo As _ New System.Net.NetworkCredential("username", "password") 'Put your own, or your ISPs, mail server name onthis next line mailClient.Host = "Mail.RemoteMailServer.com" mailClient.UseDefaultCredentials = False mailClient.Credentials = basicAuthenticationInfo ...Show All
