Mike Wachal - MSFT's Q&A profile
Visual Basic Dynamic Type Converion
Hi I need method "ToType" that takes value and type as parameter and converts it to respective type. dim val as String = "1" dim paramType as Type = Type.GetType("System.Int16") dim myint as Int16 = ToType(val,paramType) Regards Dipesh Use the CType(object, datatype) method or Convert class - as in Convert.ToInt32(...) Look them up on MSDN for more info or F1 them from the IDE. ...Show All
Visual C# how to insert a new line programmatically in a richtextbox control?
in my form load event i want to set \n newline rtb.Rtf = string1 + \n + string2 + \n + string3 the output should look like this: string1 string2 string3 i got it, i added these lines: if (i == 0) { toAppend = "\n\n" + rtb2.Text .ToString(); } else { toAppend = rtb2.Text .ToString(); } ...Show All
Windows Forms Terrarium 1.2 strange error
Ok when i compile my critter...no problem try to drop it in the terrarium and i get error: Error Loading Assembly: you are calling a class that isnt allowed in ...[my function addy] when i go to the function here is the offending code (actually simplified): Dim pointXY As Point Dim DirectionArray = New ArrayList(8) For Each pointXY In DirectionArray Next If I comment out the For Next loop everything loads in fine. What is goin on Anyone That is strange. I've used foreach several times in my bugs with no problems (albeit I'm using C#). As a matter of fact, Locust iterates throug ...Show All
Microsoft ISV Community Center Forums Custom file description keywords: read/write in VBA via API
In Windows Explorer, I can select a file, go to properties, and under 'summary', I can input keywords into the description, for use later when searching for the file. I would like to be able to read/write these file keywords via VBA. I assume I need to access the Windows API, but more than that, not sure what library etc. I would need to use. Can anyone advise me how do to this best regards, & ...Show All
.NET Development GUI thread, memory leak and Garbage collection
Hi all, I seem to be chewing up memory at a nasty rate when my app runs. It has a polling loop and not surprisingly this is the part that keeps doing it. I think I've located the line that is my main offender and its when I marshal to get back onto the GUI thread so I can update my controls. private void KPI_ScreenUpdate( KPI KPIType) { if ( this .InvokeRequired) this .Invoke( new KPI_ScreenUpdateDelegate (KPI_ScreenUpdate), new object [] { KPIType }); else { DPL_Units_Through.Value = myKPI_Shift.Units_Through; DPL_Shift_Time.Value = tmpElapsed.ToString(); // blah blah ...Show All
Visual Studio Team System Error 28925 - TFServerStatusValidator TFSService Account
Does the Service account for TFS have to be a member of the servers domain or can it be a local user account I've tried every combo known and still am getting this error at the end of the install. Hi, Mike, In my case, single server, no other server domains (i.e., TFS only, no ther Windows Servers on the network). I created TFSService account as a local user account. The groups assigned for it are 'IIS_WPG' for IIS worker processes, 'STS_WPG' for SharePoint services, and 'Users' group. Hope this helps. Regards, killem ...Show All
Visual FoxPro Selection of multiple rows of a column in Grid
Hi, I am a newbie and using FoxPro 8 in XP. I was wondering if we can select multiple rows of a grid column using the shift key. I have a combo box in one column of a grid. I want to fill several rows at a time with the selected combo item. How can I select multiple rows of a column It should be just like how we select multiple controls at a time in a form to change the font style or size etc. Can any body please give me a hint or sources where I can look in to Thanks in advance. >> I was wondering if we can select multiple rows of a grid column The short answer is no. You mu ...Show All
SQL Server SQLEXPR_ADV.EXE does not detect WinXP SP1
Running SQLEXPR_ADV.EXE against Windows XP SP0 causes the setup to exit gracefully with a message indicating the the right service pack is not installed. However, running SQLEXPR_ADV.EXE against Windows XP SP1 does not exit and continues to install. Then, when you try to run a script against the installation, you get the message: [Microsoft][ODBC SQL Server Driver][DBMSLPCN][SQL Server does not exist or access denied]. This will become very problematic when installing SQL Server Express as the database for small installations. The setup really needs to be updated to look for all the system requirements that it can detect. Evident ...Show All
.NET Development VB.Net and Access - running a stored query, putting it in a dataset then updating it!
Hi there. i am very new to vb.net and am using a simple MS Access Database. i have a table with user names in Access and a stored Query in there which will pick out the username and password if correct. In vb i have a simple logon form which should get the user's input in the username and password text boxes, then it calls the stored query in Access and checks the information for a correct user. Once it has done this it then should update the dataset and the database table with the current time for their logon and set a value to 1. It doesnt and i need some help and possible explanation on why it does this ! ! here is the cod ...Show All
Visual Studio Express Editions Command Line args question
I have this program (actually 2) a tray app and the main app. There are settings the user can change to change the behavior of the tray. for example when the tray is running and a camera device is inserted, the user can have it auto launch the main app. (that is simple (Process.Start("PROGRAM.EXE") But there is another option (if auto launch main app if camera is inserted) that it will auto copy photos with no user interaction needed. So the tray looks for the camera every 3 seconds (will that slow the pc down ) and if they have the setting enabled it will auto copy. So if the setting is enabled i want the tray to open up the main ...Show All
Software Development for Windows Vista TransViewer sample in the DirectX/DirectShow SDK
This sample is no longer included in the SDK. I have compiled this sample and using it to test DirectX transitions. The sample does not work with images or pictures. I have tested it with video clips and colors without any problems but images or pictures will just not work. Anyone had this problem and found a suitable solution Best regards, Paul. ...Show All
SQL Server .NET2 SMO Components
I am new in VS2005 and I start with sql2005 express. I plan to use SQL express 2005 manager. When I tries to install this program the system asks for MS Framework,net2 SMO Components. Where can I download these components Thank You Best regards Oyvind All of the information needed to install and run Management Studio Express is at http://www.microsoft.com/downloads/details.aspx familyid=82AFBD59-57A4-455E-A2D6-1D4C98D40F6E&displaylang=en . If you still have questions after installing the required components, please let us know. ...Show All
Visual Studio 2008 (Pre-release) Canvas, Rectangles, ClipToBounds slowness
We are thinking about starting a new moderately complex graphical application in WPF. But before committing to the platform, we are testing features to see if WPF can handle it. >:) One test application so far has a Canvas with ~800 Rectangles (added with C# using “canvas.Children.Add(..)”. These rectangles are movable by dragging them… implemented with Canvas.SetLeft(rect, newLeft) and Canvas.SetTop(..) from the MouseMove handler. I need some tips on how to speed this up. Currently dragging a single rectangle around causes 100% utilization with 20 FPS on a Xeon 2.8GHz… even turning down to 50 rectangles seems ...Show All
Visual Studio 2008 (Pre-release) Versioning in Indigo and ClickOnce
I need help to response this question: Versioning in Indigo, how are changes in the model of objects that have an effect on the services offered to client managed in Indigo how are they related with ClickOnce I have a services contract of my model of objects, how are they managed the changes of my model of objects or services contracts in Indigo that have an effect on the services offered to client (Datacontracts with version, suply new dll’s of my services...) .how are they related with ClickOnce thank you for the help. ...Show All
Visual Studio Express Editions Saving back to database
When I using Express Edition, When I make a connectiont o the database it automatically lists the following code to save & update database Me .Validate() Me .TaskBindingSource.EndEdit() Me .TaskTableAdapter.Update( Me .Time_ManagementDataSet.Task) This update some of the forms but, I created another table called notes and it generated the same code for that table, but the problem is when I change information in the form view it throws an expection, saying it needs an valid update command. Can you help, as the other forms work. Noko Hi Noko, Is your problem solved regards, bhanu. ...Show All
