James Alexander's Q&A profile
.NET Development Why do all examples assume you're binding data to a control?
I'm starting to get frustrated now. Every example I come across shows you how to open a connection to a database, fill a dataset, but not how top programatically get at the data... Every example assumes you are going to bind the data to a control and update using a GUI. How do you get at the data within a DataSet once you've Fill()ed it Not from a form, but from with the application. This frustration is also heading towards disappoinment. The examples never seem to do anything. They get you to a point and then leave you dangling. This is an ideal way to ensure the after market for books etc. thrives... The "Build a Program Now!" e-book ...Show All
Windows Forms MenuItems
Hey, Is there a code like the one below that dose the same thing but for a MenuStrip item : ToolStrip3.Items.Add(newbutton) Thanks :) yes...identical: MenuStrip3 . Items . Add ( "TEST" ) or MenuStrip3 . . items . Add ( Text , image , Eventhandler ) ...Show All
Visual FoxPro Primary Index/ascending order
Hi there, It is nice to be back. This is my question for today. I am using CREATE TABLE command. It seems I can define a field as having PRIMARY KEY quality which is the same, in essence, as to say that I am assigning an 'INDEX ON' the field with some additional quality of this index being primary . The way I see it there is a great deal of confusion as to what primary means. Perhaps it is only confusion in my head, so please help. I had to use Visual dBase help for additional clarity. It seems it confused me even more: " Primary indexes require unique values—they do not permit duplicate key values. For example, if ...Show All
Windows Forms about SelectedIndexChanged event in listview
Hi i am very newbie in this vb.net world but i am developing a windows forms . I am using this code: Private Sub lvwLocales_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lvwLocales.SelectedIndexChanged ObtenerLocal(Trim(lvwLocales.SelectedItems(0).Text)) MapearVariables() BloquearControles(TipoBloqueo.tbNo ...Show All
Visual Studio Team System Q: How do you Filter system generated cs files(such as class.designer.cs) in FxCop?
Anyone tried using FxCop that is capable of disregarding system generated code (cs files such as class.designer.cs) You can suppress individual violations within the generated code, however, there is no way to ignore all generated code. Although, Code Analysis in Visual Studio does shutdown noise on members marked with CompilerGeneratedAttribute and GeneratedCodeAttribute. What exact violations are you trying to ignore I ask this, because at the moment we are starting to work with other teams within Microsoft to clean up warnings within generated code. ...Show All
Windows Forms RichTextBox double-click on text doesn't work correctly
Howdy folks, I noticed something strange today. When you double-click on a word within a RichTextBox, the word is highlighted. Triple-click and the line is highlighted. So far so good. When the word ends with an apostrophe though (the ' character), then double-click on the word highlights the apostrophe and any whitespace after it. It does not highlight the word you double-clicked on. To reproduce: In VS 2005, create a new Windows Forms application. In the designer, drag a RichTextBox onto your form (resize as you wish). Run the application. Type in a string containing a word with an apostrophe at the end of ...Show All
Software Development for Windows Vista Passing data between activity & flow
This may be a easy one for you-- I start to create lots of customized activities and put them into workflow. I'm wondering how many ways there are to pass the data in/out activity. I know I can expose dependency property from activity, but how do I return some values back to flow If I bind a variable from workflow to activity property , can it act as a reference type Also is it possible to access workflow instance from within activity By the way, for your information, I'm using xoml way to declare the flow, and want to avoid using any code-behind at all. What's the best practice to pass the data between flow and activity in t ...Show All
SQL Server Transaction context in use by another session.
I'm having a SP1 on server A. This procedure has a begin trans and a commit. In this procedure i'm inserting data into tables. This data is provided by an extrenal app in staging tables. On the tables i'm inserting data on i'm having triggers that again are starting a SP2. I'm using a cursor on the inserted table to achieve this. The SP2 only insert a record on a table that is on a linked server. For testing reasons at this moment this is my dev machine too. The error 'Trans ... ' pops up .... Any suggestions .. Kind Regards, Harry I guess, the link server update might be causing the erro ...Show All
Smart Device Development export VS 2005 project to GNUMakeFile
How do I export VS2005 project file (a pocket pc application) to GNUMakefile. I require this to complie project from command prompt. Any inputs are appreciated and thanks in advance. -Seemit Command line compilation is supported for NETCF V2 and is described in VS documentation. You'd need to create make file for particular make utility manually. Please see this for command lines to use: http://msdn2.microsoft.com/en-us/library/ms172492 ...Show All
Visual Studio Express Editions Sending Info from VB Express to Word
How do you send info (Name, address) that is inputted into VB to a Word document I'm just getting started with VB so if someone would take the time to help me it would be greatly appreciated. An document that details how to create a word document from VB.Net. The document shows example code which will work in VB.Net including VB Express http://support.microsoft.com/default.aspx scid=kb;en-us;316383 ...Show All
SQL Server SQL Express uninstallation
I am trying to uninstall SQL Express beta so I could install the latest version but unfortunately I cannot remove it. I tried going through my control panel but it wasn’t there, I tried using the uninstaller from Microsoft.com ( http://msdn.microsoft.com/vstudio/express/support/uninstall/ ) but it gave me error messages like saying …” The setup has encountered an unexpected error in datastore. The action is RestoreSetupParams. The error is: Failed to read property "Installds" {"MachineConfiguration", "",WEBDEVELOPER"} from cache Unable to write property into cache:IsClustered Unable to write property int ...Show All
Visual Studio Express Editions How do I close a form via an "OK" button?
Visual Basic 2005 Express Edition: The user can exit out of a DataGridView by clicking on the "X" in the upper right corner, but, I would like to also provide an "OK" button that would do the same thing. In the "OK" subroutine, how do I close the form Close() But if you want the dialog result to be set, go to the designer and set the dialog result for the button to be OK You can also set the AcceptButton property on the form, this sets what button is pressed when you hit 'enter'. ...Show All
Software Development for Windows Vista About new WWF beta 1.2
I just started playing with WWF 1.2, which I downloaded following a link provided on www.theserverside.net to msdn. After watching PDC 2005 Video "Developing Event Driven State Machine Workflows" by Pravin Indurkar using WWF Beta 1 and playing that version on MSDN virtual lab, I got an impression that WWF beta 1.2 State Machine Workflow designer behave dramatically different from that of WWF beta 1. For example, I cannot move state shape around freely and if I set TargetState of a SetState Shape to another state shape, I will not get a connecting line pointing to that state shape as WWF Beta 1 would. Is this an installation proble ...Show All
Windows Forms BindingNavigator and events?
I want to check whether current record is saved or not before it navigate to another record, if it's not saved it will stop user from navigating to other records, I'm thinking to insert some logic to check it before calling move first, preious, next and last, and add new. But I cannot find any events for those actions. Can anyone suggest me some ideas where I can implement my logic Thank you very much!!! if you are using buttons to move first, next, or previous then on the click event of the button check the rowstate of the current row ; newly added row will have a rowstate of Detached, if you call the end ...Show All
Windows Forms Can't Supress WebBrowser "Open/Save" File Download Dialog Box in VB 2005? Please help...
I have a project in which I use a WebBrowser control to host Office documents. The problem is that every time I navigate to an Office document it presents the "Open/Save" dialog box. If I hit "Open", it displays the document in the WebBrowser control as I want it to. I need some way to suppress that dialog box but still "Open" the file in the WebBrowser control. Is this even possible I've been looking at the "WebBrowser.FileDownload" Event and the "WebBrowser.OnFileDownload" Method, but I still can't figure out how to achieve what I am trying to do. Please help! And thank you so much if you do! ...Show All
