Sajal Mahajan's Q&A profile
Visual Studio 2008 (Pre-release) How to get the button on a toolbar to stay suppressed on mouse click?
Hi, I have a toolbar a number of buttons, each button on click brings up a page. What I would like is to have the button stay suppressed until another button is pressed. The Microsoft Internet Explorer has this behavior with "Search" or the "Favorite" button. how can I do this Thanks in Advance You can use a togglebutton. These buttons have two states and also get the appropriate style, when nested in a toolbar. If you handle the click on the toolbar, you can then also easily uncheck all other togglebuttons nested in the toolbar, so that only one button is pressed (active) at a time. ...Show All
Visual Studio Express Editions migrating from standard C++ templates to Visual C# generics
Hi. I've been programming on C++ for a few years and now I'm getting started with C#. I must say that this language, plus the garbage collector, saves lots of headaches when programming. However, I seem to miss a subtle, but highly useful feature from C++. In C++ I could do something like that: // Note that this code is C++, not C# class n_aryTree<class T, int N> { private: n_aryTree<T, N> children[ N ]; //Array of pointers ... Now, if I try to do something similar in C#, I find that I can't: the T parameter is no problem, but the N one is impossible to put there: it seems to be that C# generics only allow type parameters (the ones I used to declare in C++ as being of the 'class' type). Is there any way to get a equivalen ...Show All
Visual Basic Unexpected exception occurred during upgrade engine operation
Hi, During a every conversion of a 'VB6 project' to 'VB 2005 Express', I'm always getting folowing error: --------------------------- Visual Basic Upgrade Wizard error --------------------------- Unexpected exception occurred during upgrade engine operation: Kan niet aan de bron binden (Exception from HRESULT: 0x8004000A (OLE_E_CANT_BINDTOSOURCE)) --------------------------- OK --------------------------- My System : Windows 2000 SP4 (Clean Install) - Visual Basic 2005 Express ed. Any ideas howto resolve this Thx. This is a bug with the Upgrade Tool where it gets confused on where its registry settings are if there is an HLKM\Software\Wow3264Node key in the registry on a 32-bit machine ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to use this code into my another code?
How to put this code using System ; using System . Diagnostics ; using System . Runtime . InteropServices ; namespace DirectShowLib . Test { public class IBasicAudioTest { IFilterGraph2 graphBuilder = null ; IBaseFilter filter = null ; IBasicAudio audio = null ; public IBasicAudioTest () { } public void DoTests () { try { // We need a stereo sound renderer... BuildGraph ( "foo.avi" , out this . graphBuilder , out this . filter ); this . audio = ( IBasicAudio ) this . filter ; TestBalance (); TestVolume (); } finally { Marshal . ReleaseComObject ( this . filter ); Marshal . ReleaseComObject ( this . graphBuild ...Show All
Windows Forms C++ and C# Form
I have a C# Form which I want to use inside a C++ Application. I have a thread and a message queue (both in c++) which shall handle messages SHOW, HIDE, CLOSE and show, hide or close the c# form respectivley. No problem so far. BUT, when I receive message SHOW, I use the Show() method of the form, which brings up the form. The problem is, that TAB Key is not working correctly. I does not move the focus/selection like it normally does. This is very inconvenient for the user. I tried ShowDialog() instead, tab is working correctly. But since this is a blocking call I cannot hide the form with a HIDE message. It seems to be a missing message queue for the form even though I am using DispatchMessage in the thread's message queue ist seems not ...Show All
.NET Development Insert(..) procedur error....!
I am trying to insert into a table (I can add new columns to the table) new row with this procedur: Public Sub Insert(ByVal nova1 As String, ByVal BrojIks As Double, ByVal Prezime As String, ByVal Ime As String, ByVal BrojInd As String, ByVal zadnji As System.Nullable(Of Integer)) Dim i As Integer Dim nova As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter Dim InsertCom As OleDb.OleDbCommand = New OleDb.OleDbCommand Dim tableMapping As System.Data.Common.DataTableMapping = New System.Data.Common.DataTableMapping("Table", nova1) veza.Open() For i = 0 To Form2.Studenti1Data.Tables.Item(Index(nova1)).Columns.Count - 1 tableMapping.ColumnMappings.Add(Form2.Stud ...Show All
Visual Basic Serial Port Cannot Enable Nor Start Windows Form Timer
I have an application which scans a bar code on a serial port, takes the scanned bar code data and uses it to query a Microsoft SQL Server database for customer information and then prints the customer information on the printer port. I am converting the application from Visual Basic 6 to VB .NET 2.0 (Visual Basic 2005). I have encountered a strange problem where the DataReceived method of the serial port cannot enable (or at least cause to Fire) a timer that is used in quering a Microsoft SQL Server database for customer information. In converting the application, I sort of expected that the serial port’s DataReceived method would not be able to update user controls on the Windows Form upon which the serial port c ...Show All
Windows Forms Printing a database
I would like to print all the tables in my database in my program which holds the databases and works with them, Any suggestions Thanks Anthony I've looked at some sample code from microsoft in the msdn library, buut its for framework 1.1 and im using VS2005...not to mention they describe how to print from a stream, i dont want to open a file and print the file, i just want to print directly from my application. Liike, printing a listbox or a richtextbox for example...Although in this case it would be a DataGridView or something that is able to hold DB Information. ...Show All
SQL Server Is there anything like rowid, rownum like in MySql and Oracle??
Hi, i am new to SQL Server. I want to write a query where in i want to delete duplicate rows from a table keeping the master copy. If it is MySQL or Oracle we can write that using built in rownum or rowid. How to do that task in SQL Server 2005. Is there anything like rowid, rownum in SQL Server If not suggest me a way to do that ...aazad okk...lect us say u want to make column1 as ur primary key in table1 , so to find out the duplicate(or more) entries of this key , use the following query... select column1 from table1 group by column1 having count(column1)>1 this will enlist all the entries for column1 which r repeating... ...Show All
SQL Server SQL Job don't start
Hello I have created a jon in the SQL Server Agent. This job will start 2 Integration Packages One package for the etl, and one package for processing the cube 70 % of the time the job wil end success. But 30 % of the time the job wil fail. I don't see anything in the log. This is the only message I see : Executed as user: RLS01BIP01\SYSTEM. The package execution failed. The step failed anyone an idea Thx I have changed the step to cmdexec and I get the following message when executing : Executed as user: RLS01BIT01\SYSTEM. The process could not be created for step 2 of job 0x70B885E0FBEFA144A575B75B59E0BBC1 (reason: The system cannot find the file specified). The s ...Show All
Visual Studio Team System Team Explorer Setup Error: Missing DLL
I'm having trouble installing Team Explorer onto a Win 2003 Server system, I receive the error: Setup had detected that pidgen.dll file is missing. This file is critical to running setup. Please verify that the files in the location from which you are installing match the files on the original installation media, then run setup again. I had used the same installation to install to other systems with no problem. On this system, I looked at the temporary files extracted during install, and found pidgen.dll. I also tried downloading the free Team Explorer setup, and that failed with the same error. This is blocking the installation of a SCRUM plugin to TFS, which requires Team Explorer to be installed on that server so it has access to the ...Show All
Windows Live Developer Forums Popup Width
Is there a way to change the width of the pushpin popup window var x = new VEPushpin(id, location, icon_url, title, details, iconStyle, titleStyle, detailsStyle); iconSt yle A cascading style sheet class name that defines the look of the icon. Optional. titleStyle A cascading style sheet class name that defines the look of the title field of the enhanced preview. Optional. detailsStyle A cascading style sheet class name that defines the look of the description field of the enhanced preview. Optional. I'm not sure any of these are going to help you change the width Am i missing something John. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. BoundingBox
Thanks to XNA, my fragile vision of 3D space is completely mangled. This -1 forward thing has really whacked my ability to determine coords in 3D space. I'm making a bounding box for a ray test, and I want my minimum to be (-1, -1, -1) and max to be (1, 1, 1). In MDX 1.0, that would have been fine. Do I have to reverse the z coords for this to work in XNA I have no idea what you are talking about. XNA has a BoundingBox structure and a Ray structure, and the Ray structure has an Intersect method to check for an intersection with a BoundingBox. Reference: http://msdn2.microsoft.com/en-us/microsoft.xna.framework.ray.intersects.aspx ...Show All
SQL Server ADOX and vista
We’re calling ADOX::Table::Keys::Append to make a primary key for a table using the SQLOLEDB provider. We’re passing an ADOX::Key with Name set to a custom name, Type set to ADOX::adKeyPrimary, and a single column added. For the Append call, the 2 nd parameter is ADOX::adKeyPrimary, the third is a vtMissing (VT_ERROR with DISP_E_PARAMNOTFOUND), the last two are empty BSTR’s. On XP, this works well (msadox.dll file version 2.81.1117.0). On Vista, this fails with an invalid parameter error (msadox.dll version 6.0.6000.16386). Has the interface changed in some way, is this functionality not supported, or is it broken ...Show All
Visual Studio Express Editions No RX Data problem
Hi, I'm having a little trouble with my serial data program, it only works whilst there is data coming in. I am sure that I require something between opening my port and setting my variable = comport.readbyte, can anyone suggest the short statement required I thought maybe a do loop and something which looks at the port and allows it to continue if there is incoming data but I don't know the functions You have been very helpful, many thanks. I have almost got it perfected. I will over the next day try to understand the first paragraph of your last post, I'm not too concerned abouit time now as it is almost done. Thanks again ...Show All
