Richard78's Q&A profile
Visual Studio 2008 (Pre-release) Changing the selection style of a ComboBox
How can you change the dark blue selection color when an item is selected in a combo box Changing the ComboBox's template doesn't do it. Changing the ItemTemplate doesn't do it. The ComboBox, when a text item is selected, changes the background color to a dark blue and changes the text color to white. I'd like to know how to change this behavior and also how to remove any sort of selection indication all together. Thanks. < ComboBox Name = " myComboBox " Width = " 140 " Height = " 25 " > < ListBoxItem > < Rectangle Width = " 50 " Height = " 10 " Fill = " Blue " ></ Rectangle > </ ListBoxItem > < ListBoxItem > Test ...Show All
Windows Forms Question about a Design time component!
Like this: public partial class ActionsDesigner : Component { private List < DesignTimeAction > actionCollection = new List < DesignTimeAction >(); public ActionsDesigner() { InitializeComponent(); } [ DesignerSerializationVisibility ( DesignerSerializationVisibility .Content)] [ Editor ( typeof ( CustomActionCollectionEditor ), typeof ( UITypeEditor ))] public List < DesignTimeAction > Actions { get { return actionCollection; } } public ActionsDesigner( IContainer container) { container.Add( this ); InitializeComponent(); } } If he who has the knowledge one the TypeConverter and UITypeEditor,pls give me some documentati ...Show All
Windows Forms DateTime picker
This control is starting to give me fits. I am finding more and more reasons not to use it except in the most simplistic ways. The first problem is the control doesn't allow nulls. I know the checkbox work-around, but that requires more code and more user interaction. The second issue I am having is when writing the date value to the database, even though I end edit on the bindingsource and validate the form, the date retains the previous value until you tab out of the control. For instance, if you use the arrow keys to change the date, and then click a save button (on my toolbar), it writes the previous value. Anyone know why this occurs. I would use a textbox and validate a user-entered date but havin ...Show All
SQL Server Getting Data and combine two Column
I have a table Table, there are two set of Number and store in Tel1 and Tel2 I want to get all the number of each reacod that start with '1' on each record, the number I need that may in Tel1 or Tel2, I want to get the result like 'Result' table how can I do it THX TableA +----+-------+-------+ | ID | Tel1 |Tel2 | +----+-------+-------+ | 1 | 12223 | 92269 | | 2 | 12269 | 97789 | | 3 | 96636 | 13369 | | 4 | 12259 | 97781 | | 5 | 92889 | 12263 | +----+-------+-------+ Result +----+-------+ | ID | Tel | +----+-------+ | 1 | 12223 | | 2 | 12269 | | 3 | 13369 | | 4 | 12259 | | 5 | 12263 | +----+-------+ Hi, SELECT ID, CASE WHEN Tel1<Tel2 THEN Tel1 Else Tel2 END As Tel From TableA You also mig ...Show All
Smart Device Development Device Emulator COM port problems
I'm using Pocket PC 2003 device emulator v8.0.50727.42 and am trying to use the COM ports by mapping them to COM1 of my PC I can successfully create a handle for serial port 0 (COM1) or serial port 2 (COM3), but it fails for serial port 1 (COM2 ). In addition if I try and write to serial port 0 I get the first byte out of my PC COM port but then my application on the emulator appears to block on the call to WriteFile. If I click on the emulator frame a few more bytes get sent and then it blocks again. If I write to serial port 2 the application appears to successfully send the data i.e. no block this time, but nothing comes out of my PC COM port. I've run the application on a HP Pocket PC using it's COM1 port and the application works fine ...Show All
SQL Server Unable to use Sql Server Express
So I download the Visual Web Developer Express version, and SQL Server 2005 Express along with it. Installed both of them, along with the new Atlas component, and headed over to www.asp.net to start some of the tutorials. I choose one of the Atlas how-tos, and the first thing it has me do is make a new SQL DB from the web developer. I attempt to do so and get the following error message: An error occurred while processing the local data file: Key not valid for use in specified state. A database_log.ldf file is created beneath the db icon, but any attempt to open it results in an error. Under the Database Explorer window, the username\sqlexpress.pubs.dbo is marked as not working, and when I attempt to refresh it, I get an er ...Show All
Visual Studio Team System Strongly Typed DataSet analysis
Hi, It appears that VS2005 Code Analysis ignores the code in strongly typed datasets, probably because of the GeneratedCodeAttribute on the class. Is there anyway to force my partial class code or ideally, all of the generated code to be analysed I understand that some stuff in the auto-generated dataset code will violate CA rules but picking up naming issues and ensuring my extensions are valid would be very helpful. I've considered hand removing the GeneratedCodeAttribute from the .designer file but it will only be replaced when the file is regenerated from the source .xsd during a build. Thanks, - Jason You can find out a little more about these new features in Orcas, by reading the following post: ...Show All
Visual C# DataSet copy parts of coulmn.
Hi I have DataSet.Tables[0] with 8 coulmns how i can to copy parts of coulmns to another DataSet. ...Show All
SQL Server Errors in High Level Relational and OLAP Storage Engine
Hi Edward, I have tried to go to the Partition tab of BI Development Studio. When i click the partition tab of the Development Studio, it discards an error that " An error prevented the view from loading". Could you please outline me the steps of how to go about this. I am really stack. Ronald I also found this error last week. My data source is ORACLE database. This raised when I used "OracleClient Data Provider" for provider in Data Source. When I changed the provider to "Native OLEDB\Oracle Provider for OLE DB", this problem was solved. Hopefully, this post can help you. Ashari Imamuddin ...Show All
SQL Server OPENROWSET Vs Linked Server
Hi all, OPENROWSET Vs Linked Server Which method is better than other in terms of performance Thanks, Sourabh It really depends. Both allow pass-through query. So, performance wise, the same query would cost you the same. However, Openrowset/datasource is really meant for one time ad-hoc query. You should consider using linked server which provides much more functionalities. ...Show All
Software Development for Windows Vista OnKeyDown event problem in FreeformActivityDesigner
Hello. I'm working on a FlowChart example of Ramrajprabu Balasubramanian ( http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=579662&SiteID=1 ) I'm trying to override OnKeyDown of FlowDesigner (which inherits from FreeformActivityDesigner) My problem is that only few keys are intercepted. Only arrow keys, enter, page up, page down work OK. None other key is intercepted. Similar problem is described in post here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=682589&SiteID=1 Can anyone help I'm particularly looking for intercepting Delete key. Thank You Hi, Unfortunately this is a bug in Workflow Foundation. One possible workaround would be to have properties on the activities that are in the designer that could ...Show All
SQL Server Help!!!!--Problems about the multi column report!
I have a 2 coulmns report ,one group ,when I print the report,it does not paging correctly.For example,suppose every column can display 20 rows, if every group has 20-40 rows ,the print is ok,it can paging correctly,but if one group has 10 rows or more than 40 and less than 60,the two groups will print on one paper,how can I print the every group on different paper Any advice would be much appreciated. Thanks. Hi Did you ever found a solution to your problem I got the same now http://forums.microsoft.com/TechNet/ShowPost.aspx PostID=2720324&SiteID=17 ...Show All
Visual C++ Insert of a New Row in a DataSet
Hi, In every update to a set of String members, I creat a number of local rows on the stack and local within a member function as, DataRow^ newRow = myDataSet->myTable->NewRow(); Then populate the rows with the needed column elements, newRow["myColumn1"] = TheString1; At the end and as the new generated row is accordingly populated, will use the insert function to add it to the DataSet. myDataSet->myTable->Rows->InsdertAt(newRow, 0); The problem is that it works well for a longtime after the application is started, and then all of the sudden as there is an overflow problem with the DataSet, the InsertAt statement does not work and causes change of values in other controls properties within the ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Magenta sprite color comes up transparent?
This seems to be a new behavior in Beta 2, is it a feature or a bug When I draw a sprite with SpriteBlendMode .AlphaBlend that contans the color (255, 0, 255) that color shows up as transparent. Is this to allow an easier way to create transparent regions in your sprites Bill Just as an artist creates images with lines, shapes, the presence and absence of color, etc, etc, a programmer creates games with a slew of tools as well, such as TextureProcessors, GameComponents, and Vectors. After all, a color is simply a varying combination of red, blue, and yellow, as a Vector is a combination of floats. Compare the use of the default ContentProcessor (SpriteTextureProcessor in this ca ...Show All
Visual Studio Tools for Office Word VSTO: BeforeClose, Close, ShutDown and Document Saved
Word 2003 VSTO Solution using C# In my Word VSTO solution, I recently added a BeforeClose() event handler, so I can "restore" Word's commandbars (those I've hidden and whatnot). Since having done this, anytime a close the document using Word's close button (X), I am prompted to save the document. So I added this.Saved = true; in the BeforeClose handler as the last line and yet I'm still prompted to save the document. So I added a Close() event handler and checked the saved property, and sure enough, it's set to false following the BeforeClose() event. So I tried setting this.Saved = true; in the Close event in hopes the Save dialog would not display ... but that does not work!!! For giggles, I called base.Close() in the close event han ...Show All
