theblackhat's Q&A profile
Microsoft ISV Community Center Forums VBA Userform Control of multiple userform controls
I have built a data entry VBA application in Excel so we can input data electronically instead of manually on paper only. I created a series of Userforms to display one at a time to "walk thru" the test procedure and allow entry of the data for one section at a time. The problem I have is that I am trying to use the standard form controls "frmTest.Hide" or "Unload Me" when done with the forms. Then if I wish to redisplay one or more of the forms for re-entry use "Load frmTest" and/or just frmtest.Show if old form just hidden. I am seeing that the old forms are not hiding or unloading and worse when I try to redisplay with either the "Load frmTest" if previously unloaded and "frmTest.show" I get a VBA error that it cannot display ...Show All
.NET Development DataBinding Question
Hey all, Ive been looking at this sub for nearly two days now and its starting to wear a bit thin. Im trying to query my database and display information in various places based on whats selected on my CBO... here is the code; Private Sub formDirectReceipt_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Dim strCnn, strSQL As String strCnn = "provider=sqloledb;data source=pe750-d;initial catalog=TestHSS;trusted_connection=yes;" strSQL = "SELECT [Product Code], [Short Description], Cost, ProductionGroup " & _ "FROM Product " '& _ '"WHERE Product.[Product Code] = @prdCode AND Product.ProductionGroup = @cellVar" Dim da As New OleDb.O ...Show All
Visual Studio Team System False Positive for rule CA1062 ValidateArgumentsOfPublicMethods
I'm getting false positive hits for the CA1062 ValidateArgumentsOfPublicMethods rule. Here's a code sample that consistently throws a false positive: public object GetFirstValue( DataTable table) { if (table == null || table.Count == 0) return null ; return table.Rows[0][0]; } I use this style of validation check quite regularly. Are there plans to update the rule or is there a hot fix Thanks Lee Lee, This is a known false positive. Unfortunately, to be able to fix this rule to handle this situation would require a complete rewrite - something that won't make it into a hot fix or service pack. We do however, plan on improving on this rule in future Visual Studio/FxCop re ...Show All
Windows Live Developer Forums Apply Detail Click
Hi, I have a pushpin onclick code (posted below) and it works doing what it is supose to do but I want to do when you click the pushpin it sends the details (under where you put company name) for the pushpin, not the ID (which it does now) but I cant seem to get the code to do so. This is the part of which needs to be changed but I cant get it (full code below this) content += " onclick='PinClick(" + this .ID + ")'"; Thanks function onPinLoad(pin) { pin.style.zIndex = 102; pin.parentNode.style.zIndex = 102; } VEPushpin.prototype.GetContent= function () & ...Show All
Visual C++ invalid hande while closing CInternetSession and/or CHttpFile
Code: CInternetSession session; CHttpFile* pFile = (CHttpFile *)session.OpenURL(url); DWORD dwRet; pFile->QueryInfoStatusCode(dwRet); if (dwRet != HTTP_STATUS_OK) { SetDlgItemText(IDC_STATUS, "Mali Tablolarin Listesi IMKB sitesinde bulunamadi!"); return -1; } SYSTEMTIME t; CFileStatus fs; if (!pFile->QueryInfo(HTTP_QUERY_LAST_MODIFIED | HTTP_QUERY_FLAG_SYSTEMTIME, &t, NULL)) { SetDlgItemText(IDC_STATUS, "Failed to query date"); return -1; } while (pFile->ReadString(string) != NULL) //bla bla pFile->Close(); delete pFile; pFile = NULL; session.Close(); @err, hr gives "invalid handle" error while closing pFile and/or session. i can`t find why. if anyone knows, c ...Show All
SQL Server Replication Error
I found a problem in replication which we have 3 tables, namely tab A, tab B and tab C replication will apply on tab A and tab B and there is a trigger on tab A and tab B, whenever insert/update on tab A it fires trigger to update tab b whenever insert/update on tab B it fires trigger to update tab C And I found the replication error from tab A on updating tab C. If I manually insert the row, it works fine..... Any advise Thanks in advance! No, actually, the column 'amount_id' is defined as 'not null'. While inserting the row into tab A, it fires the trigger and check the conditions in tab b, and then insert the row into tab c. However, I found the 'amount_id' is defined in the trigger and shouldn't be ...Show All
Visual Studio Team System Performing a GET of 2 different labels
Hi All, I have a bit of a dilemna. During the course of my Enterprise Build, I need to retrieve all of the source code in the current workspace by the label "NextBuild". This label is updated by the Dev Leads when they want to get their projects into the big build. That's not the problem, I have that part working. The problem is that I have all of my build solutions, setup projects and third-party assemblies under the "BuildMaster" label. When I GET the code for the NextBuild label, the local workspace is sync'd with the code at that label. I then GET the BuildMaster label and it is also sync'd, unfortunately, the code in the NextBuild label is not in the BuildMaster label so the whole build gets hosed. ...Show All
Visual C# Convert the following line from Class Diagram to code ?
Hello Guys, I got a class diagram and it had something like this +Find(obj:Object):ICollection<Test> Now to move this to code... I have a Test Class so this is what I did public ICollection<Test> Find(Object obj) { //Now the Test class doesn't inherit ICollection, if I need to return the Result how should I do it. Or do I need to make change to Test class (keeping in mind that code is written by someone else and I can make almost no changes there) } Please advise.... Thanks, Harsimrat ICollection<Test> result = new ICollection<Test>(); I tried doing this and it doesn't work, I get this error... Cannot create an instance of the abstract ...Show All
Visual C# Example of code and problem...
I'm trying to use the equivalent of a union here. I'm getting the following error message - MissinngMethodException was unhandled. The code compiled OK but I get the exception. How should this be coded to work [StructLayout(LayoutKind.Explicit)] public struct DataType { [FieldOffset(0)] public string dstring; [FieldOffset(0)] public int dint; [FieldOffset(0)] public float dfloat; [FieldOffset(0)] public double ddouble; [FieldOffset(0)] public char dchar; [FieldOffset(0)] public byte dbyte; } public struct XMLData { public string Tag; public DataType Item; public XMLData(string tag, DataType item) { th ...Show All
Visual Studio 2008 (Pre-release) svcutil and shared types
Hi I have written a WCF service that uses a DataContract. I own both the server and the client. I wrote the DataContract class in a common assembly that will be referenced by both my client and the server. I was hoping that when i use /r: option in svcutil.exe, the tool will not generate the code for the shared types (the DataContract classes) that are in the shared assembly. But what i see is that it always generate the DataContract classes even if i use /r. Is this expected. What am i doing wrong Here is the command i use svcutil /a /r:interfaces.dll http://localhost:8000/myservice1/mex Is there anything i'm missing Please help. Let me know if you need any more information. The answer i'm really looking for is - "Does WCF support scenar ...Show All
.NET Development String was not recognized as a valid DateTime. XML serialization with xs:datetime
Hi, i've got a strange thing with serialization. If serialize class RequestClearingType on its own, the date in element "ClearingDate" is represented in correct format:<RequestClearingType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ClearingDate xmlns="http://www.intercard.de/XMLSchema/eGateway.xsd">2007-01-25T13:20:31.0445976+01:00</ClearingDate></RequestClearingType>If serialize class eGateway, the element "ClearingDate" is losing its time information.<eGateway xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.interc ...Show All
Visual Studio Express Editions c-mon guys..help me out
I asked for help in my other thread.. button help needed... big problem.... I had a couple of replies...but I am still stuck....can you help please thaks for the replies guys.... but saving the urls is fine for me...as I can save the urls that I want......ie...google.com... but if someone else was to use my browser....I want them to be able to assign the buttons to their preferences... actually I messed up....because I have 10 menu items named site1 to site10......... the idea was to save your favorite sites to the menu items......but my favotite sites are not your favorite sites.... see the problem I need a way to save the menu items to the documents folder....so that the user can change them....... I ...Show All
Visual C++ how to hook the message?
i want to hook the message when i shut down the machine.why it do nothing the full code as follow: #include "stdafx.h" #include "minikit.h" #ifdef _DEBUG #define new DEBUG_NEW #endif HHOOK msghook = NULL; DWORD dwThreadId=0; DWORD WINAPI hookthread( LPVOID lpParam ); LRESULT CALLBACK JournalRecordProc(int code,WPARAM wParam,LPARAM lParam); BOOL WINAPI HandlerRoutine(DWORD dwCtrlType); void resume(); CWinApp theApp; using namespace std; int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) { int nRetCode = 0; if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0)) { // TODO: _tprintf(_T("error: MFC initial failure!\n")); nRetCode = 1; } else { CreateThread(0,0,hookthread,0,0,& ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Animation mesh sample
i see there is a lot of folks that ask for a animation sample well it is all ready been written use this http://dtxna.spaces.live.com/ download it it works with all fbx and xfiles but there is a bug in 3dsmax so what you shood do is export your model from 3dsmax in fbx format and load milkshape up and load the fbx file in and save it agian and you will see it is now working i have tryed 50 diffrent models exported from max 7,8,9 and when i load them in to max again there are errors , some bones are gone , and some times there are missing polys , and animation but when i export from max and load the model into milkshape and save it out again all the models are in smaller size and all is working perfect ...Show All
SQL Server Two report parameters: "Please select a value for the parameter...."
I’ve build a report with Report Design. On this report I want to show the items customers bought. In this report I added a Report Parameter so the user can select a specific customer. I made an extra dataset and use the filter =@customer and this parameter works fine. Then I want to ad a second Report Parameter: the salesperson. When I leave one of the parameters blank, I get an error "Please select a value for the parameter....". Even if I choose the options allow blank or null values, I get this error. What I want is de possibility to get all the records, to filter records from one specific customer or to filter records from a specific salesperson. Have you tried to create a fake value with a ...Show All
