HJ2PM's Q&A profile
.NET Development help needed in pixel operation
hi, I want to know the difference of the below, 1. Doing image operation with the manipulation of getPixel() and setPixel() methods. 2. getting the address of the first pixel data in the bitmap using the code, BitmapData bmData = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); int stride = bmData.Stride; System.IntPtr Scan0 = bmData.Scan0; How these two differ thanks in advance. Uvaraj T Yes, the LockBits/UnlockBits idiom always requires a minimum of 2 API calls. But if you're working in a loop that touches every single pixel in, say, a 1,000,000 pixel image, then SetPixel will end up calling GdipBitmapSetPixel 1 ...Show All
Visual Studio Express Editions com in separate memory area
Hi all, How to load com object in different memory location. I have 3 com object and it's hold in hashtable but problem is that it over write with each other. I have .net 1.1 version. My com object is used to instant messaging Problem description : step 1 - initialize com object and log on to first user -- it's logged on well and work and it hold in hashtable Step 2- Initialize second com object and log on 2 user -- Logout first user hold it in hashtable Step 3- Initialize 3 com object and log on 3 user - logout second user and hold it in hashtable, finally we have get only last user logged on. pls help me. Are you actually creating a new COM object instance or are you re-using the existing one Be sure to use the New keywo ...Show All
Visual Studio Tools for Office Working with VSTO, sending data to Excel from Visual C++
I installed VSTO, but I don't know how to use the assemblies they have. I can't find Microsoft.Office.Interop.Excel. Please explain me how add this assembly to my project. Or how to send data from VC++ to Ms Excel 2003 Thank you. VSTO is a "snap-in" for Visual Studio that allows you to attach managed code - writtin in C# or VB.NET - to an Excel or Word document (as an alternative to embedded, native VBA projects). You don't explain what you hope to accomplish with VSTO, but if your programming language is C++ it's definitely not a tool you can use... ...Show All
Visual C# foreach usage with arrays
In the tutorial: http://programmersheaven.com/2/Les_CSharp_8_p2 In page that discusses arrays, it mentions using a foreach with array indexing: foreach(int [] row in myTable) { foreach(int col in row) { Console.WriteLine(col); } Console.WriteLine(); } int[] is the int array type row is what a keyword here or just a counter variable made up and then myTable is the array that we are indexing. Can I please see another example of using foreach for an array. This one isn't quite clear enough for me. When I try comparing this to a for loop, I don't see the starting cntr and how it cycles through. That is wonderfully clear, thank you sooo much. If only the help in the msdn li ...Show All
Visual Basic print xlworksheet for each row in datatable
I can print an excel worksheet by looping through a table Dim iddatatables As DataTable = Me .RcsDataSet.DailySales Dim idx As Integer = 1 For idx = 0 To iddatatables.Columns.Count - 1 Next Dim row As DataRow Dim rowidx As Integer = 5 For Each row In iddatatables.Rows For idx = 0 To iddatatables.Columns.Count - 1 xlsheet.Cells(rowidx, idx + 1) = row(idx) Next rowidx = rowidx + 1 Next Catch End Try xlsheet.PrintOut() xlsheet = Nothing xlwb = Nothing XL.Quit() XL = Nothing GC.Collect() But, I need to print a separate xlsheet for each row in a datatable. Dim i120datatables As DataTable = Me .RcsDataSet.Billing120 For ...Show All
SQL Server How to Fax Reports from SSRS 2005
How do I fax out reports from SQL Server Reporting Services (SSRS) 2005 I tried RightFax 6.0 but it didn't work. You will need to create a custom delivery extension. The best way would be to start with the Printer Delivery extension that comes with the SQL Server Samples. Bret Updegraff Microsoft MVP,MCAD,MCSD,MCDBA Author - Reporting Services In Action 2nd Edition http://www.manning.com/updegraff ...Show All
SQL Server Execution of report times out
I am having major problems with some of the reports that i run. Some of the larger reports are running for 20-30 mins and then timing out, allthough the actual sql stored procedure behind the report only takes 2-3mins to run. I sometimes get an rsexecutionnotfound error which looks like the chunk data has been removed by ssrs before it is sent to the screen i am getting to the end of my teather with this as i have gone through everything that i can find to try and stop this happeneing and after 2 months of investigation still nothing. There is one thing that seems to speed up the reports and that seems to be if i pump the data for the report into a new table and then ref that table in the report which only takes a couple of seconds i ...Show All
SQL Server autogrow of log file possibly cause timeout?
i had a problem with a server instance where an app processing a file and putting the data into the database using a stored procedure was timing out. the app is a service and in the case of errors, will try to process the file until it has been succesfully added data to the database. in the event viewer i keep seeing this message during this timeout period: "Autogrow of file 'mydatabase_log' in database 'mydatabase' was cancelled by user or timed out after 15687 milliseconds. Use ALTER DATABASE to set a smaller FILEGROWTH value for this file or to explicitly set a new file size." is there a possibility that this process was causing my SP to timeout are there any other log or debug files that SQL Express creates that might b ...Show All
Commerce Server Discounts for Products vs. Discounts for Categories
While I realize there are some other threads on this forum dealing with this subject, none of them have provided a working solution for me as of yet. I have set up a simple discount for a category (buy 2 items in this category, get 10% off). I'd like to show this discount when the user views the product detail for a product in this category. I've tried using the following code to do this. While I can see all the available discounts before applying the filter, none are returned after calling ApplyProductFilter. private DiscountItemCollection GetRelatedDiscounts() { DiscountCriteriaFilter filter = new DiscountCriteriaFilter(); filter.FilterOnAward = false; filter.FilterOnCondition = false; filter.IncludeDiscountsWithElig ...Show All
Visual C# The Order Documents are Opened in Visual Studio 2005
Hi There is a small problem that is making me suffer Big Time. When I am in Visual Studio 2005, and Open Code Files, the code files' FileName appear on the top part of the IDE in Reversed Order: Most Recently Opened File appears First! On the Left, and in prior versions of Visual Studio, each file you open, appears with its filename on the top, from left to right: First=Oldest, Last(on the right)=Newest. How can I make VS2005 work like all other versions of VS used to work I am looking in the Options for changing this reversed order thing back to normal, but I cannot find what I need :( Please help me.. I downloaded the service pack hoping this lunacy would be resolved but as y ...Show All
Smart Device Development Conforming form like message box in C#
I want to create a windows form like a message box. This form will act as a calculator. Can I perform this I mean, can I create a form which can move on the pocket pc's desktop This is pretty simple actually. The following lines in your InitializeComponent should do the trick Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoScroll = True Me.ClientSize = New System.Drawing.Size(100, 100) 'The important line Me.ControlBox = False Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.TopMost = True Me.ResumeLayout(False) ...Show All
SQL Server Master and SubReports
Hi All, I am new to Rs2005. I have 4 seperate reports, r1, r2, r3, r4,.....etc. I want these reports to be called in sequence in a Master report. I want to make all 4 reports 1 big report. Can this be done, and if so can somebody please point me in the correct direction. Many Thanks in advance. Kenny You can put all data regions in one report, but that is no good to me as i need to be able run the master report or a subreport. So I just created a master report and dropped subreports in the body. Let me know how it goes, i am here all day. ...Show All
.NET Development final year project problem..
sorry... i dun know where should i post this topic.. i hv a final year project, wan do something wit mobile phone. something like this, computer send a msg to mobile phone, then mobile phone received the msg. a microcontroller is contact wit mobile phone, micop will read the msg and do the things. after tat will reply a msg to computer. my problem is: 1. how to send msg to a mobile phone by write a program. 2. computer how to receive a msg from mobile phone. is it need convert to email or wat i no idea to start, dun know how to move down to the next step, can anyone give me some info or comments thanks a lot you can develop a .NET based application both the PC and the Windows Power ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Deploying to 360
Hi, In the XNA Faq, when it talks about giving a project to other people to deploy on their 360's, it says you must give them all the assets and source code, so that they can build the program and squirt it onto their 360. My question is: will it work if you give them a project with the C# source files removed ie they have the assets (either as source graphics and sounds, or the built files) and the .obj's, just not the C# source. What happens if the project is dependant on an external DLL Will I need to ship a project that builds this, too Again, can I get away with excluding the C# source Many thanks, Mark Whether you want to obfuscate or not is completely up to your own discretion. It seems like a lot ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Performance profiler and obfuscator
I have two software questions. First of all does anyone know a good performance profiler package (besides CLR) Secondly, what is the best way to secure your intellectual property, by using an obfuscator or are there alternatives. What are the thoughts of Microsoft on this part. Cheers! Remmie wrote: ... does anyone know a good performance profiler package (besides CLR) ... Ants from Red-Gate has done well for me in the past: http://www.red-gate.com/products/ants_profiler/ ...Show All
