bobbins's Q&A profile
.NET Development System.Drawing.Imaging trouble
Hi, where's the best place to ask a question about trouble with System.Drawing.Imaging I couldn't find any special forum for this. Too bad you didn't use my code, you would have been done a while ago. To get yours to work, change it like this: ep.Param[0] = new EncoderParameter(Encoder.Quality, (Int64)80); ...Show All
Software Development for Windows Vista StateMachine invoke SequentialWorkflow
Hi together, I am using a state machine workflow which invokes another sequential workflow. The sequential workflow gets called but after the sequential workflow has finished, the parent workflow (which is a state machine) switches to the completion state. Example: Sequential Workflow ^ | State A ---> State B ----> State C ----> Completion State As you can see in the sample "State B" invokes "Sequential Workflow". And now when the sequential workflow gets finished, the parent state machine switches to the completion state instead of "State C". Any ideas what's wrong here Cheers, Franz Could you please provide a couple lines of code sh ...Show All
Visual C# How to copy a char[] array to a string?
Hi! anyone knows Is there a method or function in c# to copy to a char array to a string I want to implement it like this: // define somewhere; string str_A=""; char[] char_B = new char[16]; //value it in otherplace; char_B="fdfdfd"; str_A=char_B;//error thankyou! You can use the string constructor that takes a char array: char [] chars = new char [] { 'a' , 'b' , 'c' }; // Create a new string instance that takes the char array. string s = new string (chars); ...Show All
SQL Server SSIS - Connection String Issue
Hi I have been trying to resolve a connection string issue all day, and havent figured out whats the problem. I keep getting the Acquire Connection error everytime I run my package. Can you someone review the format of my connection string, and confirm that it is indeed the correct format: I have two conn strings specified in my config file, one is to connect to a remote database and one is for local. I have validated the connectivity from my server to these databases via Management Studio, and it seems to connect fine. But when I run my package it keeps failing. SQL Server Authentication(Remote Database Server): Data Source=server_name;Username=useraccount;Password=xxxxx;Initial Catalog=dbname;Provider=SQLNCLI.1; Window ...Show All
Windows Forms Datagridview and Textbox
I have a bound datagridview what i would like to find out is there a way to SUM the subtotal column and display the result in a textbox to show the sumed subtotal amount.Thanks barryt Here are 2 examples the first is where I get the SubTotal from the database. Note the SubTotal will not change if the unitprice or quantity change. public partial class Form1 : Form { DataTable dt; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { String strConn = "Server = .;Database = NorthWind; Integrated Security = SSPI;"; SqlConnection conn = new SqlConnection(strConn); SqlDataAdapter da = new SqlDataAdap ...Show All
Microsoft ISV Community Center Forums Adding table in Word Doc over writes previous lines
Please excuse what is probably a simple answer - I am very new at VBA. I am using VBA in Excel and attempting to write to a Word document. The document is to have a few lines of text followed by a 6x6 table. When I do a: Set tableNew = .Tables.Add(.Range, 6, 6) it overwrites the previous lines I wrote. I'm sure there's a way to place this table in the appropriate spot in the document, but I've been unable to find any documentation on this. Can you offer any help with this Thanks, kgkidd The VBA help on the Add method of the Tables object says, "the table replaces the range, if the range isn't collapsed" . Sub AddTable() Dim rng As Range Dim tbl As Table 'set rng to first p ...Show All
Smart Device Development Why is the CF 2.0 so huge?
Hi, I was told that .NET CF 2.0 is roughly 8 - 9 MB but I just downloaded .NET CF 2.0 Redistributable and its around 25 MB! Why the huge difference Zii SvenC wrote: Hi, I guess the person telling you that made a mistake. Even the latest 1.0 CF has 14MB. -- SvenC guessing I didn't make a mistake after all, thanks all the same. ...Show All
Visual Studio 2008 (Pre-release) Proxy generation problems (methods with same name)
When I create two services which happen to have methods with the same name (not same signature) svcutil incorrectly generates the proxy types. For example if I have two services TestService1.Get(Guid id) returns Thing1 TestService2.Get(Guid id) returns Thing2 The proxy for both TestService1 and TestService2 will contain a get method with the return type of Thing1. What do I need to do so the proxy generation correctly identifies the types to return -k Svcutil command: svcutil.exe /noLogo /l:csharp /config:"TestProxy.config" /d:"C:\Temp" /out:"TestServiceProxy.cs" "http://localhost/ClaimServices/TestService1.svc" "http:// ...Show All
Visual Studio 2008 (Pre-release) Why does ClientBase Dispose need to throw on faulted state? (Or, what's the difference between close and abort?)
Could someone enlighten me as to why calling Dispose on a faulted client proxy needs to throw an CommunicationObjectFaultedException instead of just aborting the client Essentially we have to do this: Client c = new Client(); try { c.Foo(); c.Close(); } catch (Exception) { c.Abort(); throw; } Instead of: using(Client c = new Client()) { c.Foo(); } Yes, I've read the justifications in the SDK and here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=627970&SiteID=1 but the "summary of internal discussion" seems to be "well, that's what we're doing, so deal with it." I still don't understand why Close must throw instead of just, well, closing I know I'm going to have to live with i ...Show All
.NET Development Remoting vs Web Services
Hi All, I'm migrating a desktop application into 3 tier web application, client, middelware and databse server, client is going to be a windows forms application, dababase is SQL Server 2000, hosted on internet. I'm not sure how to build middle ware to communicate the client and the database server, shuld I use remoting or web services can some one tell me advantages and disadvantages for using web services vs remoting How should I know what architecture to use thanks, Horacio ...Show All
Visual Basic Scrolling Text/RTF Box
I am interested in creating a scrolling text status control where the latest inputs appear at the top jof a text box and the older information is scrolled down. I don't have a lot of text information to manage, maybe 50 lines or so. I was thinking that I could create a string variable with the present contents of the text box and then insert my new information to the top of the string wih an vbcrlf and then replace the old text in the text box with the new string. Are there any simpler ways to accompish such a task. I use this status text box to capture error messages and other program generated messages. Thanks, Fred Dim TheText As String = String . Empty For x As Integer = 0 To 10 TheText = ...Show All
Visual Studio Opening new project from VSS 6.0c from Visual Studio 2005 creates duplicate folder structure
Hi, I have a really strang situation occurring when I create a new project from Visual Studio 2005. If I create the project from VSS along with the folder on my disk to put the project in, I get duplicate folders! For instance I open Visual Studio go to Source Control->Open From Source Control have it create a folder C:/PSI. I then see all the files being added from VSS. When I review the project and the corresponding folder on disk I now have C:/PSI/PSI/PSI ! I'm then unable to build my application because I get a build error from my web.config file. Anyone experience this before Is it my VSS setup from within VS any suggestions are welcome! thanks, -Marilyn From looking at C:\PSI\PSI\PS ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Device lost handeling
Hi all, I'm trying to handle to find a problem for losing a device. I created a method that runs before Device.BeginScene(). This is what Happens in the method : I undestood that I have to dispose all textures, and afterwards call Devie.Reset(PresentParameters). I used the PresentParameters that i used for creating the device in the first place. The exception i get is InvalidCall Exception which as i understood usauly means that the parameters i used with this method are not ok. so i tried to create a new PresentParameters instance, but the same exception was thrown. Am i right about what to do on device lost Any ideas to solve the problem Thanks. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Rotate and translate
It must be late or something because I can't get something pretty trivial to work. I'm getting input from the XBox controller...specifically the right joystick. Any Y movement is supposed to make my model move along the Z axis. Any X movement causes the model to rotate around the Y axis. Simple enough. When I move the joystick directly forward the model moves...if I move the joystick directly to the side the model rotates. When I move the joystick diagonally thus getting input from both the X and the Y axis the model does not both translate and rotate. It doesn't do much of anything. Heres my code.... if (state.ThumbSticks.Right.Y != 0) { Vector3 newPosition = new Vector3 (); newPosition.X = hm.Model.Bones[ " ...Show All
Visual Basic Using Return insted of Exit Function
I've been doing some internal code review here at my company and have seen varying degrees of inconsistency with coders exiting a function with "Return" or "Exit Function". I want to address this and give them a reason to use "Return", but thinking about this, I realized that I wasn't entirely clear myself why I would prefer them to do this other than it seems more .NET. The entire development staff is coming from VB6 and we are working on porting the old VB6 code to our updated VB.NET application. So I know to convince them to use "Return", I'm going to have to give them more than, "it looks nice". So here is an example of what I consider the old VB6 way and is what I would like to remove ...Show All
