Suresh .M.V's Q&A profile
Visual C# Help with PrintForm PowerToy
I downloaded the Print Form powertoy for Visual Studios. My problem is that I have a form with is scrollable, but when I print the form out the printer stops printing about halfway down the form. I suspect that it may have something to do with the the current focus of the form, but even after adding the "Scrollable" option to the code it still does not print the entire form. Here is my code: private void toolStripButton1_Click(object sender, EventArgs e) { printForm1.PrinterSettings.Copies = 2; printForm1.Print(this, Microsoft.VisualBasic.PowerPacks.Printing.PrintForm.PrintOption.Scrollable); } The other question was that the examples in the included docs are in VB, and sense I am using C# I was wonderin ...Show All
Software Development for Windows Vista Visual resizing
Hi! I am re-hosting the workflow designer. Is there any way to enable visual resizing of the activites in the workflow Thanks! hi. the BPDesigner dose not need to be inherited from the FreeformActivityDesigner . but the Designer of the container activity that contains WorkProcessStep Activity must Inherited from FreeformActivityDesigner. because ,it the child activity be resize ,the parent activity's designer layout will be change. the FreeformActivityDesigner provider this funtion. ...Show All
Visual C++ C and .net
Hi, I've lots of programs written in C (not C++) and I want to include some .net framework in them. How can I do I've Visual Studio.net 2005. Thanks. SerialH well it is prbly practically impossible to use .NET from a C compiler, but.... since C++ is backwards compatable with C you may be inluck. It is possible to call a pointer to a managed .NET class in native C++. first make a native class in VS, than declare the managed object you wish to use like so: gcroot<ManagedClass^> MyObject; Now copy your old C code into the class in an appropriate place; you can now use C/C++ to do stuff with the .NET MyObject Also don't forget to include vcclr.h, otherwise it won't work. ...Show All
SQL Server Dts Package foreach loop container and Excel connection manager
How can I use a foreach loop container with an Excel connection manager. It is virtually impossible to configure the ConectionString property through expressions builder. Everything works fine with a Flat File connection manager but when it comes to Excel, I get the following error message: Error 1 Validation error. Extract Four: Extract Four [1]: The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. Tarification.dtsx 0 0 Please ! Heeeelp ! tel me how I can loop through Excel files ! Thanks Rafael !!!!!! Here is what my problem was : When I created the varFileName variable, I simply did not assign it a value ! I just c ...Show All
SQL Server CmdExec Step in SQL Agent job not catching error
I have a SQL Agent job on SQL Server 2005 that uses a CmdExec step to run a C# console application. The same job used to run on a SQL 2000 server and whenever the C# app failed, it raised an error and the SQL Agent job would fail as well. Now in 2005, the same error is raised, however the SQL Agent job is left in an "executing" state, preventing me from using a notification to alert me to the failure. Has anyone run into this same problem Any suggestions Thanks ...Show All
Smart Device Development SystemProperty.Date/Time data type
Hi All, I am trying to use the managed state and notification broker API (Microsoft.WindowsMobile.Status.SystemState) and am struggling with date / time values. For example: SystemState.GetValue(SystemProperty.Time) returns a byte array of length 8. Does anyone know what this represents and how to convert it to a usable time value Ultimately, I want to launch an application when the time equals a specific value but I need to understand what to use for SystemState.ComparisonValue before I can do this. Thanks, Joe Hi Fabio The binary representation of a 64 bit integer can be expressed as an arry of bytes. Good articles on how this work are available here: http://en.wikipedia.org/wiki/Little_endian and h ...Show All
Visual C# report logging
hey guys, i'm relatively new to c# and i've got a important project using c#.. why blame my school.. anyway, the project i'm working on, involves the saving of Logs.. for reference.. however, these logs only store 1 entry at any given time. should there be more than one user accessing the database at one time, it might cause the system to crash. it'll be so darn helpful if anyone can tell me what method i should do and stuff. or perhaps a certain phrase i can use to search up on relevant information. i'm in need of help badly.. thanks in advance. the report.. or logs, are stored as text files.. these text files are time stamped.. example, 2006-12-14 16:25:19.34 ****** Using '********.DLL' version '*.* ...Show All
.NET Development underlying connection is closed
we have thick client winforms application which consumes a webservice . this throws up an excepyion of type System.Net.WebException "Underlying connection was closed. An unexpected error occured on recieve" We have tried to override GetWebRequest method in Reference.cs by setting KeepAlive = false. But it does not solve the issue. The timeout on IIS has also been increased without much luck. Any thoughts is greatly appreciated Have you checked to see if the webservice request is executing correctly or if it's generating an exception If an error occurs on the server side it would stand to reason that the connection would be closed. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. N00b Maths question - calculating radian angle for rotation of a sprite based on two points in 2d
Apologies for my poor mathematics here, but I need to ask the greybeards for some advice: I have two points on a 2d plane, offset so there is one "top-left" and another "bottom-right". I need to join these two points with a straight line by scaling a single dot sprite from one point to the other. If I know the x,y co-ordinates of both spots, I can get the overall length of the scaled sprite, but how do I calculate how far I need to rotate the scaled sprint around one end point to "join" the points together Thanks in advance for any help you can give. P I made a simple program, *warning it is really dirty* Game1.cs and the sample pixel pixel.bmp Or download the who ...Show All
Windows Forms Datagridview problem adding new row!!!
I have a problem with dgv, the point is: i have a help window that displays a code and description of that code.... example: Client ID and Name... I doubleclicked the first cell of dgv to call my help, all is right... but it doesn't open a row to display the values to each cell where i need to place them... Also, it shows the code value after i left the first cell.... i think it's because it never opened a row.... What can i do with this ...Show All
.NET Development Problem updating record
Hi, I've the following code used to update a record on my Access database: con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=""C:\Programacao\Visual Basic\Inapal\ReportIt\ReportIt.mdb"";" con.Open() sSQL = "SELECT * FROM [Utilizadores] WHERE (User= '" & Utilizador & "')" da = New OleDb.OleDbDataAdapter(sSQL, con) ds.Clear() da.Fill(ds, "Utilizadores") ds.Tables(0).Rows(0).Item("Password") = NewPasswordTxtBx.Text da.Update(ds, "Utilizadores") con.Close() Me.Close() When I try to update the record I get the following error: "Update requires a valid UpdateCommand when passed DataRow collection w ...Show All
Visual Studio Express Editions Help Needed
Hi folks, I need to locate a tutorial for a craps dice game for learning purposes can someone help with a link or something any other information will be helpful. Thank you for your support. DKB Ever heard of Google ...Show All
Visual Basic Working with arrays
hi, i'm currently working with a function that queries a database for a number of employee id's. i'm trying to save all results in an array and pass then to another function via return. how can i add to an already populated array since i'm using data reader and how can i pass the whole array in return. my code is something like this: dim employee_ids() as string while reader.read ' data for storing to array is reader.GetValue(1).ToString() ' how do i add to the existing array with existing values end while return employee_ids ' how do i pass the whole array in return thanks in advance, dave You don't need to pass the array byref. Lars has the correct answer (in theory, anyway). Yo ...Show All
.NET Development Simple Telnet Problem
I need help, how do I get the variables I need from this in order to stream recieved data, allow sending data, and allow the rest of the XNA program to run Or is this the wrong way to go about doing it public class telnet { public static string DoSocketGet(string server, string command, int port) { Encoding ASCII = Encoding.ASCII; Byte[] ByteGet = ASCII.GetBytes(command); &nb ...Show All
Visual Studio Team System Rename command is very slow
Hi, I have to rename thousands of files in TFS. So I wrote a small tool to do it. However I found it performed very poorly. It took 5 minutes to rename 200 files. I have tried using tf.exe command and the VersionControl API. Both of them are very slow. Is it a known issue Thanks, Heng-yi Hi, It's actually a lot worse. I let the rename command run overnight. The following is the result I got back in the morning. I ran 6 batches of tf.exe command. Rename 353 files: 50 minutes Rename 353 files: 42 minutes Rename 353 files: 76 minutes Rename 388 files: 185 minutes Rename 388 files: 288 minutes Rename 388 files: 363 minutes In the beginning of the rename command I watched the CPU usage in t ...Show All
