Vighnesh Prabhudesai's Q&A profile
Windows Forms datagridview rows editable or not
My datagridview has to have noneditable rows except for the ones that are new. I have set AllowUsersToAddRows true for the grid. This adds a row at the bottom and user can enter the data. I want the new rows to be editable. Also the copy and pasted rows should be editable. So I added a flag to the database . If this flag is 'Y' I want to make those rows noneditable but for the new rows I want to initially set the flag to 'N'. In which datagridview should I set the datagridview.currentrow.Readonly=true; I am a newbie...please help... ...Show All
SQL Server full, differential, transaction hwo to rotate the differential?
Being of the "point and click"-generation I managed to create some sort of a fairly simple backup plan for our databases. There are hourly transactional backups and daily full backups, which were set up with a database maintenance plan. As the databases store event records they are ever increasing around the hour. The daily backups are now of a size that holding them is not feasable anymore and I want to move to a differential backup scheme: Weekly full backups Daily differential backups Hourly transactional log backups The problem I have is that the database maintenance plans allow me to rotate backup files automatically as they included the date and time of the backup. For differential backups there is no option ...Show All
Visual Studio 2008 (Pre-release) ContextMenu as UserControl issues
I'm using a ContextMenu with a single item to implement a popup editor for some values. Since this shouldn't look exactly like a menu, I need to style the ContextMenu and it's items differently from other Menus and MenuItems in my application. It seemed like the most straightforward way to go about this would be to make a UserControl which contained my ContextMenu. That way I could locally style all of the elements inside my 'PopupMenu' inside the XAML. That fails with an exception since ContextMenu cannot have a logical or visual parent. The next approach was to make my UserControl contain a MenuItem and then place that inside a ContextMenu in my code. That also fails since the MenuItem is already owned by the UserControl. The only ...Show All
Visual Basic Debugging
I have tried to access the Command Window while debugging a simple vb program. When I type >cmd In the Immediate window I get the error message "Command "View.CommandWindow" is not valid". The Help file says that I can access the Command Window from the "View \ Other Windows" menu, but my "Other Windows" menu doesn't even list that option! Any help would be appreciated. Thanks. Yes, I am using VB Express. You are probably correct. I am using a book from Microsoft ("Visual basic 2005 Step by Step") and had realized a few other commands are not available (for example, I have only one Watch window, whereas the book mentions the possibility ...Show All
Visual C# MessageBoxIcon.Hand not working as expected
I have a MessageBox that I would like to use to advise users that a DataGridView has no records in it that can be modified. I've written the code for the MessageBox to look something like the following... MessageBox .Show( "No records are available for editing." , "No records to modify" , MessageBoxButtons .OK, MessageBoxIcon .Hand); The problem is that the Hand icon does not display when this message box displays. Instead, I get the standard error icon that consists of a white x in the middle of a circular red background. I've noticed that the tooltip that appears while I'm writing my code even tells me that this is what will display. Is this a known bug or am I having this problem for some other rea ...Show All
Visual Studio Express Editions Scan my files ? - How do i do ?
How do i do to scan my files and show in textbox1... Example: Scan files which i want : "abc.exe"; "abc.dll"; "abc.ogx"; "abc.txt"; etc... If you find those files, show in textbox1 . And we create a new button with name "delete" because i want to delete files in textbox1 (delete files form textbox1 and computer) Please post the code ok, thats clearer. Dim theFiles() as string = System.IO.Directory.GetFiles ("Path ", ". jpg") 'gets all jpg extensions for each currentItem as String in theFiles MessageBox.Show(currentItem) next ...Show All
Smart Device Development Platform problem?
Hi All, I have a serious problem. I'm developing a project which contains 1 program destinates to Windows XP (.NET Platform), and other detinates to Windows CE.NET (CF Platform). So, They both use or share classes and I have designed about MVC (Model-View-Controller) pattern. So, my initial idea was to have one Model, one Controller and 2 views (XPView and TerminalView) and they both views uses the Controller anbd Model classes. However, I have designed Model as a Library Project and Controller the same, XPView as a simple Windows Project, and TerminalView as a SmartDevice Windows Project. My surprisse is when I perform my SmartDevice Project, it launch me a exception "MissingMethodException in Control ...Show All
Visual Studio Express Editions iTunes COM Problem
Hey there. I am writing a program that includes showing the current playing song on iTunes. I also want to show the current playing song on Windows Media Player and WinAmp. My problem is the following: If iTunes (and I'm assuming WinAmp or Windows Media Player) aren't open or the music is paused and now Current Song is being passed, my program freezes. These are the steps I've taken to showing the Current Song. 1) I've added iTunes 1.8 Type Library to my project 2) In Form1.vb I've added the following code above Public Class Form1: Imports iTunesLib Imports System 3) In a Timer I have the following code: Dim itunesapp As New iTunesApp SongNameToolStripMenuItem.Text = (itunesapp.CurrentTrack.Name) SongArtistToolStripMenuItem.Tex ...Show All
Visual C++ Property Overloading
I want to overload a property so that its type can be either 'ProgressBar' or 'ToolStripProgressBar' is there a way I can do this I don't understand the interface part, would I inherit this interface form the progress bar or create it form scratch I am confused. I would really appreciate if you could show em a simplified example in code. ...Show All
Visual C++ VC++ won't run from source control: "The system cannot execute the specified program"
Hi, I've installed VS 2005 C++ Express into source control and it won't work. I've wasted the better part of a day so far trying to get it to work. The error message I get when trying to run something as simple as lib.exe is: "The system cannot execute the specified program." When I load up the .exe in the dependency walker (depends.exe), it says: Error: The Side-by-Side configuration information in "y:\compilers\Microsoft Visual Studio 8\VC\bin\LIB.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001) . The only dependency shown for LIB.EXE other than KERNEL32.DLL is MSVCR80.DLL. I've tried copying all t ...Show All
Windows Forms FormClosingEvent has no CloseReason
In a Form I created, I've subscribed to the FormClosingEvent. In this event I want to distinguish between a user that closes the form, or an outside OS event that closes the application. Therefor I read the CloseReason member of the FormClosingEventArgs. However it seems that when the user clicks on the OK button which is the Forms AcceptButton, the CloseReason seems to be set to "None". The same goes for the form's CancelButton. Is this intended behaviour, and if not, should this not be documented When you handle the user clicking a close button that you have created on your form, you probably handle the application close with your own user code with a "this.Close();&quo ...Show All
Software Development for Windows Vista Name property empty???
Hi guys, The last CTP i was using, was the may CTP. With this version I had the problem that the name property was not filled in for any controls. It was always empty. Now I installed the july CTP and the problem still exists... Does anyone else have this problem Is this a know issue Note: When using the textvaluepattern, you get the text so that works... Best Regards, Nick it is recommended to use AutomationId to identify elements ...Show All
Visual Basic difference between vb2003 and vb2005
Hi i was developing a project in Vb.net 2003 and for some reasons i have to switch to vb.net 2005. and while converting x project into 2005 i am facing some problems. 1) i have built a form template and all the forms for data input are being inherited by that form it is workin very well in vs 2003 but in 2005 the child forms does not opens in design view and states the following error The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: Form1 --- The base class 'TestApp.TMForm' could not be loaded. Ensure the assembly has been referenced and that all projects have been built. and when i build the solution visual studio is shutdo ...Show All
Visual Studio Team System Refresh Test List problem with third-party tests
I have TestPartner scripts created as tests. I added a test in the 'Lists of Tests' tree. I hit refresh. Test list fails to find the test I added. The warning message: "The test "text1" does not exist in the test list." It may have been moved, renamed or deleted." How do I get the added test in the test list to persist. Please let me know if there is a work-around for this problem. I'd like to create a test list. Thanks, David Pham Hi David Pham, I'm not familiar with the integration Compuware provides for integrating their TestPartner scripts into VSTS, although I see from their website that they say they have it. I could only suggest that you seek support fro ...Show All
SQL Server OLE Db Source and Variables
I created a OLE DB Source, and created a sql command text. The issue is with parameters, I have to use the ' ' to identify. What if I have multiple variables of the same type scatter around, how can I define that Somthing like this would be good... Declare @month set @month = select blah,@month where month=@month or How could I use the ADO Syntax and just put @month Thanks, Mardo Guys, my apologies for being a bit misleading. The .NET connection manager can be used in conjunction with the Execute SQL task (in the control flow) - when using this type of connection manager you are able to use named parameters. The OLE DB source adapter (in the data flow) is specifically OLE DB i.e. it must use an OLE DB connection manager to ac ...Show All
