WayneSpangler's Q&A profile
Visual C# String Mid in c#
In VB we could use: b$="abcdef" a$ = mid(b$,2,1) which would pickoff the second chr for a length of 1 from b$ how do we do it in c# Substring is indeed the equivalent, but be aware that it is 0-based (like everything else in the framework), while the classic VB string functions are 1-based, so adjust accordingly. David Anton www.tangiblesoftwaresolutions.com Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: C# to C++ converter, VB to C++ converter Instant Python: C# to Python converter, VB to Python converter ...Show All
Windows Forms toolStripButton
For some reason the toolStripButtons on a toolstrip don't have a handle when using Spy++. At the same time a toolStripComboBox on a toolStrip has handle. I am tryign to send a message to the toolStrip buttons but I can't because thre is no handle. Is there a workaround Why doesn't a toolstripbutton have a handle and a toolstripcombobox does Thanks a lot! Maybe this article and code will help... ...Show All
Software Development for Windows Vista Changing the workflow's controls properties at runtime
Hello, I'll explain my situation: I have a document validation workflow, where 3 different ranks of users can post documents and their superior rank has to validate them. I use an sql role provider with the 3 roles defined. When a user wants to submit a document he has to fire an event ("start workflow"). My idea is that after receiving that event I would like to insert a code activity where I check the username of the person that fired the event and check wich is his role. And then based on that role, I would change the "Roles" property of the other event handlers to set it to the role of the superior that has to validate. So for example, a person with the role "Technician" submits a document. Then afte ...Show All
Visual Basic Using Enter To Tab Forward Through User Entry Fields
Does anyone know how to incorporate the enter key to tab through entry fields instead of using buttons My code is below. I want the user to press the enter key to move from one field to the next and at the same time, have the code perform the same action(s) as if it were a button handle event. Public Class Form1 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim file As System.IO.StreamWriter Dim aString As String = CStr (TextBox1.Text) Dim TestLen1 As Integer = Len(aString) If TestLen1 <> 5 Then aString = "a c" file = My .Computer.FileSystem.OpenTextFileWriter( "C\:record.tx ...Show All
Visual Studio resize ReportViewer control to Report's height
Does anyone know how to dynamically resize the ReportViewer control to the height of its local report at runtime Sometimes the report is long and I would like the ReportViewer control to extend its height and sometimes the report is short and I would like the ReportViewer control to shorten. I am trying to get rid of the scrollbars on the side of the ReportViewer control while allowing the customer to see the entire report. Thanks, Assuming you are using the webforms control, if you set ReportViewer.AsyncRendering = false, this will cause the viewer to process the report as part of the aspx page and display it inline, instead of in a frame. If you also set ReportViewer.SizeToReportContent, the vie ...Show All
Visual C++ Visual C++ 2005 Express Edition and lots of errors in stdio.h
Hello Everyone! I have Visual C++ 2005 Express Edition (RTM) installed on Vista (October CTP). I have created new Win32 Console Application project, but I cannot compile it even when I did not modify any code. I gets over hundred of erros in stdio.h: ------ Build started: Project: EjectCD, Configuration: Debug Win32 ------ Compiling... stdafx.cpp c:\program files\microsoft visual studio 8\vc\include\stdio.h(194) : error C2065: '__nullterminated' : undeclared identifier c:\program files\microsoft visual studio 8\vc\include\stdio.h(194) : error C2143: syntax error : missing ')' before 'const' c:\program files\microsoft visual studio 8\vc\include\stdio.h(194) : warning C4229: anachronism used : modifiers on data are ignore ...Show All
Visual Basic How to use MS Virtual Desktop in Vb Applicatoon
Please guide me in the following scenario I am developing c#/VB.net application using Visual Studio 2005. I want that when the user executes my application then: 1- The window should create a new Virtual desktop using MSVD. 2- My application should run in the new desktop. Only my application should be allowed to run. 3- I should have the options to modify the start menu in the new virtual desktop 4- When user close application the virtual desktop should shutdown How can I achieve this I will be very thankful. ...Show All
Windows Search Technologies Windows Desktop (Searching...) - but no results?
Hi, I posted a thread re: issues I've been experiencing with 2.6.5 of WDS in the help forum but just upgraded to 3.0 beta 2 and am experiencing similar issues. I try to input searches in the search box but get a blank pop up stating simply "Windows Desktop (Searching...)" - and no results displayed. The WDS Search options box displays indexing as complete. Am using Windows XP with the latest service packs. Let me know if I need to provide more information. Thanks, Jack Jack, Could you please do the following: Go to Start:All Programs: Windows Desktop Search. Next, type a search term in the search box and press Enter. Do you receive search results Also, you should ...Show All
Software Development for Windows Vista Landscape??? (Feng Yuan - Modifying XPS Document: Add Watermark Sample)
Hi, the Add Watermark Sample from Feng Yuan seems to write only portrait pages as output, even when the (original) source-document contains landscape pages... http://blogs.msdn.com/fyuan/archive/2006/08/23/715938.aspx Does anyone have a solution for landscape pages or knows why it doesn't work for them just a wild guess, but maybe because you write out visuals to the batchwriter and the size of the new page is different to the original page then (8.5 * 96 / 11 * 96, FixedDocument/DocumentPaginator! ). Adding a printticket with landscape to the page doesn't modify size (so you can see in the viewer) but it does print out the page correctly... at least... (c; ...Show All
SQL Server import from Access to SQL, not knowing the table format
I need to import few tables from MS Access to MS SQL but the table structure in Access is always different, as I would like the destination table in SQL to be. Therefore I would like that a table would be created in SQL at runtime, according to the structure the Access table accessed has. i'm not sure about this, but i think you can use the script task to determine the access table schema. then, you could use this schema information to dynamically create the sql server table. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Vector2 "is defined in an assembly that is not referenced"
Hi, I removed the beta and installed the release. When compiling an already running project I got the following: Error 1 The type 'Microsoft.Xna.Framework.Vector2' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xna.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f48fa5f25d27e8ff'. I tried removing and adding the assembly a few times + cleaning the solution etc. Couldn't get it to stop... any ideas Cheers ...Show All
Visual C++ How to control mouse movements
Hello everybody! I'm developing an app in vc++ for my final project to control a point & click device using head movements detected by a camera. I cannot find relevant info about how to control mouse movements and clicks system wide, it has something to do with system wide hooks Thanks in advance for your answer. Best regards Carlo Rampa And this newsgroup: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.win32.programmer.kernel&lang=en&cr=US ...Show All
Visual Studio Express Editions ToolTip Help
private void Label_MouseHover(object sender, EventArgs e) { ToolTip t = new ToolTip(); t.SetToolTip(xxx, "hi"); } How do i get it so when i hover the label a tooltip pops up im not sure what goes in xxx the label is inside a statusstrip interesting as the code I have posted works very well over this end. are you using a ToolTip or a ToolStrip these are 2 different things. Based on your initial code (tooltip) the code I posted works - I've also just tested it and works great. your initial question was "how can I make a tooltip appear when I hover over the label " as perhaps you have done, make an onhover/hover event from the label events. then as the code posted, insert i ...Show All
Windows Forms DataGridViewComboBoxCell's value isn't of custom type
I have a DataGridView bound to a collection and a DataGridViewComboBox’s DataSource of another collection. My goal is to have it so that when they select an item from the ComboBox, it sets the entity’s property to that object. A more concrete explanation: RuleSet is a collection of RuleCriteria. RuleCriteria has a property, “EmployeeAttribute” which is of type “Field”. I also have a collection called FieldCollection which is a collection of Field. Field has different properties, one of them is Name which is of type String. My goal is to have the ComboBox display a string, but have its value be of type "Field". So I have something like this: DataGridViewComboB ...Show All
SQL Server Long duration Pre-Execute phase
Does anyone know why SSIS sometimes just sits in the Pre-Execute phase of a data flow and does nothing It doesn't matter how elaborate the data flow is or the volume of data. It can sometimes take 80% of the task's run time. Ok, I have turned off caching in all of my lookups in that data flow task, and it still gets stuck in Pre-Execute phase. I am sure it's not executing data source queries since the debugger doesn't show them in yellow. When I said I wasn't seeing any caching progress I meant in the output window. I've turned off caching now so it shouldn't make a difference anyway. I noticed someone mentioned performance issues and that breaking the task into multiple tasks solved it. Could you ple ...Show All
