hazz's Q&A profile
Windows Forms Display ListViewItem ToolTip for Entire Row
Hi, I'm having trouble getting a ToolTip to display for my list view. It's likely that the list view will be too narrow to display all of the columns so I want to pop up a tool tip displaying the item when you hover over it's row. The problem is I have fullrowselect = true so it only shows the ToolTip when hovering over the item, not the subitems. I've tried this: private void lvPeople_MouseMove( object sender, MouseEventArgs e) { ListViewItem it = lvPeople.GetItemAt(e.Location.X, e.Location.Y); if (it != null ) { toolTip1.SetToolTip(lvPeople, it.ToolTipText); } } and I get no tooltips at all. Change the GetItemAt() call to this: ListViewItem it = lvPeople.GetItemAt(0, e.Location.Y); ...Show All
Visual Studio Express Editions Right click...
Hi... I have 2 doubts, 1. How to get the menu handle which appears when the user right clicks in slideshow window 2. Is there a way to write our own code for the selection of the menu item from the menu which appears when the user right clicks in the slideshow window... Plzzzzzzzzzzzzzzzzzzzz someone help me in this... I think you mean you want a Context Menu Strip. Ok, 1st go to the toolbox and drag a context menu strip onto the design tab(anywhere). Then click it's icon down the bottom of the design tab it should appear on the form, dont worry it wont be there at runtime, from there you can edit the items like you'd edit a menustrip, double clicking to chance code etc. Now ...Show All
SQL Server Error Loading SSIS package - CPackage::LoadFromXML fails
When I try to load an SSIS package via C# code I get the following error message:- "The package failed to load due to error 0xC0010014 \"One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.\". This occurs when CPackage::LoadFromXML fails.\r\n" The code is pretty straightforward:- Application app = new Application (); PackageEvents evts = new PackageEvents (); Package pkg = new Package (); Package pkg = app.LoadPackage("C:\\Documents and Settings\\dominic_s\\My Documents\\Visual Studio 2005\\Projects\\SSIS_Util\\bin\\Debug\\DTS\\Cle ...Show All
.NET Development Sharing library between embed web server and application
Hi, I'm making an application that embed Cassini as web server to command application with WebServices. The Web Service and the application use both a library that I'll call "myLib.dll". If I compile both with references to this library, the application copies it on the root directory and the web project copies it on the "bin" directory. So during the execution, the application and the server use different libraries, so the static variables have bad values. I would like the web server and the application could call the same library, ie that cassini loads it from the root or the application loads it from the bin directory. I try since one week with no results. It would be great if someone could help me. Thanks in advance. ...Show All
Smart Device Development multimedia with WM5
Hi, I am trying to use WMP10 on window mobile 5.0 from c++ and would like to know if I need to install WMP 10 SDK Reference to other useful link or thread related to this topic would be great. cheers, Yes, install the WMP10 SDK. The type libraries are compatible in that they use the same GUIDs. WMP10 Mobile simply does not implement some of the interfaces or methods/properties, so you need to watch for E_NOINTERFACE when doing QI or E_NOTIMPL when calling a method or getting/setting a property. Also the documentation includes references to WMP10 Mobile and whether the particular functionality is supported on it ...Show All
Visual Studio Team System Delete Field Error?
I am working on our process template and I have a custom field I added as a PlainText field. I later wanted to change the field type to HTML. I deleted all the projects using the template. I deleted the template. I used witfield.exe to delete the field, and if I try to delete it again, I get an error, so I assume it's gone. I changed the template to have the HTML field type. I cannot use the new template. I get the error that my field used to be of type PlainText and I am trying to redefine it as HTML. Am I missing some step somewhere Or could it just be a caching error on the server I had followed all my field names with a number, indicating the version of the field, when I put th ...Show All
.NET Development Derived types and System.Collection.Generic.Dictionary?
Hi, I have a Dictionary in one of my classes: private Dictionary<string, RobotPart> _parts = new Dictionary<string, RobotPart>(); RobotPart has many derived Classes (Rod, Joint, Body, etc.) . I have a method called GetFlatPartList that flattens out a treelike structure of RobotPart objects, for easy iteration through the child objects. Hopefully, once I hit "post" my tabs will be kept for the following method: EDIT: I took this method out, and placed it in the following post for readability Now, my problem is that my program will crash, giving me an invalid cast exception when I am trying to search (using a for each statement) for any Type other that RobotPart, even though they (Joint, Rod, Body, etc.) are ...Show All
Visual C# Getting a context menu to popup
I tried to find a post that answers my question to no avail. Therefore.... I have a NotifyIcon with an attached ContextMenu. I want the ContextMenu to show on NotifyIcon's Click event, not just when right-clicking it. I looked at ContextMenu.Show, but it requires a control to locate it and I've hidden the form before setting the icon visibility to true. Can someone point me in the right direction Thanks in advance! ...Show All
Visual C++ Is there any funciton which can tell me my computer is busy or not in vc ?
Is there any funciton which can tell me my computer is busy or not in vc Martin - That is very kind of you to provide source code! Thank you. I noticed the source code has both a GetCpuUsage ( ) function and GetCpuUsage(LPCTSTR pProcessName) that appear to be almost identical, with one minor exception. You first start with LONGLONG lnValueDelta = lnNewValue - lnOldValue; double DeltaPerfTime100nSec = (double)NewPerfTime100nSec.QuadPart - (double)OldPerfTime100nSec.QuadPart; double a = (double)lnValueDelta / DeltaPerfTime100nSec; The question is: what is lnValueDelta The amount of IDLE time GetCpuUsage ( ) uses: double f = (1.0 - a) * 100.0; CpuUsage = (int)(f + ...Show All
.NET Development The conversion of a char data type to a datetime data type resulted in an out-of-range datetime
I am putting the current datetime in a microsoft sql server database in the following manner: System.Data.SqlTypes.SqlDateTime time = new System.Data.SqlTypes.SqlDateTime(DateTime.Now); sql = "insert myTable (datetime) values ('" + (string) time.ToSqlString() + "')"; SqlCommand cmd = new SqlCommand (sql, conn); int result = cmd.ExecuteNonQuery(); the column of my table has datatype DATETIME I tried it 7 times yesterday and today without problem. Now (at 00:45 hours) I get an exception: the exceptionmessage: System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. I have three questions: 1. how can the date b ...Show All
SQL Server Please Help! "Out of present range" error in SSAS 2005
When I run the following MDX Statement from SSMS select descendants ([Stores].[Stores].[All Stores],Store) on columns from MyCube I get the following error Executing the query ... The following system error occurred: Out of present range. . Execution complete However, when I run the following, I get no error: select {[Stores].[Stores].[Store]. members } on columns from MyCube What can possibly be causing the "Out of present range" error What does this error mean Does it have to do with the Stores dimension Or with the cube itself Reprocessing the whole DB didn't help, nor rebooting the server. We have an undertermined number of queries using the above construct, and all of a sud ...Show All
Visual Studio Team System How to use admin user at TeamServer PC to unlock the file locked by other user at his PC?
For example: 1--Project Name: $OKProject/TTD 2--User Name: A, his PC is named A_PC, his workspace is named A_WorkSpace. His workspace local D:\OKProject at his PC . 3--He lock a file : TT.cs. 4--I, admin, my username : liujj, at Team Foundation Server PC, my workspace on the server pc is named liujjWorkSpace. My worksapce local E:\OKProject at ServerPC. 5--I must use ServerPC to unlock this file by Team Server Admin user. 6--I search 'unlock' on MSDN, find some ways, but when I use 'tf lock /lock:none /workspace:liujjWorkSpace E:\OKProject \TTD' command , that not succese. 7--I have try : If this file is locked by me and locked at TeamServer PC, this command is OK. 8--My Team Foundation Server is workgroup, not Dom ...Show All
.NET Development problem with install my vb.net application
hi, i build small application in VB.NET that works whith access' DB i did "publish" to it, and its works fine on my computer. but when i tried to install it in another comupter, i got the message: the application requires that assembly stdole version 7.0.33.0 be installed in the global assembly cache(gac) first. anyone know what i can do with it thanks See if the following helps: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=158186&SiteID=1 ...Show All
Visual C++ "Custom build step" of a project: execution rule ?
Hi, I am presently using "Visual Studio 2005". I defined a project to generate a DLL X but I needed to do other operations on this DLL X to generate a file Y. So I added a "Custom Build Step" on the project file to generate the Y file. I defined Y as the output file and I even added X as an additional dependency file. I changed the execution order of the Custom Build Step and put it before the "Post Build Event". The problem is that the generation of Y seems to be unpredictable. Sometimes the "Custom Build Step" doesn't run, even if Y is outdated compared to X. And sometimes the "Custom Build Step" always run, even if Y is newer that X... In both case the configuration seems the same. So I don't understand how it is supposed to work. I rea ...Show All
SQL Server Error "An attempt to attach an auto-named database for file"
Hi, I've just created my first projects using Visual Studio 2005 and SQL 2005 Express. This is the basic; One windows service is created that updates a database. The windows service running under "Local system" account One windows application where a user can see data (and change) from the database A common business and dataaccess layer/project is used by both applications Connection string to the database: "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Data\Database.mdf;Integrated Security=True;Connect Timeout=60;User Instance=True" Both application is located in the same directory. When the computer starts the windows service starts and works perfectly. But when a user starts the win ...Show All
