oha_li's Q&A profile
Windows Forms MultiLine Listbox (VS 2005)
Hello, I am attempting to make a listbox that allows each item to span multiple lines. I have made it owner drawn and am capturing DrawItem and MeasureItem. It all works great, except, when I resize the control, MeasureItem is not triggered. Is there anyway to force it to recalculate the size of each item when the listbox is resized Also, does anyone know of an easyway to be able to display richtext in a listbox This behavior is by design. The standard Windows control behavior is that WM_MEASUREITEM is sent when the listbox is created, and not thereafter. We (Windows Forms) discussed this and we decided to ...Show All
.NET Development Trying to understand .NET
Greetings Everyone, I've trying to teach myself c++ programming from books, online tutorials and references. I've read a good deal of stuff and have some basic understanding of what is going on, such things as what are classes, basic built in types, templates, libraries,operators, loops and if statements... etc ( Though I may not understand how to use them all effectively yet. ) It was recommended to me that I should download the C++ Express Edition, that it was a really good set-up for windows programming. I did. I love alot of the features that brings to the table. It seems like a really nice IDE..... But now I find myself scr ...Show All
Software Development for Windows Vista IWshRuntimeLibrary re-distributable?
Hi. I just like to know if the COM file "IWshRuntimeLibrary" is re-distributable In other words, can I include this file in my installer and give it to people I want to make sure before I go ahead and do this. The reason I need this is because my application has an update feature and I would like to update the user's start menu pointing to the newly updated application and so far, this is the only way I found - by using the IWshRuntimeLibrary COM Component. If there are any other, perhaps better ways, then please feel free to let me know. Thanks! ...Show All
Windows Forms Redrawing buttons...using inheritance
Hy, I'm interested in How can I iherit and redraw a controll > button, textbox, toolstrip menu etc. I have been searching for tutorials and documentation and I haven't found anything yet. I'm trying (for example) to make a hexagonal button.> to redraw it (not to draw one whith the gdi....i know how to do that)....I whant to inherit it from vb and redraw it... How hard is this Are there any tutorials Have you done this before Ok...i'll be more precise: I know that visual basic offers the possibility to "work" with the properties of buttons, menus, forms... What I whant to do is,<an example> shape a button how I whant.. ...Show All
Visual Basic Build Complete Notification Sounds
I just upgraded to Visual Studio 2005 from VS6.0 and I cannot find any documentation for Visual Studio sounds schemes. In VS6.0 I could have seperate sounds for "BuildComplete", "BuildError", and "BuildWarning". In Visual Studio I can only create a sound for VS_BreakpointHit Are any of the others available The three I mentioned in my post BuildComplete, BuildWarrning, and BuildError. I found I didn't need notification for every warning or error durning the build, but an all done sound was very usefull. Some sounds when doing a "Find in Files" would be nice as well. &nb ...Show All
Visual Studio 2008 (Pre-release) WPF is going be absent in First Vista Release
Hello all, I am reading on some news groups that WPF is not going to be there in initial release of windows vista. Does anyone knows more about it I cannot imagine vista without WPF. Any thoughts from experts Thanks Basav Until it is final, it is not final. That said, the last I heard (At the Mobility group partner briefing this week), is that WPF will be on the Vista CD, but will be an optional component that the user must select to install. It will not be installed by default. This is largely because the WPF and WCF components install together, and WCF has a large security surface. ...Show All
Visual Studio Team System C++: Erroneous C6011 warnings (Dereferencing NULL pointer)
I seem to be getting Code Analysis for C/C++ warnings in managed C++ code regarding reference handle parameters. It doesn't happen all the time; and seems to occur for all reference handles for specific managed methods (static methods, in this case; but not all static methods). When the warnings do appear they appear when accessing a reference handle parameters as well as lines that don't access any reference handles or pointers. An example that is giving me errors may appear (this code on its own does not generate warnings; but is a subset of code that does) as follows: 11: public ref class MyClass abs ...Show All
SQL Server The database 'x.MDF' cannot be opened because it is version 611. This server supports version 607 and earlier??
Hi, I have tried to attatch a database ,created by SQL server Express within a C# application , in SQL server 2005 Enterprise edition, but the following error message appears: ----------------------------- TITLE: Microsoft SQL Server Management Studio ------------------------------ Attach database failed for Server 'MEDO'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink ProdName=Microsoft SQL Server&ProdVer=9.00.1187.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach database+Server&LinkId=20476 ------------------------------ A ...Show All
Visual Studio Language Service handling TODO comment task items
C#, VB.NET etc generate Task items from TODO, etc in comments. Is there an easy way to do this in the Managed Language Service Afterall, if you've got a Colorizer then it should automatically be able to identify comments and search them for the relevant tokens. It also has an TaskProvider - though this seems to be tailored towards Errors. Would appreciate any suggestions, or advice on how to proceed. Thanks Mark. Could one of you please post your solution code for this, I've been unable to find a solution for this same issue myself. I've managed to add tasks to the Tasklist in the FDoIde but I hav ...Show All
SQL Server Using an ADO recordset destination in a pipeline
I am able to get data into a Recordset Destination, but now I want to put that data back into a database. Basically I want to use the Recordset as a source. I want to insert the data back into SQL, and hopefully other DBMS's. Can this be done easily Any code samples, or places to find them. I am not a programmer, so the better the instructions, the better. You can not simply use your RecordSet as a source. That is not what it is designed for. You can definitely loop over the rows in the recordset and do something with them. The following ...Show All
Windows Forms Search for values in a comboBox
Is it possible to search for a value in a comboBox when I type in the comboBox For example, I have a comboBox that is populated with Suburbs of Australia. I wish to allow the user to type in the comboBox for example the first 3 letters of a Suburb lets say Wes and it will take them to the first record that has the first 3 letters of Wes and the full Suburb name is West End. has anyone ever done this Ok. So I have the following sub. However, which event on the combobox do I put it on to get AutoComplete to work private void GetSuburb() { int iFoundIndex; iFoundIndex = this .cboSuburb.FindString( ...Show All
SQL Server Neither the partner nor the witness server instance for data...
I am getting this error while trying to setup mirroring. "Neither the partner nor the witness server instance for database "shop" is available. Reissue the command when at least one of the instances becomes available. (Microsoft SQL Server, Error: 1431)" I am just using principal and mirror server, there is no witness server. I have tried fully qualified name and ip for the servers also. I can connect from the principal server to the mirror server using the management studio and it also creates endpoints on prinicipal and witness. But then gives me an error that it cannot find the instance of the mirror server and if ...Show All
Visual Studio 2008 (Pre-release) date picker not available, someone already working on it?
Okay, so I'll be the first to whine about this: it's been said in some video's and a few blog posts that there will not be a datetimepicker for avalon provided by microsoft. Is that true If so, is someone working on this / planning on going to work on it I'm probably going to need this pretty soon, and I think it's a bit too involved to just do myself. Regards Ruurd, Thank you for raising this question. DatePicker will not be in v1 but will be very likely in later release. We are looking into providing DatePicker sample for use in interim. Regards, Pung Xu ...Show All
Windows Forms Passwords in DataGridView
I need to display usernames and passwords in a DGV, and I have 2 questions : How do I display the password as a string of asterisks Right now, I am storing them in a List<string>, and then doing something like this foreach ( DataGridViewRow row in dataGridView.Rows) { string s = "" ; for ( int i = 0; i < passwordList[row.Index].Length; i++) s += "*" ; row.Cells[ "passwordColumn" ].Value = s; } Is there a better way to do this When the user sorts by a column, and then "unhides" the passwords, the order of the passwords is incorrect. This is because upon unhiding, ...Show All
Software Development for Windows Vista Beta2: BatchEnvironment.CurrentInstanceId
In Beta1/1.2 you could find out the current workflow instance ID using the BatchEnvironment.CurrentInstanceId property. Is there a way to do this in Beta2. In my code the local service needs to know the current instance ID so that it can fix up some external databases. Thanks, David. ...Show All
