OmegaMan's Q&A profile
Windows Forms Capturing Keystrokes
Is there a way i can capture application-wide keystrokes in my application Basically, i want an event to fire whenever i press Ctrl+Shift+C anywhere in my application. It only needs to capture it if the application has focus i.e. i dont need to capture keystrokes sent to other applications. Is there an easy way to do this, or an example someone can give me for it If only there was a in MyApplication_Keydown in the application events section... You can do this by registering and IMessageFilter object that will handle the WM_KEYDOWN message enabling you to handle the event application wide. The only restriction I'm aware of is that you won't receive the message while a message box is shown (in ...Show All
Visual Studio Team System Problem in TFS API about member setting
I'd like to know which API can i use to set a new member id into TFS project group. for example, i establish a TFS server " http://TFSM:8080 ". There is a team project "TP1". A user "voltafil" which is added into AD on TFS Server. Which API can i call to set "voltafil" as a member of TP1 Maybe set "voltafil" as a group member of "Administrator". The tool to use is tfssecurity.exe with /g+ option. IGroupSecurityService has AddMemberToApplicationGroup method to add users to a group. You could get identity of an account using ReadIdentityFromSource method. Here is a sample for using IGroupSecruityService and getting list of user identities in ...Show All
Visual Studio Express Editions Recording MP3 FIles
Hi, I am making an audio recording program and i am wanting to know if it is possible to record audio from a selectable source (Microphone or Line In) and save it to a file in a user selected directory. I have a dropdown box with the items: 'Line In' and 'Microphone' and named 'inputselect'. A textbox for the folder to save to named 'tbsavedir' . Another text box for the file name called 'tbfname' . And finally two buttons named 'recstart' and 'recstop' for starting and stopping the recording. Any help would be great. the managed DirectX SDK has those exact samples! you can do it but you would require managed DirectX to do this, there are samples in there (with full source) so you can look at it and use it if you like http:/ ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Exchange Frame Buffer for Texture
Greetings everybody, My Problem is that I need to "grab" the Output from the Framebuffer, no matter what it currently displays, and use these frames as textures for further manipulation in Direct3D. The difficult thing here is that I don't want the Application to first write the complete Frame in the normal Framebuffer, then read it to a texture but directly set the Texture as the Framebuffer, alter the texture and finally write the altered Texture into the normal Framebuffer for display. And this shall not work only for 3D-Rendering or Video-Display, but also with normal Desktop-Apps and even the bare Desktop itself. So I think I must find a way to reroute the Frames heading to the Framebuffer for display to "my own" F ...Show All
Visual C++ C++/CLI Types
Hey All, When I was using Managed C++ back in the old days of VS03, I remember being very careful to use Int16 instead of short, and Strings instead of std::strings. I'm wondering how much of a difference that makes w/ the new CLI. Is "int" equivalent to "Int32" as far as garbage collection and such Also, I caught myself doing this today when I declare variables. String ^str; but when i do my arrays, I put the handle like this... array<String^>^ str; Where is the 'proper' place to put the cap The standard just defines something like this sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long) ...Show All
SQL Server sql data types vs is data types
Hi, I want to store a decimal value which I get from an execute sql task into a package variable. Which data type should I specify when creating the package variable Thanks, Tom Jamie, If I store my recieved decimal value in a float variable and further on I want to insert this value in another table (into a decimal column, so in the parameters tab I select as data type decimal again -otherwise the db complains-), I get this great error: "Error: The type of the value being assigned to variable "User::TechnicalPrime" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object." So I don't know how you guys do this but just switc ...Show All
Windows Forms row headers column sizing problem
Hi , i have a datagridview that displays the dialy status for all the rooms in a hotel. I have the room numbers show up in the row header , but the size of the column is extremely small. This is how it looks : hxxp://gidisrael.googlepages.com/resize_prob.jpg and this is how it should look : hxxp://gidisrael.googlepages.com/size_prob2.jpg ( i've rezised the column manually with the mouse) I tried changing the ColumnHeadersHeight Property via the property window at design time and it does let me , the value remains 18 , and i set the ColumnHeadersHeightSizeMode to AutoSize could i perhaps change it pragramatically! Could someone please help me! Hi, The property "RowHeadersWidth" should be the value to change... And ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Second series (13 parts) of 3D XNA tutorials finished +flightsim
Hi all -- I have finished porting my second series of tutorials to XNA final code! You can find it here: http://www.riemers.net/eng/Tutorials/XNA/Csharp/series2.php Some of the XNA concepts covered in this second series include: textured triangles, importing a Model and using a custom effect to render it, first-person camera positioning, basic 3D position updating mechanism, basic boundingsphere collision detection, point sprites, alpha blending, textured model loading with storage of its textures More basic stuff is shown in the first series. Readers are combining all concepts to build a basic, but working flight simulator. The code of my 3rd chapter (a detailed introduction to HLSL) has already been converted to XNA final code ...Show All
Visual Basic how to use Object as any component
Hi, I'm developing skin application for smart device by using visual studio 2003 and 2005. i need your help. my problem is how to use Object or Control as any component like PictureBox, ListView, ListBox... For example: I have one form which contains two Pictureboxes, one ListView, one ListBox, and one Panel. i have to set location and size of all components in many time when the program runs. Now i am setting Bounds for all components in every events. it is too increase code length. I think i am going to create one function which is used to set location, size, and Image (if it is picturebox control). In that function has one argument. what my question is which type i have to declare for that argument ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Packaging assets
I haven't got into using XNA as of yet, however I very much like the idea to play my games on the Xbox360 (blah blah blah). I see that the XNA team has put large amounts of effort into some asset management in XNA, that includes the XACT audio cues for like "make it possible to change the sound triggered by some event without doing it in the programming". I'm fairly deep into the process of making my customized packaging format with the goal to essentially archive anything (textures, sounds etc) into a single or more packages. There are several reasons, one of them because I started before the XNA project was convened, and to ease distributions on levels and mods by packing several files, textures, sounds, scripts in a single package file. ...Show All
Windows Forms extend binding navigator service
Hi I want to add two button controls to the binding navigator for query by example first button: filter , in that case , all controls of the form are cleared , and user can enter values in the controls. second button: apply filter, when user click it , the filter which is composed by reading every control value is applied to the base table and data is reterieved. i want to add these services to the binding navigator . can you help me thanks in advance string fieldName = tx.DataBindings[0].BindingMemberInfo.BindingMember; DataTable dtable = ( DataTable )bs.DataSource; MessageBox .Show(dtable.Columns[fieldName].DataType.ToString()); ...Show All
Smart Device Development CFile::SetLength() exception in Storage Card folder
In the device emulator, CFile::SetLength() throws an exception when used on files in the Storage Card shared folder. Is this a bug or is that behavior to be expected I've seen some irregularities with write file access when the file is located on the emulated storage card. It seems to be fixed (at least for me it was) in the beta of the emulator 2.0 ...Show All
Visual Basic Wait for a file to be created
I want to wait for a file to be created and when it has been created I want to move the file to another location. The problem is that the file is still being created when I try to move or copy it. My code: With Timer1 .Interval = 30000 .AutoReset = False .Enabled = True Dim PDF As String = Path.GetFullPath(Export) + "\" + Path.GetFileNameWithoutExtension(Source) + ".pdf" Log.AppendLine( "PDF File: " + PDF) While Not File.Exists(PDF) And Timer1.Enabled = True 'Wait for file to be created End While Timer1.Enabled = False If File.Exists(PDF) Then File.Copy(PDF, Dest) End If Try File.Delete(PDF) Catch ex As Exception ...Show All
Visual Studio Express Editions Install vc++ 6.0 on top of vc++ 2005 express?
If I install ms vc++ 6.0 pro. ed. (academic price) on top of vc++ 2005 express: will there be a vc++ benefit of functionality or vc++ loss of functionality If I should install and use ms vc++ 6.0 pro. ed. (academic price), should I uninstall anything first, before installing ms vc++ 6.0 pro. ed. (academic price) I did install PSDK and enable MFC with the vc++ express and it works well. Thank you. B. John OK, so for the computation part things are pretty clear. Use Visual C++ Express, ignore VC++ 6.0. For the visualization part it really depends on what exactly "visualization" means for this project so I'll add just some very general thoughts: For simple graphs even the old Win32 GDI (or GDI+) can do t ...Show All
Internet Explorer Development Vista: IE-Toolbar with Protected Mode
Hello, we have a IE toolbar that needs write access into the users data folder. I read the aticle about the IE protected mode http://msdn.microsoft.com/library/default.asp url=/library/en-us/ietechcol/dnwebgen/protectedmode.asp I added ElevationPolicy with the CLSID of the Toolband, but it did not help. The article is unclear to me because bands usually consist only of COM objects residing in dlls. Do I need a broker process (exe) Thanks, Martin Thanks for your relpy! Yes, our IE toolbar is an in-process COM server. It implements features to store Web pages in a MS Access database that is stored in the "My Documents\Web Researches" folder. Changing this location to low in ...Show All
