shaper's Q&A profile
Windows Forms [c# .net 2] Exporting data from dataGridView
Evening. I have an unbound dataGridView which I'm populating programatically (not using a dataset) from xml/user entered data. What i now need to do is when the user clicks save i want it to write all data from the dataGridView to an xml file. I think the only/best ( ) way to do this is to iterate through each row/cell and write the xml file manually. Problem is, I just cant seem to do the forloop right. Can someone help me out Thanks. Michael It's up to you to decide your xml schema. The only reason i used column name is that when you want to load the xml back lateron, it's easier to map the values back to the columns. Otherwise you have to use your own code to map your element name back to column name. A ...Show All
Visual C# Multiple Projects
I have two projects under one solution. Each of these projects opens the same bound database, Is there any way I can use a common routine to assign the bound database and which app.config should it be in. Share the code that accesses the database. You can either move it into one project, expose public methods for the other project to call, or you can create a third data-access project, and call this from all your other projects. ...Show All
Software Development for Windows Vista QueryusingSqlTrackingService
Hi , I need some clarifications on running the QueryusingSqlTrackingService sample.While i run the sample i get an error message as given below. A version already exists that is greater than or equal to the new version The tracking profile was not inserted. If you wish to add a new tracking profile , please increase the tracking profile's version number. Executing the workflow Instance Level Events: EventDescription : Created DateTime : 7/11/2006 4:54:03 AM EventDescription : Started DateTime : 7/11/2006 4:54:03 AM EventDescription : Completed DateTime : 7/11/2006 4:54:03 AM Activity Tracking Events: StatusDescription : Executing DateTime : 7/11/2006 4:54:03 AM Activity Qualifie d ID : SimpleWorkflow StatusDescription ...Show All
Windows Forms "View Designer" on form prompts for check out
Visual Studio 2005, VSS 6 I have a form that I have checked into SourceSafe. In my Visual Studio solution, when I right click and select "View Designer", the "Check out for edit" dialog appears to prompt me to check out the form from SourceSafe. I have not changed anything and simply want to open the designer to view it. If I go ahead and check out the form and close it, saving changes, then do a "Compare", all files are identical, including the .cs file, the .Designer.cs file and the .resx file. The form was not doing this before. It has several controls on it. I had recently made some changes to the form - adding a TableLayoutPanel to arrange the existing controls. I also set some ...Show All
SQL Server storing values using a custom assembly
I have a need to save a value or set of values that can be recalled for a calculation for each cell in a MDX query. Specifically I am trying to calculate the linear regression line over multiple days where the granularity of time is 10 minute periods. Using the LinReg functions in MDX perform very slowly. This is because the linear regression line is recalculated everytime the function is called, something that isnt necessary in drawing a trend line - calculate the slope and intercept ONCE and then use the slope and intercept to calculate the next point on the linear regression line. So, I'm not sure how to accomplish this using a custom assembly. If you declare the functions as static in the assembly, then you cant recall any member varia ...Show All
Game Technologies: DirectX, XNA, XACT, etc. In Game Movies
Does anyone know whether the XNA Framework will allow for games to be written that have Cut-Scene videos, perhaps using non-Microsoft codecs such as divx or another codec that allows high-video compression to limit the size of the game. Will the game be able to use any audio/video codecs that Windows has installed on it, and will it be able to load pre-written non-managed code DLL's Dr.9 wrote: +1 How do we formally request it XNA builds should at the very least be able to play high res windows media 9 content. - Nevermind, I found it on the 'features request'. Only 10 other people bothered to request. ...Show All
Visual Basic MediaPlayer and Read Movie Files
I want to read media files and this files show as link in datagrid. example C:\Movies Movies directory in exist all files break into to datagrid Thanks For Help Well you have 2 options: call Windows Media Player as a process, giving it the arguments of the file to play use the WMP 10 SDK and implement WMP in your application you will also implement a CellClick event which basically will be fired when the user selects a cell which means you can then get the row and cell selected and pass the value from this cell (filename) to the process arguments. So, to start a WMP process: System.Diagnostics.Process.Start("wmplayer pathnameAndFileHere ") does this ...Show All
SQL Server Monitor database not backup
Hello, I'm monitor my SQL 2005 using MOM 2005. I would like to create a VB script to get database list that are not backup in the last X days. how can I do that http://www.extremeexperts.com/SQL/Scripts/Lastbackup.aspx fyi. ...Show All
Visual Studio Express Editions replacement for fread, fwrite, fseek for VB .NET ?
replacement for fread, fwrite, fseek for VB .NET anyone It mentions no replacement : http://www.kbalertz.com/Q313836/Standard.Library.Functions.Functions.aspx ...Show All
Visual Studio Tools for Office VSTO2005 Excel- Insert Comment into cell
Hi, I am using VSTO 2005, Excel workbook project. I would like to insert a comment into a cell on a worksheet- does anyone know how to do this programatically (i.e. same as right-clicking on a cell, and selecting "Insert comment"). Thanks. Correctly, questions concerning the object model should be directed to the appropriate newsgroup, as listed in the "Please Read First" message at the top of this forum. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=174275&SiteID=1 Only questions concerning the VSTO technology should be asked in this forum. In any case, you should mention the programming language you're using if you want a code sample in that language. Th ...Show All
Visual C++ Question about messagebox function
Hello I use Visual Studio 2005,I created an MFC Application,then I added a button and I want that when i click on the button a dialog box with a text appear,these are codes, whats wrong with them void CHelloDlg::OnBnClickedHello() { // TODO: Add your control notification handler code here //Say Hello to the user MessageBox( "Hello. This is my first Visual C++ Application!" ); } and this is the error: error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'const char [48]' to 'LPCTSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Please Help,pleaseeeee This error message usua ...Show All
Visual Studio Tools for Office Excel 2007 file saving
Hi, i'm having trouble saving excel file with .NET. if i'm trying to save like this: mBook - is a excel worksheet this.mBook.SaveAs(filename, mv, mv, mv, mv, mv, XlSaveAsAccessMode.xlExclusive, mv, mv, mv, mv); i'm getting exception HRESULT: 0x800A03EC when i'm saving the save workbook like this: this .mBook.SaveCopyAs(filename); everything is ok, except the fact, that file is saved in format, that older excel(for example 2000 or 2003) can't open. i've tried to use different parameters on SaveAs function, for example change fileformat or access mode, but no luck :( Hi GB It's not clear what kind of environment you're working in. Is this VSTO If not, then this isn't the r ...Show All
SQL Server Is this possible without using cursors?
Hi! I have 2 tables: Person and Address Person ( PersonID int PK ) Adress ( AddresID int PK, PersonID int FK, Default -- 1 if address is default for person ) so when I join those table it yelds (for example): p1 a1 1 p1 a2 0 p1 a3 0 p2 a4 1 p3 a5 0 p3 a6 0 Person may: - have one default addres and some non-default; - haven't default address; - have only default adres So proper result is: p1 a1 p1 a1 p2 a4 OR p2 a4 p3 a5 p3 a6 I ...Show All
Visual Studio Express Editions Sorting listView
I am trying to sort a listview by it first colume, in number order. At the moment it is sorting to some extent, but it groups 1, 11, 12.... together. How can I make it just sort in number order Public Shared Sub AddtoListView( ByVal Num As String ) Dim CurrentHand As New ListViewItem(Num, 0) 'Hand CurrentHand.SubItems.Add(PreviousStake) 'Stake CurrentHand.SubItems.Add( "" ) 'Bet Type CurrentHand.SubItems.Add(PreviousPlayer) 'selection CurrentHand.SubItems.Add( "" ) 'Bet Refrence CurrentHand.SubItems.Add(Lasthandwonorloss) 'Result CurrentHand.SubItems.Add( "" ) 'Profit / Loss CurrentHand.SubItems.Add(PreviousRunningLoss) 'Running Loss C ...Show All
.NET Development Windows Services and COM interop
Here is what I am trying to do: I have a very simple test DLL that has one operation called 'Get_Stuff(String)' this simply returns a string with some hard coded text. This works fine if I create a windows app in VB and then call the operation on the DLL, so I know the code is right. However, if I create a Windows service (again in VB) and use the same code I get an error. I've set the service to run under my login rather than local system because the DLL needs to access network drives. The error I get is: Error: 429, Cannot create ActiveX component. As I say, identical code works fine as a normal windows app so does anyone know what is going on here As I understand it the service will still be running in a dif ...Show All
