thedo's Q&A profile
Windows Forms MustInherit
'Hi i have class a,b as follows: Public MustInherit Class a Inherits UserControl Public MustOverride Sub y() Sub x() End Sub End Class Public Class b Inherits a Public Overrides Sub y() End Sub End Class 'I get the foll. error when trying to open b in design view: 'Warning 1 The designer must create an instance of type 'vbLib.CBaseControl' but it cannot because the type is declared as abstract. ' 0 0 'And it does not make any sense why 'Thanks hi thanks, and how can i overcome that, because i am not creating an instance of a. i inherit a on b where i implement all methods. would it not make sense it can show the design view of b ...Show All
SQL Server How to write Select Statement inside CASE statement ?
Hello friends, I want to use select statement in a CASE inside procedure. can I do it of yes then how can i do it following part of the procedure clears my requirement. SELECT E.EmployeeID, CASE E.EmployeeType WHEN 1 THEN select * from Tbl1 WHEN 2 THEN select * from Tbl2 WHEN 3 THEN select * from Tbl3 END FROM EMPLOYEE E can any one help me in this please give me a sample query. Thanks and Regards, Kiran Suthar Please note the syntax of the SELECT statement posted above is not quite correct. You cannot use CASE expression like that to assign variables in the THEN clause. Additionally, if your SELECT statement on Employees returns multiple rows then the result of the assignment if done correctly is not ...Show All
Windows Forms Context help toolbar button
Hi, I've implemented context-sensitive help using winform and its working fine, Instead of having the in the form caption , I want to display in toolbar.. please provide some pointers.. The user wants to drag the help from the toolbar and place it anywhere in the form (A textbox, a button) and it inturn should popup the exact help.. The above was possible in mfc. i'm not sure as to how to do in c#. ...Show All
Windows Forms DataGridView Problem
Hi.. I have a problem with DataGridView in VS 2005. I fill it dynamicaly - both columns and rows from separate threads. So, in case if the columns amount needs the horizontal scrollbar to appear, it appears, but: 1) I can not move it 2) it is not drawn properly 3) When looking at the DataDridView - the application uses 99% of CPU time. If I will switch the tab, for example and the DGV will get hidden - CPU loading goes to zero, as it should be... Any suggestions Thank, Anton Ait.. the solution found. had to use BeginInvoke/EndInvoke procedure for cross-thread control update. Thank you for your feedback, Anton ...Show All
SQL Server How to handle streams by mean Script Task?
I'd need to create a file and then populate it. Any link/advice would be very appreciated. Thanks in advance It's already solved. System.IO Dim xFitxer As StreamWriter xFitxer = New StreamWriter( "c:\enric.txt" , True ) xFitxer.writeline("lazy man") ...Show All
Visual Studio 2008 (Pre-release) listbox binding issue
I have a template for a class in which I have the following XAML <Setter.Value> <ControlTemplate TargetType="{x:Type local:P1}"> . . . <StackPanel Grid.Row="1" Grid.Column="2"> <ListBox ItemTemplate="{StaticResource dtc}" ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path= AcrossClues}"></ListBox> <Expander Header="Across" > <ListBox Height="150" ItemTemplate="{StaticResource dtc}" ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path= AcrossClues}"></ListBox> </Expander> </StackPanel> . . . </ControlTemplate> the lis ...Show All
Game Technologies: DirectX, XNA, XACT, etc. About SpriteBatch.Draw Overloads
I was wondering if there is a performance difference between the various overloads The overloads that take more parameters may perform a little more pre-transforming of the vertices, but any performance difference would be neglible. If you are concerned about performance, the best thing you can do is make sure that as many of your Draw calls as possible use the same texture parameter. You can do this by putting your sprites in the same texture and then using the sourceRectangle parameter. When you do this, SpriteBatch is able to "batch" your "sprites" together into just one or a few draw calls which really improves performance. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. z-order: best sort algorithm
I was just wondering: We need to sort the objcts to render in z-Order or reverse z-Order to render a scene with transparencey, e.g. 1. solid objects from near to far 2. transparent/semitransparent objects from far to near Of course one could just calculate the distance from the camera and run a quicksort over the list. But considering a really "bad" scene with many objects this might be a huge costfactor in matter of CPU time. So taken this scenario: a relativly static scene with a lot of objects and a moving camera. The sort order will in most cases change only slightly due to the camera movement. So from this thought wouldn't it make sense to keep the sorted lists and just correct them Has anybody used an approach like ...Show All
SQL Server Having Problem with Report Parameters
i am trying to generate a report based on 3 parameters age, location, ethnciity every thing works fine in data and layout tab, when i run the preview tab, it give me the option to input paramaters and then when i hit veiw report, it shows processing report.... (indefinite) time. i tried executing the query in data tab, it takes less than a sec. any ideas am i doing somethign wrong in parameters its some weard problem. its hitting the dbase and i double checked it in the profiler. i dont knows what happening. i deleted the data cache files in the folder and tried rerun again.. nothing works. data tab works 1000 times fine. ...Show All
Visual J# Differences in 1.1 vs. 2.0 -- sockets/networking
We have a J# layer that communicates with our mainframe. It maintains a pool of GU3270 emulation connections. Prior to deploying 2.0, our virtual machines were able to suspend for backup for periods of approximately 5 minutes every night, and resume service immediately afterward without difficulty. Since deploying 2.0, it seems as though the VMWare freeze on the server image, if frozen for a long enough (4+ minutes it seems) period of time, leaves us with dead sockets in the connection pool. The connection pool is unable to close the connections, as either the sockets, or their output buffers, are null/disposed after image thaw. Without being able to properly close the connections from its perspective, the pool cannot reinstantiate them ...Show All
Visual Basic Eliminate redundant elements in a string array
I have a one dimensional string array with several hundred elements. Many of the elements have the same string and I would like to eliminate all the redundant string elements and wind up with a smaller array with only the unique string elements. Does anyone know of an easy way to do that with VB.NET 2003 Thanks, Lee You could create a hashtable with key type = string, value type = object and add each string to it and then copy the Keys collection to a new string array... Best regards, Johan Stenberg ...Show All
SQL Server Which DB should I use for a PocketPC app?
I'm planning a Pocket PC / Windows Mobile application, but I'm a bit confused on which mobile database I should start development with. I've read about SQL CE, SQL Everywhere, and SQL Mobile. Should I be using SQL Server CE 3.1 for my Pocket PC application The database will be preloaded with data at design time with read-only information, and will be a "private" installation for a single user application. My main concern is that the solution can be installed on PPC 2002, 2003 and Mobile 2005. Am I on the right track Thanks, Jordan SQL Server Everywhere Edition was renamed to be SQL Server Compact Edition, which to the best of my knowledge is the successor to SQL Server Mobile. Rega ...Show All
Windows Forms Dynamic Filling of TextBox AutoComplete not working
Hi guys, i would like to fill the textbox autocomplete stringcollection "on the fly" while typing. i don't want to fill the collection while initializing, 'cause it's too much data: the sql server-table has about 100.000+ rows. the filling takes too much time and the "autocomplete-popup-find-something-box" itself is getting too slow, too. my configuration: .NET-Framework: 2.0.50727, System.Windows.Forms.TextBox TextBox-Properties: AutoCompleteSource: CustomSource; AutoCompleteMode: Suggest i tried several different things... 1. i did put this code in the “TextChanged”-event, but i think it's 'too late' there: private void textTiteUltTest_TextChanged( object sender, EventArgs e) {   ...Show All
Windows Forms ClickOnce Fails with "Value does not fall within the expected range."
I have a ClickOnce-deployed application installed in offline mode across a range of Windows 2000/XP machines on my network. I now receive an 'Application cannot be started. Contact the application vendor.' error message when I attempt to run the application on my development machine. (It works still on the production machines.) I've run mage -cc, and renamed the '2.0' directory to '2.0x' to ignore its presence. Add/Remove Programs still shows it, and clicking Change/Remove pops up a window for a moment, but otherwise does nothing apparent. I've changed the installation path to be a network path instead of a website, and it still fails. The following is the error log: PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win32NT) Comm ...Show All
Visual Studio Installing GAT/GAX and factories under Windows Vista
Now that Windows Vista is here, I know a lot of people are going to want to run GAT/GAX and Software Factories on the new OS. While it is possible to run these on Vista, there are some known issues with the June 2006 CTPs of GAT/GAX, especially around installation. In order to install GAX, GAT or any current patterns & practices Software Factories on Windows Vista, you should follow these steps: 1. Download the appropriate MSIs (GAX/GAT/factories) and save them to your hard disk 2. From the Start Menu, click All Programs and Accessories 3. Find the Command Prompt icon, right-click it and choose "Run as Administrator". Then accept the User Account Control prompt 4. Change the command prompt ...Show All
