OptikConnex's Q&A profile
Windows Forms MonthCalendar, anyway to stop it from updating itself?
Seems about every 2 minutes the control will update itself and cause it's datechanged event to fire...causing my program to do weird things since I have my own code in that event. :) I'm just using it to let a user pick a day (i'm sure they wont be using it near midnight!) I've tried disableing it, hiding it, disposing it..yet every 2 minutes the datechanged event fires. I've had to code it onto a 2nd form for now, then in the date changed event I check to see if my other form is visible, if it is I exit that event..but that seems like a lame hack. Any ideas Carl I hardly think it's "pointless". If the current control doesn't work as expected, maybe they need to create a ne ...Show All
SQL Server Help with finding last record!
I have two columns - code (nvchar) and date (datetime) within an sql 2005 table. The code contains a list where the items are duplicated and I need to search for each item for the newest date and if the date is older than 180 days to display that record. Was relatively easy using the Last function but this does not exist now. Any help would be appreciated. TIA Try something like this: select Code , max ( date ) - ( This will give you the most recent date) from table_1 (- Your table) where date <= 01 / 01 / 2006 - (make this date 180 days ago) group by Code ...Show All
Windows Forms Best Component for the job?
Hi, I'm not sure if the header is the right one, so if it's confusing, I'm sorry. I come from Sun's Java world and don't know my way around the GUI programming in C# yet. When I want to display a tabular data structure in Java, I use the JTable object, which is suitable for any type of tabular data, and can be provided with a 2 dimensional array of objects that can be placed in the table using the toString() method, regardless of the data source that is used for that table. I'm trying to do something similar in c#, and I'm having trouble working with the DataGridView, which is simple only if you connect it to a datasource. I have a TCP server program written in c# that needs to display data about connected clients. I need to ...Show All
Visual C# OOP Data Access Question
I am trying to grasp and understand OOP better and I have a question in regards to d classes that perfrom CRUD operations. I am looking for input and thoughts on seperating CRUD functions from domain classes. My application has three domain classes: item , cart (which contain items) and user (manage the carts, add remove items and such). Items and carts both expose public methods that require CRUD operations and I do not want to build the CRUD into the class so I have added a data class for handling the CRUD operations. My qeustion is should each item (could be 1000s) and cart (100s) object create a new instance of the data class for calling the methods for performing needed CRUD functions This just seems to be alot of overhead by cr ...Show All
Software Development for Windows Vista Win32 Stopping the Caption Bar buttons from being drawn
Hi, Does anyone know of a way to stop the caption bar buttons from being drawn without removing the WS_SYSMENU Also, the close button needs to be removed completly, not simply disabled. If anyone can get me in the right direction as to how to stop these from being drawn (as it doesn't look like they are drawn in WM_NCPAINT) that would be great! Thanks! Brandon I'm pretty sure almost everything is done in NCPAINT. If you intercept NCPAINT and do nothing, you get no caption bar or caption bar buttons. Under WinXP and later, you can manually use the them engine's DrawThemeBackground function to draw the blank window decorations yourself. You'll need to handle the active/inactive state of th ...Show All
SQL Server matrix: more than 1 column in static rowgroups ?
Hello, I am working with a matrix report item and would like to display something like that : DataGroup1 DataGroup2 StaticText11 StaticText12 Data1 StaticText21 StaticText22 Data2 StaticText31 StaticText32 Data3 But I cannot find a simple way to have 2 columns of static text on the left. The only way I've found is inserting a table report item in the matrix cells, but it cannot be exported in Excel. The only samples I found do'nt have multiple colums in the static rowgroup. Is it possible Kind regards, Xavier Miller. Sorry, I didn't understand well the query (my problem is putting columns on top)... you want columns in the left hand side... mmm... for horizontal rep ...Show All
SQL Server Performance issue in MDX query
Hi All, I have the following MDX query which takes around 3 minutes to execute in spite of my fact table containing only around 800 rows. The dim classification no hierarchy dimension contains around 10,000 members. with Set [Time1] AS {[Dim Time].[FullDateAlternateKey].&[2003-07-01T00:00:00]:[Dim Time].[FullDateAlternateKey].&[2004-07-01T00:00:00]} member [Incident Count] as 'Sum ( { [Time1] },[Measures].[Estimated Incident Count]) ' member [DTS] as 'Sum ( { [Time1] },[Measures].[Days To Solution]) ' SELECT NON EMPTY CROSSJOIN ( AddCalculatedMembers ({[Dim Project].[Dim Project].[ALL]. CHILDREN }), {[Incident Count], [DTS]}) ON COLUMNS , NON EMPTY TOPCOUNT ( AddCalculatedMe ...Show All
Visual Studio Express Editions VB6 -> vb 2005 express problem
Ok so I've have an old VB6 program which I wanted to update to vb.NET. Which btw went very smoothly... My problem is the "Design" part of the form doesn't show properly :S And I dont know why... I've also converted the same vb6 project to vb 2003 and it displays fine... So basicly I want to know is there something wrong that I'm doing in 2005 Heres a ss... I'd really perfer NOT to have to use vb 2003 because I like 2005 much better lol. One last thing to add, I did try rebuilding the project and I still get the same error. Thanks in advance! Sorry I feel really stupid now lol... I fixed the problem.. I forgot I had upgraded my vb6 project to 2003, then from 2003 to 2005 and thats what the prob ...Show All
SQL Server How to determine if a database is in use
I have a VB application that uses SQL Server 2000. I am adapting it to support both 2000 and 2005. I connect to the database using ODBC. My application has the typical backup/restore functionality. Before I do a backup or restore, I check to see if the database is currently being used by another application. In SQL Server 2000, I did this by connecting to the 'master database' and running the following query: SELECT COUNT(*) FROM SYSDATABASES WHERE DBID IN (SELECT DBID FROM SYSLOCKS) AND NAME = 'MyDatabase' If I get a count greater than 0, someone else is using the database. This of course does not work on SQL Server 2005. I have come up with an alternative. For SQL Server 2005, I connect to the database I want to backup or restore ...Show All
Windows Forms Setting the Value of Items in a ComboBox
If you manually fill a ComboBox ... Me .ComboBox3.Items.AddRange( New Object () { "Ticket Number" , "Ticket Date" , "Truck" , "Field" , "Inoculant" }) Is there a way to set the value for each item Jeremy good question. I guess your safest bet would be to either use a datatable and do it the same way as you normally would but filling the datatable with values, this would be overkill. The other way would be to use an arraylist of some sort, binding to it and setting the displaymember/valuemember appropriately or something like this. I'll see what else I can dig up ...Show All
.NET Development Functionality of MSCOREE.dll
Hi Guys, any one knows the full functionality of MSCOREE.dll in .net framework Please help me to know about it. It sounds like your .NET Framework installation is corrupted. The file should not be updated by anything except the .NET Framework installer, since this file is installed once-per-machine (no matter how many frameworks). mscoree is the bootstrapper to load the CLR (mscorwks.dll mscorsvr.dll) I would recommend using the Repair option on the .NET Framework install (MSI). If this was installed as part of the OS (e.g. Windows TabletPC Edition, Windows Server 2003, Media Center Edition, or Vista), then I would recommend an OS repair (e.g. Windows setup utility). Hope that helps, Stephen ...Show All
Visual Studio 2008 (Pre-release) C++/CLI, DataContract
Hi! I have this legacy app in C++ and would like to put WCF atop of it. (in C++/CLI) I already managed to create a rudimentary service, but fail to use the DataContract attribute. Is this not possible in C++/CLI Thanks, Bernd Hi Ben! What I'm trying to say, but failed to do so, is that when writing something like this: [DataContract] ref class MyArray { ... } I get: error C2337: 'DataContract' : attribute not found My question is: Why does the compiler not recognize this attribute Thank you ...Show All
SQL Server FTP Task error when no files found on FTP
Hi, I have created a FTP task that logs into FTP server and receives files and scheduled it to run every 15min. However, it fails when there are no files on FTP. How would I check the if files exist How can I catch the FTP task error and compare it to Hresults.NoFilesFound in a script task Thanks in advance for any help. Hi Anjan, Thanks for your reply. But, I'm not sure how I can get WMI connection manager to connect FTP server and check if files exist. May be I'm missing something. Is it possible to capture the ExecResult of FTP task when it fails and do something in script task Please shed somelight. Thanks. ...Show All
Visual Studio Tools for Office Distribution requirements
Once I build an application using VSTO and package it for distribution, what is needed to run the application on the target machine Let me take a guess: 1. VSTO Runtime 2. Office Pro and or a standalone version of Word or Excel 3. Thanks in advance. 1. The .NET Framework version necessary to run your solutions 2. The Office PIAs for (2) in your list above. These won't install by default unless the Framework is already present on the machine. If Office is installed before the Framework, then the PIAs need to be installed explicitly, in an additional step. 3. Depending on how the user has been updating Office and in which version your VSTO solution was developed, it might be neces ...Show All
Windows Forms Capture mouse move in container control
Hi, I have a panel with some child controls. The child controls can have their own child controls, etc. How can the parent panel track where the mouse is (when the mouse is inside the parent panels area) For example, how can the parent panel be notified of MouseMove events when the mouse is over a child control Thanks! It works fine for me, even with nested panels and child controls. I re-wrote it in C#, fixed a bug in Child_MouseMove, cleaned it up a little, and changed it so that it calls MouseMove on the panel just like a normal mouse move event. using System; using System.Windows.Forms; using System.Drawing; namespace CSharpTest { public class MousePreviewPanel : Panel { protected overri ...Show All
