twaltz's Q&A profile
Windows Forms KeyPress event doesn't work In Form with atleast one control
I created a windows application with a form. In this empty form i handle the KeyPress event with OnKeyPress() function. when i run the application and push any key on the keyboard the KeyPress Event is lunched and the OnKeyPress() function works great. now , All i did is add one Button to the Form and the KeyPress event doesn't respond anymore. I run the application and push the keyboard buttons... nothing happens ( doesn't matter which one got the focus). why adding a button to the form disables the KeyPress event How do i solve it thank you. Sorry guys , but my problem is half solved. the keys F1 - F12 and 'delete' 'insert'..... doesn't lunch the Keypress event at all, d ...Show All
Visual Basic SWbemObject class CIM_PhysicalMedia/ WIN32_PhysicalMedia
I am trying to receive the physical media information according to my local CD-Rom drives by using WMI Scripting Object and the related classes. Def: Private oService As SWbemServices Private oSet As SWbemObjectSet Private oSet2 As SWbemObjectSet Private oSW As SWbemObject 'Get Physical Disk Information - working fine Set oSet = GetObject("winmgmts:{impersonationLevel=impersonate}"). _ InstancesOf("Win32_DiskDrive") 'Get Logical Disk Information - working fine Set oSet = GetObject("winmgmts:{impersonationLevel=impersonate}"). _ InstancesOf("Win32_LogicalDisk") 'Get CDROM Disk Information - working fine Dim strServer As String strServer = ". ...Show All
Visual C# Share data between multiple application instances
Hi! Do you know any way to share data between multiple application instances without buffering it in a file or a database (like a static class) Thanks! Hi, You can choose one of the following: 1) Remothing 2) Shared memory (unsafe). 3) Create a window service/com+ application to hold and supply the shared data 4) database/file/xml/exc.. my recommendation is 4 because it is the simplest one. Hope this helps, guy kolbis ...Show All
Internet Explorer Development IE7 and issue with TrackPopupMenu(Win32) within ActiveX-control
Hello. I have a trouble with calling win32-function TrackPopupMenu from ActiveX in new Interner Explorer 7 (RC1 and all betas). The situation is: I have some ActiveX-control - "MyPopupMenu". This control is being used to show context popup menu. To do it, it used win32 function from winuser.h. There's an issue with one of them - TrackPopupMenu. Control has worked fine in IE6, but in IE7 it doesn't. When TrackPopupMenu is called in non-dialog window, nothing happens! There's no popup menu (it was constructed by calling CreatePopupMenu and InsertMenuItem previously). But popup menu still works fine in dialog windows (ones that created in script by window.showModalDialog). Can anybody help me THX. Hi Sergei, ...Show All
SQL Server increase CPU usage
Hi, I have a dedicated MSSQL and MSAS server. When a perform queries, or when i process a cube, my CPU usage is topped at 25%. Since this server is not used for anything else then MSSQL and MSAS I want the CPU usage to be nearly 100%, to have the quickest performance of queries and processing cubes. Any idea how I can accomplish this Greets, Edward ...Show All
SQL Server Populating staging table using SSIS
Hi, I have a flat file with columns from a geographical hierarchy such as: Country Zone State County City Store Sub Store , etc. The file also has data columns for months to the right of the above columns such as: Jul Aug Sept ......... basically 25 of these columns for two years' data for one product and another set of 25 columns for another kind of product. A typical record in the file looks like: Country Zone State County City Store Substore USA Southeast FL Hillsborough Tampa walmart Fletcher May04_ProdA ....Jun06_prodA May04_ProdB...Jun06ProdB 144 160 180 158 I need to upload this data into a staging table in SQL Server 2005 ...Show All
SQL Server MDX Query to display no records for empty rows
Hi, I am facing with the following problem. I am using bar chart to display my report. My MDX query is as follows: SELECT NON EMPTY { [Measures].[SUM_COUNT] } ON COLUMNS, TopCount ( Filter ( {[DIM].[NAME].[NAME]}, [Measures].[SUM_COUNT] <> 0 ) , 10, [Measures].[SUM_COUNT] ) ON ROWS FROM [USAGE] where <criteria> I want to show the topmost 10 records. For some criteria I get the results in the chart. But for some criteria or say for wrong criteria, there are no records. In such a case the X-axis contains all values for {[DIM].[NAME].[NAME] and value for the Y-axis is all 0. Its kind of blank report it will restrict to 10 records. In such a scenario I want to show a message to the user saying "No re ...Show All
Visual C# How to get a Structure of Function Ptr from Native DLL in C#
Hi All, I have a serious problem here which is bugging me for past few days. I have a native DLL(Win32), and it exposes only on function called GetFunctionList Now this function takes a pointer to pointer of a Structure as an argument. The Structure is something like struct func_pointer_list{ void (*fnA)(int a,int b); int (*fnB)(float a, double b); } Now I have to write an Wrapper for this Native DLL in C#. What I did was I wrote an Structure in C# containing some delegates like this.... [UnmanagedFunctionPointer(CallingConvention.Winapi)] public delegate void pfnA(int a, int b) [UnmanagedFunctionPointer(CallingConvention.Winapi)] public delegate int pfnA(float a, double b) [StructLayout(Lay ...Show All
Visual C# Cut String in two parts
Well, i have the some strings like "msiexec /l xxxxxx", "C:\Arquivos de programas\xx.exe -blablabla" I need to get the everything before the space as "string1", and everything beforce the space as "string2", how could i do that thanks checking with my VS IDE... 1. the separator character is required for the string's Split method. 2. using a string separator requires a 2nd and or 3rd parameter for the Split method (your sample code will raise an exception) ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Default Project Folder Settings
Is there anyway to edit the default program folder settings Any new project added would be by default saved under c:\dev\xna . Oppose to C:\Documents and Settings\Evan\My Documents\Visual Studio 2005\Projects... (little frustrating to navigate to under cmd ) That is actually a function of the Express IDE, and is easy changed. Go to the tools -> Options menu from the top menu bar, you will then be presented with an options dialog, next at the bottom of that screen there is an option to show advanced settings, selelct this. This will show you some more options that you can change, included in this is a projects and solutions option, inside this is the default location for the output files. ...Show All
SQL Server share report
I got the following in my report server log: w3wp!library!1!01/29/2007-17:15:39:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information., SharePoint content service is null. Report Server may not have joined the SharePoint farm, or Report Server service account may not have been granted access to farm.; Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information. I tried to make the report server integrate with share point 2007. all servic ...Show All
Visual C++ re help!
i have this error lnk 2019 how to fix it Don't you think that's kinda vague for us to help you What I can say is that you start from here, http://msdn2.microsoft.com/en-us/library/799kze2z.aspx . ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA losing sync when in full screen mode
Hello, I'm having a problem with XNA changing the update() speed when I go to full screen mode; in window mode my fps counter returns 60 which is right, my tft runs at 60hz. The problem is that in full screen mode the fps counter shows me 75; it seems that update() is being forced to 75hz somehow, while my tft drops back to the 60hz it can handle....this results in all sprite movement becoming very jerky. I've tried using: this.IsFixedTimeStep = true; this.TargetElapsedTime = new System.TimeSpan(0, 0, 0, 0, 16); to fix the problem but it still happens and I cant work out why, is this a known issue to anyone Hi, Yes I'm using: this.graphics.SynchronizeWithVerticalRetrace = true; I tried setting full screen to match ...Show All
Visual Studio Team System Cannot run Team Edition for Database Professionals if not local admin?
Hi there, It's very annoying at our work, but we are not local admins on our machine while logged into the domain. We do have Administrator rights only when we log in as local Administrator to the machine. So when I install the CTP, I execute the setup under the local Admin account, and it installs fine, and runs fine when logged in locally. But, when logged into the domain, it does not show up as an installed product under Help -> About. I do not have this problem with any other product ie I have the BI studio, team edition developer, team edition tester, etc running fine. Any thoughts on how to get the ctp to install and run properly for me Will this work in the future Because if it doesn't we have to go buy a few licenses of ...Show All
Visual C++ errC2719 formal parameter t with declspec(align(16) won't be aligned??
I have no idea how to fix it. Any suggestions appreciated. typedef union { struct { __m128d xxx,yyy;} __declspec ( align (32)); double a[4]; } vDouble; static inline vDouble vShuffle1dx(vDouble t, int a, int b, int c, int d) { vDouble result; result.a[0] = t.a[3-a]; result.a[1] = t.a[3-b]; result.a[2] = t.a[3-c]; result.a[3] = t.a[3-d]; return result; } Hi, Have u included the header < emmintrin.h> ...Show All
