Mutakin's Q&A profile
Visual Studio Express Editions How To Image?
How to make my program ignore all white till light gray pixels but use the dark gray and black pixels for comparing a image to what has been done the same thing. Comparing to be done with the LockBits method or other one but you'll have to specify! ...Show All
Visual Studio 2008 (Pre-release) vote for extension properties
I was playing with extension methods the other day, and I find it really exciting. The natural language expressiveness is great, epecially when creating a Domain Specific Language for an app or framework. Some uses were natural for methods, such as a Behavior-Driven Development style of testing method like: public static bool ShouldBeEmpty( this ICollection coll ) { return coll.Count == 0; } // var x = new ArrayList(); x.ShouldBeEmpty(); returns true Other uses were not so natural, where the parentheses get in the way. public static TimeSpan Months( this int number ) { var now = DateTime.Now; return now.AddMonths( number ) - now; } public static DateTime FromNow( this TimeSpan span ) { return DateTime.Now + span; } ...Show All
SharePoint Products and Technologies Programmatic Audience Compilation
Is there a way to fire off the audience compilation process through c# Specifically, if I wanted to compile just one audience but not the rest, is it possible to do this through code Thanks in advance for any help offered. Dez Actually, it seems that the audience compilation is possible through the object model. The AudienceJob class has a static method called RunAudienceJob that provides a way to start and stop incremental and full compilation. Althoug, it requires some parameters I can't find. Here is the SDK : public static int RunAudienceJob ( string [] args ) Parameters args Takes the following four arguments: ApplicationID ...Show All
Community Chat Connect to a database
Can anyone give me simple code for visual studios.net 2003 for a connection to a database. I have trawled through sites for 2 days now to no joy whatsoever! thanks. Your questions is probably best handled on the SQL site for future reference. That said, there are lots of examples of the code on MSDN if you look at the official documentation associated with any of the classes related to accessing SQL. For example, there's a pretty simple example that I think should be compatible with both VS2003 and VS2005 here: http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.aspx ...Show All
Game Technologies: DirectX, XNA, XACT, etc. "Chaos" 3d FPS Game Engine (WiP)
Title: Chaos First Person Shooter Game Engine for XNA Objective: To design and write a first person shooter engine for the XNA that utilizes advanced shaders, shadows, and poly-based collision detection and to meet or exceed the capabilities of the engine used in "Halo" Website: [ here ] Time Frame: 4-5 Months (Expected completion in late April to early May, 2007) Description: The Chaos First Person Shooter Game Engine for the XNA will allow anyone to create high-quality first person shooters that will rival Halo. Chaos will be a library available for both Windows and the XBox 360. The library will include all the basic, and advanced functions of the game, you just need to add in your custom elements and add the content. Chaos will not onl ...Show All
Visual Basic Printout is not what I expected
I need some help with the following problem. I have made a simple pos system that will let the user push buttons that represent the menu items and those items show up on the reciept. I am using formatting zones to line up the items. This part of the program works fine and the display on the screen keeps everything lined up. My data is contained inside of a sorted list and my objects come from a menuitem class the properties are : name - holds the name of the menuitem price- holds the price cost - holds price * Quantity Quantity - how many key - so each entry into the sorted list is unique The name of my sorted list is itemcoll And my theory is that i can loop through the sorted list and print each element until r ...Show All
Windows Forms databound listbox
I have 2 list boxes. Both are databound. I have an add button and remove button. when the add button is pressed the selected record should be moved from list box 1 to list box 2. When the remove button is presse the selected record should be moved from list box 2 to list 1. It works pretty well - unless one of the list boxes are empty then I have all sorts of problems adding the new row (no primary key, no columns, etc..) I set the databound listboxes with: list.DisplayMember = DisplayName; list.ValueMember = ValueName; DataColumn [] dtCol = new DataColumn [1]; dtCol[0] = dtSrc.Columns[ValueName]; dtSrc.PrimaryKey = dtCol; list.DataSource = dtSrc; My remove button code is: private void cmdR ...Show All
Windows Forms MonthCalendar Control XP Themes --- How do you disable?
From MSDN note: Using the MonthCalendar with visual styles enabled will cause a selection range for the MonthCalendar control to not paint correctly and today's date to be contained in a square if ShowTodayCircle is set to true . How do you turn of xp themes for just the month calendar control I have been able to turn off for applciation but once you set it for one form then the month control on other forms begin messing up. There has to be an easy solution. Is there a hotfix we can apply Thanks, Aaron The classic fix, calling UxTheme.dll's SetWindowTheme(), sadly doesn't work. It just changes the month scroll buttons, not the rest of the control. I don't think there is (and couldn't fin ...Show All
SQL Server Closing a conversation later on and Microsoft Service Broker Interface (sample)
In a messaging application, a client sends a message to the server. The server uses Service Broker Interface, and is CLR based. On the server, the message has a life cycle - going throughout multiple transitions until is final (Pending, In Transit, Delivered, TimedOut, Undeliverable). As the server receives the message, it sends back to the client a reply status message of In Transit. It does so using the same message’s conversation. It also saves – along with the message – its conversation handle. The dialog is not closed. After a while, the server may decide that the message has gotten to a final state (Delivered or TimedOut). I would like at that time to send a reply status message (Final State) back to the client and also close th ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Path to becoming a professional game programmer
I'm sure a lot of aspiring game programmers out there are looking for a road map on how to become a pro. (I know I am!). Based on all the great products coming out, and the ones that already exist, it's probably very confusing for someone new to this. I put together a quick "road map" based on my (limited) knowledge to help those rookies get to the finish line. Please feel free to add to, change or comment...especially if you're already in the busniess! Update(11/22/06) - moved some items around and added new categories based on suggestions Beginner - Torque X Create some simple games with TorqueX Game Builder ...can't comment much more on this since I've never used it Begi ...Show All
Windows Forms CheckBoxList does not contain a public definition of 'GetEnumerator' error
Hi, I have a CheckboxList on a web form. I want to cycle through the checkboxes in the list to determine which boxes have been checked. Seems easy enough..but I'm getting an error that the "CheckBoxList does not contain a public definition of 'GetEnumerator'". Here's my code: foreach ( CheckBox cb in cbSRlist) { // get Sales Region the user has access privs for if (cb.Checked){ Response.Write(cb.Text + "<BR>" ); } } ...the error is actually caused by the foreach statement which can't operate on the checkboxlist because it doesn't have a public def of 'getEnumerator. The same error occurs if I replace 'CheckBox' with 'ListItem' in the above foreach stmt. what am I missing th ...Show All
Visual Studio Express Editions How to compile C using Visual C++?
Is that possible at all If it is, what are the steps to compile a C program in Visual C++ When I start up a new project, what kind of project I should pick Many thanks! Hi.......... Yes..You can compile your c programms in visual c++. 1. Open Microsoft Visual Studio 2005. Go to File Menu click New->Project. 2. Select Visual c++ and select win32 console application from the template menu. 3. Give File name with .c extention then press ok. (ex:- helloworld.c ). ...Show All
SQL Server Toolbar available with Web Service?
Hello - I am trying to find out whether the Toolbar is available when using the Reporting Services Web Service interface. Right now, I am using the Web Service to render a report, but the Toolbar does not appear. I have set the <Toolbar> element in the DeviceInfo string to true. thanks - will I am using RS 2005...but I am trying to integrate RS with a ASP.Net 1.1 site...and using VS.Net 2003 for dev. Too bad there isn't a control like the ReportViewer for VS.net 2003. Oh well...thanks for the info. And..thanks for the great book. I purchased your RS book in electronic format a year or so ago. ...Show All
Visual C# DataGridButtonColumn
Hi People, I have created a DataGridView and added a DataGridViewButton to the column. all is good. I run and i see buttons. But , what event is it that catches when you press the button. I have used other thrid party comps that make it easier (OnCellButtonPress) or something similar, but now i have made it a mission to figure out how it works in a standard DGV component. Can someone help please KM ...Show All
Visual C++ Function pointers, pointers and references confusion
I'm struggling to get my head around this, I'm not entirely sure what is happening here. Wondering if someone could offer a detailed explanation as I can't find an answer elsewhere. In project InterfaceDLL which is a static lib although Interface.h does not make up part of the static lib. class DLLManager holds Interface * m_pInterface; in DLLManager.h. Interface is a struct in Interface.h declared in Interface.h not inside the struct and as extern "C":- bool GetInterface( Interface ** pInterface ); typedef bool ( *GETINTERFACE ) ( Interface ** pInterface ) Inside DLLManager.cpp in function LoadDLL() GETINTERFACE _GETINTERFACE; _GETINTERFACE = ( GETINTERFACE ) GetProcAddress( m_hDLL, "GetInterf ...Show All
