Looper_Kwok's Q&A profile
Community Chat OwnerDrawn TreeView Control
This is a TreeView control, started as an experiment, which inherits from the standard TreeView control in .NET 2.0. http://codegallery.gotdotnet.com/Treeview2 It's source code only, as a standard .vb file. Add it to a project, add some nodes, add an Image List and play around with it. Note that all the drawing is done in the paint event. The coloring for the highlight is fixed, but is easily changed. Same with the parent gradient coloring. The horizontal scroll bar does some funky stuff; consider it a bug. You'll have to deal with it :) That's starting to look nice. If I may offer some constructive criticism, you should not let the selection box be interrupted by the icon like that. Either: 1) Just do not draw the po ...Show All
Smart Device Development New menu item in Outlook Contacts Menu
Hi! Like the example that goes with WM 5 SDK, just Medical History example, " C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Medicalhistory\ MedicalHistory.sln ", i'm traying to make the same in Smartphone application, but i can't, and i don't know why this example don't works properly .. I'm developing a smartphone's app that's works with outlook contacts and i need to add menu option in the standard outlook contacts menu, just like a "plug-in" to add special information when future users add new contacts .. please!! Help me!! Hi! Like the example that goes with WM 5 SDK, just Medical History example, "C:\Program Files\Windows CE To ...Show All
Gadgets Looking for sample javascript (not vbscript) to access WMI Objects
Specifically, I'm trying to get the readyboost parameters: "ReadyBoost Cache", "Total read bytes/sec" Thanks Peter Kellner http://peterkellner.net ASP.NET, MVP You'll be after "Win32_PerfFormattedData_EmdCache_ReadyBoostCache.TotalreadbytesPersec". But you won't be able to read this without Elevated Admin rights, so it's going to be pretty useless! Here's the code: var oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!//./root/cimv2"); var cItems = oWMI.ExecQuery("Select * from Win32_PerfFormattedData_EmdCache_ReadyBoostCache"); var cItem = new Enumerator(cItems); for (; !cItem.atEnd(); cItem.moveNext()) { var cacheSize = cItem.item().Bytescached; var totalRea ...Show All
Visual Basic Flat text File Read in Dilemma!
I have a file I need to read in. Easy right Here’s the catch. Its 17k+ records than all end in a vbLF. If they ended in vbCRLF the following would work but they Don’t so its not. Current Code: StrPathToFile = "Filename" OpenReadFile Do ReadFile DoWhatNeedsToBeDoneHere Loop While Not EOF(#ntFileNum) Inputs used: Public Sub OpenReadFile() intFileNum = FreeFile Open strPathToFileIn For Input As #intFileNum End Sub Public Sub ReadFile() Line Input #intFileNum, strCHRecord End Sub It takes in the Whole file as one string ...Show All
Visual Studio Sandcastle February CTP
I got several emails about the next release of Sandcastle. I plan on releasing a CTP version by the end of this month. We currently are working on fixing bugs to ship Orcas (Visual Studio 2007) Beta 1 documentation with Sandcastle code base. I will post a blog ( http://blogs.msdn.com/sandcastle/ ) by next week about what's expected in February CTP. Cheers. Anand.. ...Show All
SQL Server getting duplicates with Select Distinct (full outer join)
I am writing a script to create a audit trigger on any table. I am getting duplicate rows inserted into my audit table, only for the primary key columns. Anybody see why Right now I am debugging an Insert, so I think you can ignore the "U" update part of the Where clause. ....starts with other code to determine columns and primary key fields for selected table.... --get number of columns select @rowId = min(RowId), @MaxRowId = max(RowId) from #tblFieldNames -- Loop through fields and build Sql string while @RowId <= @MaxRowId BEGIN SELECT @fieldname = colName FROM #tblFieldNames WHERE RowId = @RowId SELECT @sql = 'insert tblAuditAdmin (TableAltered, [Action], FieldName, OldValue, NewValue, UpdateDate ...Show All
Windows Forms PrinterResolution PrintDocument PrintPreviewDi
Hi, I am wondering how one changes the PrinterResolution of the printdocument. I have need to use the full printer resolution, which is 1200 by 1200. I'm using the printpreviewdialogue component to show and then print. Problem is the PrinterResolution is stuck at 600 x 600. Where can I change this so that the printpreviewdiolgue has this resolution, as well as the printer I've tried stuff like this: this .docprint1.PrinterSettings.DefaultPageSettings.PrinterResolution.Kind = System.Drawing.Printing. PrinterResolutionKind .Custom; this .docprint1.PrinterSettings.DefaultPageSettings.PrinterResolution.X = 1200; this .docprint1.PrinterSettings.DefaultPageSettings.PrinterResolution.Y = 1200; But when the print ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Revision Control included in XNA?
I heard XNA will include some sort of Revision Control, some kind of Perforce or SubVersion directly included in the package. Can someone confirm that Subversion is really nice source control. I especially like the fact that I don't need to manually "check out" files. ...Show All
.NET Development Setp-Out and Exception filters
One more followup question. If during a step-out, an exception is thrown, when the stepper completes, it appears that the filter frame is set up, and the IP points to a filter. Is this the step-out quirk you described that turns the stepper into a step-in That could be an consequence of the Step-out quirk. If the filter invocation acts like a Unmanaged --> Managed tranistion, then step-out would stop there because of this quirk. However, I just did a quick try with MDbg and didn't see that happening. If an exception is thrown and caught before the function returns, step-out will run past it as expected. If an exception is thrown but not caught before the return, the stepper will stop in the ca ...Show All
Visual Basic know the caller function name?
Is there a way from inside a function know the name of the function that called it Sub main() p() End Sub Sub p() Dim s As New Diagnostics.StackTrace Dim f As Diagnostics.StackFrame = s.GetFrame(0) --> p Debug.WriteLine(f.GetMethod.Name) f = s.GetFrame(1) Debug.WriteLine(f.GetMethod.Name) --> main q() End Sub Sub q() Dim s As New Diagnostics.StackTrace Dim f As Diagnostics.StackFrame = s.GetFrame(0) --> q Debug.WriteLine(f.GetMethod.Name) f = s.GetFrame(1) Debug.WriteLine(f.GetMethod.Name) --> p f = s.GetFrame(2) Debug.WriteLine(f.GetMethod.Name) --> main End Sub ...Show All
SQL Server Can connect to sqlexpress but not the DB ?
whenever i try and choose the database i wish to work with like below. I end up with an error message about the user not being associated with a trusted sql server connection cnStr = @"Data Source=server\SQLEXPRESS;Initial Catalog=sqldata;User ID=blah\me"; same with this one cnStr = @"Data Source=STOCKYARD\SQLEXPRESS;Initial Catalog=DB;Trusted_Connection=Yes;"; i figured this was all permission based so i kept dorking around with security adding my user name to anything i could find, and also went through and dozen or so connection strings and found when i take out the DB name that i can open a connection.... as the code below works... cnStr = @"Data Source=Server\SQLEXPRESS;Trusted_Connection=Yes;"; cn.Open( ...Show All
Visual Basic Parseing text file
Hi All, I've serached the formums for this and have foudn the following links which is part of what I want to do http://msdn2.microsoft.com/en-us/library/microsoft.visualbasic.fileio.textfieldparser.aspx http://msdn2.microsoft.com/en-us/library/x710fk43.aspx The 1st of these two links is more what I want, however in the file I'm loading the delimeter may not always be the same for each row. The records will all follow the same format, for example --> Row1, Field1, Field2, Field3;Field4,Field5, Field6:Field7, Field8 Row2, Field1, Field2, Field3;Field4,Field5, Field6:Field7, Field8 As per the example here, between Fields 3 and Field 4 on every row there is a semi-colon ";" as a delimeter and between Field6/7 ...Show All
Visual Studio Tools for Office VSTO SE + Office 2003 + VS 2005 Pro
This is more of a Getting Started type of question. For some reason, I'm not finding any kind of basic tutorial that covers building an Add-In using VSTO SE (Beta) + Office 2003 Pro + Visual Studio 2005 Pro. The document that comes with VSTO SE Beta describes how to build a Ribbon, Custom Task Pane and a Custom Form Regin but all for Office 2007 components. I'd like to build an Excel 2003 add-in (or whatever) that displays a button to my end-user. Once the button is clicked I'll grab some data from the current/active worksheet, send the data to a web service and then take the results of the web service call and poke it back into the current worksheet. I've been able to do this in old school VBA (plus the now unsupported SOAP Toolkit) b ...Show All
SQL Server What decides on the tables available for a partition?
Hello, I am using the Partition Wizard. On the first screen (Specify Source Information) there are two tables listed. They are called: QMR_610_MembersOther_GrAmountAnalysis QMR_610_MembersOther_ReinsShareAnalysis Only one of those (the first one) is used as the fact table for the measure group that I am creating partitions for. So what I don't understand is why its making these 2 tables available for my partition. Can anyone explain how the Partition Wizard determines which tables are available for the partition Thanks Jamie Hi Jamie, think that the partition wizard only is doing the things his developers expected him to do - therefor the answer will be "this behaviour is by design"... ;-) ...Show All
Visual C++ Error while registrating Dll .
Hello all, I have created one google desktop addin while registering using regsvr32 ..i am getting error as ; ' Your administrative policy does not allow u install Google Plug-ins’ ' Can anyone help me Regards, Rups ...Show All
