DamsDev2007's Q&A profile
Visual Basic Can anyone recreate this small bug?
New windows form Add a Menustrip and a couple of items Add a Toolstrip and a dropdown button with a couple of items Set the shortcut property of a menu item to CTRL + SHIFT + F9 Set the shortcut property of a different menu item to, e.g., CTRL + F9 Set the shortcut property of a toolstrip dropdownmenu item to CTRL + SHIFT + F9 Set the shortcut property of a different toolstrip dropdownmenu item to, e.g., CTRL + F9 Create two simple subs and have one handle both the C+S+F9 click events and the other handle the C+F9 click events Run the form. On my install, CTRL + F9 works, but C+S+F9 does not. However, if you remove the shortcut key from one of the menu items (so there is only one C+S+F9 shortcut on the form) t ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Video/Animation Playback
Hi, I'm currently writing a library (for XNA/DirectX) for animation/soundless video playback, and I have a few design questions for the pros out there if you don't mind answering them : I'm having my animation class inherit from game component, and update the frame depending on game time in the overriden Update method, and render it in the overidden Draw method, but even when I preload my textures to render, playback is choppy. Not sure exactly why, but I notice this only when I have significant number of frames (I noticed it with 100 frames, but *not* with 10/15). This problem may be linked and solved by the 2nd point, so please read on. When I preload all the textures for the frames in the animation (and the no. of frames ...Show All
Visual Studio Express Editions How do I set file name to a TCHAR variable?
Hi, I wanted to revise a downloaded program that I wrote the file name in the program, while will not use an Openfile dialog. However, there is an error of C2440: cannot convert from ' wchar_t ' to 'TCHAR [260]'. The corresponding code is: TCHAR szFileName[MAX_PATH]={0}; //definition szFileName = L'bao.avi'; //I give the file name to the variable, but & ...Show All
Visual Basic Add and remove data from file
Is t possible to: Add data to a certain offset in a file without overwriting original data from that offset, thus expanding the file Remove data from a certain offset and length in a file, instead of making a new file of the two desired parts of data from the original file Thanks! Sure performance may be an issue with files this size and the stringbuilder class may be the best option. Also remember windows uses virtual memory, so it will page items in an out of memory if you dont physically have 100Mb free in your machine at the time. Are we talking like a batch process to update this file or are you talking about an interactive application - Is it possible that you could use a database to do interactive parts of ...Show All
Windows Forms color of richtextbox contents
hi I want to chage the color of a single word in a richtext box thanx. Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim r As Int32 = CInt (Int(255 * Rnd())) Dim g As Int32 = CInt (Int(255 * Rnd())) Dim b As Int32 = CInt (Int(255 * Rnd())) Dim c As Color = Color.FromArgb(r, g, b) ...Show All
SQL Server Download DTS for SQL 2005 Express
I'm trying to export a SQL 2005 express database to SQL 2000 without success, really a pain in the ass :-( But I found that it may be a hope but I can't find the page to download the in this page mentioned additional download for SQL 2005 express that will add DTS functionality to it. http://www.microsoft.com/technet/prodtechnol/sql/2005/msde2sqlexpress.mspx " DTS runtime Yes Yes (Web download) " Where can I find the additional package to add DTS to SQL2005 express Best Regards hello ...i have the same problem . I have to import data from a csv file and i have tried to install DTS Services from the link above but in the C:\Program Files\Microsoft SQL Server\90\ i don't find DTS\Binn\DTSWizard. ...Show All
SQL Server Floating Point Error - Order By Mystery
I'm having a problem that I think is due to corrupt data. Depending on the column I use in my order by clause two problems are occuring. 1. No results are returned and I get this error: A floating point exception occured in the user process. 2. Results are returned but there are a different number of rows depending on which columns I use in my Order By clause. Examples SELECT * FROM SymbolStats ORDER BY calc_date, symbol Returns - 12207 rows but only includes one of the 25 dates in the table. ---------- SELECT * from SymbolStats ORDER BY current_hv Returns - 0 rows. ---------- SELECT * from SymbolStats ORDER BY average_hv Returns - floating point error With more conditions in the WHERE clause the number of results returned varies gre ...Show All
Visual C++ Question on including header files to project in VC++
The question might sound dilly but couldnt find a proper answer. I created a new project in VC++ 6.0 and included an existing header file into it but when I try to use it in a cpp file (also in the same project), I still have to include the header file specifying its exact location. I thought if i add the header file to the project, i can just write # include "xxx.h" in my cpp file and the header file would be automatically found. Instead I am having to write the path of the header file in the include. Am I missing something Thanks, KarthikR If the file you mentioned(header) is in same folder as cpp you want to include this header in, then # include "xxx.h" will work. xxx.h must be ...Show All
Software Development for Windows Vista Restart Manager and Windows Services
Hi there, I'm trying to get rmtool.exe to shutdown a windows service, but it doesnt seem to handle the shutdown messages, even though there are three messages handlers that have been added to it, one for service control messages, one for ctrl-c messages and one handling windows messages, and still no response from my service. I think I might have the wrong syntax for closing a service with rmtool.exe, but I'm not sure. I'm running rmtool.exe from an admin command prompt. the test case says to use "rmtool.exe -f $dir|<service> -S" so I have tried different combinations, but the only time rmtool.exe seems to see the service process is when I use the executable file path, where I get this output: C:\folder> ...Show All
Game Technologies: DirectX, XNA, XACT, etc. HLSL Syntax Highlighting in XNA Express?
This is incredibly minor, but are there any plans to add HLSL Syntax Highlighting to XNA Studio Express Shaders aren't going away for a while, and it would be quite useful to have some syntax support in XNA. Hang on a minute, shouldn't those of us who have shelled out a fortune to get the pro version of VS2005 get that first Seriously though, it is about time that feature was put back into VS, along with the long lost shader debugger. Andy. ...Show All
Visual Studio 2008 (Pre-release) Why BitmapEffects are Slow ?
Hi! I want to make a photo gallery application that displays the groups of pictures like Phodeo. Each group is composed from a grid which contains a ScrollViewer and a TextBlock to show the name of the group. I want that around the grid a shadow to appear, so I use the ShadowBitmapEffect. What I found is that animations are very,very slow when I use the BitmapEffect Why Aren't the effects rendered in 3D And another question: which is the better way to modify, for example, the size of an object. It's better to set manually the properties (Width,Height), or to use a ScaleTransform Thank you! BitmapEffects are always rendered in software, and force whatever they apply to to be rendered in software, hence t ...Show All
Windows Forms where can I find out about the combo autocomplete
not much detail on how to use. I want my custom datasource to be the same as what filled the combo box I'm not sure I understand you completely, but maybe this post will give you some idea If not, please post some more details on what you're trying to do. Andrej ...Show All
Windows Forms Mouse Wheeling
So I've got this genious idea. The current issue, is that I require constant capture of the mouse wheel. My for is pretty much completely covered by various controls. What I want to know is, can I capture the mousewheel on the form level, even though the mouse might be over a textbox And secondly, what event gets fired off when I scroll my mousewheel Where can I add code to do something with the mouse wheel It depends on the constant's value, May be there is some constant which may telll you direction of Mouse Wheel, Please see the project i refered to you, It has hundreds of constants. Its your luck if you find one which tells you direction of rotation or search google Mouse Wheel Windows Constants. O ...Show All
Visual Basic oledb parameters
how to use oledb parameters in oledb command object I declare the oledb variables & others like this dim cmd as new oledb.OledbCommand dim prn as new oledb.oledbParamter prn.ParameterName = "@para" prn.OledbType = varchar prn.value = "" 'say a string 'etc etc ------------- then i add this paramter in the command object cmd.parameters.add(prn) cmd.commandText = "select * from table where field = @para" cmd.connection = cnn ' say a connection object cmd.ExecuteNonScalar ' I just need one column actually as the query is supposed to return one row only ********************************************************************* when this code is executed, the system gives the ...Show All
SQL Server Update Trigger
Hello i have two table parent & child, if i'll update the foreign key in child table & updated value is not exits in parent then i have to update it as a null. for that i have to write a trigger can any one help me for that. You can pretty easily use an instead of trigger to do this. (Note that it makes using an identity key a bit more tricky. You will have to get the last inserted row via an alternate key instead of scope_identity()) drop table child drop table parent go create table parent ( parentId int primary key ) create table child ( childId int primary key, parentId int references parent(parentId) ) go create trigger child$insteadOfInsert on child instead of insert as begin set nocount on ...Show All
