toni70000's Q&A profile
Smart Device Development Debugging DLL...
Hi All, How can i debug a dll from my application written in C#. Dll is written in native code. I did not able to debug both simultaneously. I have checked the forums but did not find the solution. thnx In your VS 2005 hit F1 button. In the help menu click on “How do I...” drop down and select “Smart Devices”. Click on “Debugging...” link. Click on “Walkthrough: Debugging a Solution That Includes Both Managed and Native Code” Read is. You all set - debug your application and DLL using same technique ...Show All
Smart Device Development auto complete for COmbo Box
hi all, i'm building a auto complete combo box, problem is i have alot of items in my combo box. Is there anyway to search through the combo box without looping through the whole thing. Say if you're looking for the last item, you don't need to loop through from item 1 to the end Here's my code : Public Function PointToComboItem(ByVal cboComboBox As ComboBox, ByVal strValueSearch As String) As Boolean Dim i As Integer Dim currentIndex As Integer If cboComboBox.SelectedIndex < 0 Then currentIndex = 0 Else currentIndex = cboComboBox.SelectedIndex Try If Trim(strValueSearch) = "" Then Exit Function For i = 0 To cboComboBox.Items.Count - 1 cboComboBox.SelectedIndex = i If Left(Trim(c ...Show All
Windows Forms How to total up a column in datagridview?
Hi, I have a datagridviewComboBox which specify the ProductName and after user choose the product, the Qty as well as Unit Price, the LineTotal will reflect the total amount for that row. I need to add up all the rows od LineTotal and put the total amount into a textbox. How can I go about doing this Thanks i think you might have binded the datagrid with dataset, now loop the dataset values as, now in the currentcellchanged event of the datagrid loop the following code foreach(DataRow r in dataset.tables[0].rows) int i = 0; { txtTotal.text = i + r [Amount].tostring(); } try this ...Show All
Visual Studio 2008 (Pre-release) Moving objects around in a Viewport3D using mouse ?
I guess this imply transforming mouse position input into 3d world space. Looking at trackBall sample from Daniel LehenBauer, it seems that there are some methods here that would help to perform this but i can't find any way to achieve this. any Hint Hi, Did you ever get this working matey ...Show All
Windows Forms GDI+
when ever i use something like: System::Drawing::Pen ^pen= gcnew System::Drawing::Pen(System::Drawing::Color::Black, 100); grfx = System::Drawing::Graphics::FromHwnd( this ->Handle); grfx->DrawLine(pen, 1, 1, 1 ,20); Threading::Thread::Sleep(1000); grfx->Clear(System::Drawing::Color::White); it draws ok. but when ever i move the app offscreen the line that i just drawn, dissapears. how do i fix this thanks in advanced, Dan. You should ideally not use Graphics::FromHwnd, but should rather place your drawing code in the OnPaint override or the Paint event. These will pass you a PaintEventArgs that contains a graphics surface to draw to. You will also then not need the Thread::Sleep either. ...Show All
.NET Development Yet another GC question
I would be happy if someone will be able to answer the following question. recently I was investigating memory leaks & handles problem during my work. I have seen a very strange phenomenon: I have a class that exposes only static methods. on one of the methods I do the following things I create an start thread The ThreadStart delegate calls a method that call GC.Collect() & GC.WaitForPendingFinalizers(). Most of the time the new thread never finishes it's work because it gets stuck in GC.WaitForPendingFinalizers(). The only scenario that this thread is resumed is when I activate another GC collection from my program's console menu. The whole phenomenon doesn't happen if I make the following changes: I use gc ...Show All
SQL Server Excel flat file connection manager error.
Hi There I am having some issues with dts packages i have migrated using the package migration wizard. One of the connection managers points to an execl flat file source. I have not altered anything after the package migration, the conenction manager is using Native OLE DB\Microsoft Jet 4.0 OLE DB Provider. When i test the connection i get the following error : "Test connection failed becuase of an error in initializing provider. Cannot start your application. The workgroup information file is missing or opened exclusively by anotehr user." Ok i am 99% sure this file is not being accessed by another user, the rest of the error is greek to me. Looking on the net for this error it has to do with access database se ...Show All
Software Development for Windows Vista WCF activities, in a Winform host application and state machine WF.
Hello everybody. I've created a workflow template in which there host application is a Winform app. This application runs a workflow using thread donation technique (using ManualWorkflowSchedulerService). Now, I've created some custom activities: one of them is used for navigation between one form and another in host application. Well, I did an Execute method override and, instead of invoking externaldataservice contract method (like the job done by a CallExternalMethod activity), I called directly the winform application classes for changing forms. Is it correct or is better to call CallExternalMethod activity Another question: I would like to create some custom activities to perform WCF service invocations, like sendmessage, receivemess ...Show All
SQL Server Reporting on a Cube -- Time Dimension Issue
Hello, I have an Analysis Services Cube that I would like to report on. However, the Time Dimension currently only has four columns, Day of Month, Month(name) , Year, and DateKey (DateTime representation at midnight for every day). Thus when I drag the month attribute onto the report, it is sorted April - August - December - etc. instead of Jan - Feb - Mar. How do I fix this I remember reading something in the MSDN Library about it but I can't find it again now. Thomas Hmm, I haven't added any sorting, this is just drag-and-drop from the list of dimensions in the "Report Builder" tool for Reporting Services and in Visual Studio. So I haven't added any sorting, however in VS I can modify the User ...Show All
.NET Development How do i keep Instance of current dataset???
I have a Datagrid.DataSource = mydataset.....when i add new rows to it and close out the form and then i try to open that form back up...the form is blank...why is that Ok Well i have an OrderEntryForm which is my parent form...I have a child form called Order Details that shows a grid with two columns Name and Cost...When i enter the Name and Cost in that grid say I add three row of data...I Close that form and my txtTotal reflects the cost by using this method... this .txtTotal.Text = Tracking.UI.Dialogs. OrderTotal .DisplayOrderCostTable( this ._Order, this ).ToString( "$#,##0.00" ); Here is that method signiture public static decimal DisplayOrderCostTable(Tracking.BusinessObjects. Order _order, Syste ...Show All
Visual Studio Team System error with unit testing web site
I have a web site (IIS based) and now trying to write unit test for that. I keep getting following error for a simple method test: - "Could not connect to the web server for page 'http://localhost/Support/Training.aspx'. The remote server returned an error: (404) Not Found.. Check that the web server is running and visible on the network and that the page specified exists." I can browse the page without any error though. Here is my code in Training.aspx.cs public string SayHello() { return "Hello"; } and my test code is - [TestMethod()] [HostType("ASP.NET")] [UrlToTest(" http://localhost/Support/Training.aspx ")] public void SayHelloTest() { PrivateObject po = new PrivateObject(TestContext ...Show All
SQL Server SQL Server 2005 Failovery from only Mirror DB
Hi Everyone; I have a SQL Server 2005 DB server (SRV1) and a mirror DB server (SRV2) without witness server. I saw that there is a "Failover" button on Mirror window of SRV1. When click it servers changes roles. My question is that: If my mirrored DB server crashs and I can not open windows or if I lost all data on SRV1, how can I failover from only mirror DB (SRV2) Thanks in advance. Senol Akbulak I want to failover when principle server crashed. When I run "alter database <dbname> ser partner failover" T-SQL on mirror server I get this error : The alter database for this partner config values may only be initiated on the current principal server for d ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How do I protect my code when distributing it?
Having read the FAQ. I noticed that in order to share your game creations (and lets face it, you can't get recognised without sharing your games), you need to send the other person the entire uncompiled game. This includes sourcecode, graphics, music, sound etc. etc. They then compile the code and download it to their xbox360 account and then only if they too are on the games creation program. My key worry here is that you send them everything you have just worked incredibly hard to create. Presumably they can then send this stuff on to whoever they please and god forbid, even sell it on! It strikes me that there isn't much incentive to distribute things this way. How is Microsoft going to prevent the above scenario Is there going to be a ...Show All
.NET Development Trouble Iterating through htmldocument links in VB 2005.
I'm learning Visual Basic 2005 and have come to a problem I'm not sure how to solve. I have a web browser that pulls up a web site and I'm trying to iterate through the htmldocument.links collection. Here is a little bit of code to show how I was trying to do this. Public Class Form1 Public IE7 As New Person Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Me .IE7.CollectWebPage( "http://en.wiktionary.org/wiki/Special:Allpages" ) End Sub End Class Public Class Person Public Function CollectWebPage( ByVal Address As String ) Form1.WB.Navigate(Address) While Form1.WB.IsBusy End While ...Show All
Visual Studio Express Editions RTB
Thanks for the help but i want to be able to select a picture from a file to appear in the RTB, I would like to be able to insert picture from file like you can do in microsoft word, does eny 1 know how (im new to coding so im only learning) Dim MyImage As Image = Image . FromFile ( "ImagePath.bmp" ) My . Computer . Clipboard . SetImage ( MyImage ) Me . RichTextBox1 . Paste ( DataFormats . GetFormat ( DataFormats . Bitmap )) ...Show All
