Simon Dallaway's Q&A profile
Visual C# Problem with Timer and BackgroundWorker
Hi, After starting below code, the output I got is: ------------- day minute day minute,minute day minute,minute,minute -------------- It should be: -------------- day minute, day minute day minute -------------- I don`t knowo why the backgroud worker starts more then 1 time on each steps, is Background worker cancelletion working right Please help. CODE private void Form1_Load(object sender, EventArgs e) { timer1.Interval = 3000; timer1.Tick += new EventHandler(DayTicker); timer1.Start(); } public void DayTicker(object sender, EventArgs e) { timer1.Stop(); if (backgroundWorker1.IsBusy) backgroundWorker1.CancelAsync(); if (backgroundWorker1.CancellationPending) ret ...Show All
.NET Development i need help
i have 2 tables in my database. i want to select data from one table and insert into the other. i have written my query using the the table adapter for that table. say i have a table named products and another named sales. using the salestableadapter i wrote and sql select statement to select data from product table and insert to the sales table like INSERT INTO Sales (productName, unitPrice ) SELECT productName, unitPrice FROM Products WHERE (ProductName = ) where productName is a parameter ie the product name the user will enter. this query is named InsertItem(ProductName). I then add the 2 tables on my form and create a textbox named productNameTextBox and a button named addButton. on my addButtonClick_Event i ...Show All
SQL Server data missing in the full backup
i have a 2005 db with full recovery mode. daily full backups, diff backups and log backups are done through sqlagent. i wanted to make a copy of it on another instance using the restore method with the latest full backup. after i created the new db, i noticed that a few tables were missing and columns were missing from existing tables also. futhermore, the recrods in these tables were not up-to-date either. i did fresh a full backup and tried again and the problem persisted. i aslo tried to restore on the same sql server instance under a different db name and that reproduced the problem. the database schema was changed a few weeks ago&nb ...Show All
Visual C++ ActiveX in WIN32 and Console
Greetings all, I'm in at an impass and hope someone on the forum can help point me in the correct direction. I am working with a control system that is writen in C/C++ and built on an OSI/Posix core. The main program body is a Console/Server application that expects few or no user events or inputs. We build with VC8 using Gmake ( from the cygwin suite ) and everything works well, the main application runs from console under Server2003 with no problems. We run in to an issue here, we have vendor supplied ActiveX controls that we would like to access from the control system. I dont know how, and neither do any of my vendors or other devlopers. Being a unix devloper for most of my life I assumed that we could instancate the control ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Geometry instancing support on 360?
I'm working on a geometry instancing demo and I noticed in the XML documentation for GraphicsDevice.SetFrequency() that the method (and related methods) are "Windows Only". Is this a mistake Here are the NVidia thoughts: "Use of instancing isn’t free. There is a small amount of per instance overhead in the driver (luckily this is much less than normal draw calls). Also, since we are passing down extra instance data in the vertex stream, all the instance data adds to our vertex stride, which will reduce our vertex cache efficiency. As well, the instance data may require that we do extra math ops per-vertex when we could be doing that math per-instance. Since with instancing, you might pass down the world transf ...Show All
.NET Development StringBuilder COM marshaling across COM apartments
I have the following interesting problem: I am using COM interop to work with an SDK, where one of the methods I call has the following signature: HRESULT GetName([out][in] WCHAR *pName, [out][in]DWORD *pcchName); The way it works is that the client first passes a NULL as pName and gets the number of characters in the name as the second out parameter (pcchName). Afterwards, the client can allocate the required memory and pass in the array and the capacity. I am using this method from C# and I have the method signature as follows: [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void GetName([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder name, ref int nameCapa ...Show All
Visual Studio 2008 (Pre-release) Sweeping a curve(shape) over a 3D torus?
Hello, I want to sweep a path (complex curve) over a 3D torus, so that the exterior of the torus gets the pattern of the complex path. This complex curve, I will choose at runtime from some 5-8 pre-defined complex curves, and do the sweeping on the fly, to get the torus in shape. Whats the best way to do this in Visual Studio 2005. Any help will be appreciated! Rohit. <Did anybody get what I meant > You must have seen a tyre right The tyre contains a treading pattern. Some grooves and curves etc. Basically I have such a pattern, which I want to sweep over a 3-D torus, so that the exterior of the torus gets the look of the pattern. You can create the the co ...Show All
Community Chat Kyro KidSafe Browser (alpha)
Hello all, I am making a "KidSafe" browser for kids. Please download my program and post any noticed bugs,etc. It takes only minutes to set up. I am 10 years old, so who can make a browser for kids better than a kid Progress: Final will be started in January Thanks you everyone for your contributions and encouragement. *Has 3 tabs for browsing. *Has a "My Websites" button with up to ten of your programmed websites in it. Beta Features: *Has 3 tabs for browsing. *Has a "My Websites" button with up to ten of your programmed websites in it. *Talking Help guide *A new install program Updates in final version: *Button text replaced with graphics. *A game room with games, and fun KidSafe software (suc ...Show All
Visual Studio Tools for Office Word addIn..Context Menu How To..?
Dear All I'm Installing VSTO SE and Office 2007 based on January MSDN shipment In usual i create customization in action pane or commandbar but now i want to create the customization in Word 2007 context menu, so user can select a range of text, right click it and display my own menu beside another usual menu item (such as copy,paste,etc) Is there any clue for me thanks before no office 2003 around on any machines , we had moved into office 2007 when MSDN Subscriptions published it. OK will try the solutions in that links many thanks Cindy ...Show All
Visual Studio C# code to export to pdf using Crystal Report
Hi all, Does any one has the code in C# to export to pdf using Crystal Report. Thanks, J. Here is code to export to disk Report.ExportToDisk(ExportFormatType. PortableDocFormat , "C:\report.pdf"); ...Show All
Visual Basic Searching Records on Windows Form
I can't seem to find a solution for this anywhere! Everywhere I've searched on Google always shows me how to do this with a datagrid - but not a form. I've created a form which correctly displays all my fields in a recordset. I can scroll through them, add new records, delete records, etc. etc. and everything is fine. I now want to add a Search field to the form so that when the user enters a search string, it automatically searches through the dataset and refreshes the display to display the appropriate search result (i.e. populates the currently open form with the appropriate record). Any help will be appreciated. I added a second toolstrip with a label, a text box for the search string ...Show All
Software Development for Windows Vista Vista colors
i'm developing software and now trying to compatible with vista. i use HTML files as user interface. i need windows vista colors HEX values to use them in HTML files. thanks for your help. Your best bet is to use only the system colors (like here ), this way your application will automatically adapt to the color scheme that the user is running (Aero on Vista, Windows XP style on XP, Windows Standard or Classic, High Contrast, etc.). A richer alternative is to use the Uxtheme APIs to dynamically retrieve colors, so that again your application automatically adapts to its environment if it's running under a different visual style. The visual style colors are a superset of the system colors, for example Aero includes the Tex ...Show All
Windows Forms Hiding tab pages
I have gone through the threads available on this subject and have tried the suggested solution. But they don't seem to work. I have design my tab pages with the TabControl using the visual basic 2005 express. I have 4 tab pages on my application, each with a datagridview thing which have connections etc. coded for each. Is this the reason why the tabcontrol.tabpages.remove() way is not working or is it due to the limited capability of the IDE please enlighten this cofused and blurred student.... thank you. Sorry for the lack of info. Here's the section of the code. It doesn't give any errors but the tab pages didn't get removed. 'show tabpage for fields with input data only. If fields were empty ...Show All
Windows Search Technologies Install Issues with WDS 2.65 Enterprise Via SMS 2003
I am attempting to build an SMS package to automate install on 2000 XP sp2 machines. The command line I am calling is WindowsDesktopSearch-kb911993-V2-x86-ENU.exe /quiet runs with SMS admin privelages and no reboot is set WDS installs then pops up a Send error to Microsoft report Once the user reboots WDS runs fine. A little about the environment , The group policy WDS template is in effect with only the no run customization wizards selected as off. I had various problems keeping that wizard quiet so I in acted the command line switch during the install for testing The error that is popping up immediatly after install via sms is: WindowsSearch.exe - Applica ...Show All
Visual Studio 2008 (Pre-release) Shrink AND move a control in a canvas using animation (easy?)
All I want to do is be able to scale the X and Y of a usercontrol (in a canvas) both to 0 AND move the control to Canvas.Left=0 and Canvas.Top=0 no matter where the control is currently. I have the following so far... it does the scale X and Y ok, but crashes on the canvas-related calls... says "cannot have NaN as an origin in a DoubleAnimation": .......... <UserControl.RenderTransform> <TransformGroup> <TransformGroup.Children> <TransformCollection> <ScaleTransform x:Name="MinimizeScaleTransform" ScaleX="1" ScaleY="1" /> & ...Show All
