Michael Covington's Q&A profile
Visual Studio Express Editions warning message
i am getting mutiple warnings, each time i create a form the warnings go up, saying could not load type "system byte" from assembly " mscorlib,version 2,0,0,0, culture = neutral, publickeytoken=b77a5c561934e089" because the format is invalid what is it telling me it doesnt like. i cant go back to the design stage to change anything, how do i get out of this. thanks i have just started again, allk i did was to create a form. on the form i had 3 buttons, which i chnged the font styles, then saved it. as soon as i did that i got the warnings again. does anyone know what is going wrong ...Show All
Visual Studio 2008 (Pre-release) net.p2p interop
I'm just reading up on the net.p2p protocol. I am considering using it, but say i want to create an Instant Messaging tool and interop with clients on other platforms (say Linux) - can i do this with net.P2p and WCF I know i could write various ways to do this with a bit more work, but if there was a nice WCF technique i'd rather use that! Any samples thanks, Steven http://stevenR2.com Hi Steven, please take a look at ( http://www.microsoft.com/about/legal/intellectualproperty/default.mspx ) for more information on how you can go about building this on other OS platforms. Thanks, Ravi Rao ...Show All
Visual C# using .Net Framework 2 with .Net 2003 IDE
Hi I'm writnig a C# project that needs to use a serial port (COM). I've been looking for examples and I've found an example that uses System.IO.SerialPort but it only exists in .Net framework 2. I downloaded .Net framework 2 and I tried to reference System.dll instead of the default one, but i got an error message. Can i use .Net framework 2 with .Net 2003 IDE If i can will I be able to keep working with my older projects (framework 1.4) If not is there another solution to work with a serial port(COM) btw, i can't upgrade to .Net 2005 IDE. Thanks in advance for any answer. I've used this and have been happy with it, although I did have to change a little of the exception handling: http://msd ...Show All
Visual C# ErrorProvider makes default language loosing properties...
Ok, I have a very weird problem. I have a windows forms with some basic controls in it, textboxes, buttons, labels. with only one tab (very basic). My problem is when I'm switching language, i'm loosing control properties in my default language. Here's the behavious when the errorProvider is in my form. 1- I drop a combobox in my form (in the default language), change the dropdownstyle value to dropdownlist. 2- In the initializecomponent, I can see myComboBox.dropdownstyle = dropdownlist; If i switch to another language (IE: Spanish), I can see the myComboBox.dropdownstyle = dropdownlist again in the initilizecomponent. The problem is when i'm switching back to default language, it is adding the dropdownstyle in the sp ...Show All
Visual Studio Express Editions official description of express edition limitations by microsoft?
Hello, I read several times that Visual C++ 2005 Express Edition does't support MFC. But only in newsgroups. I have looked for an official microsoft page containing this information for half an hour now because I need reliable information to tell my chief. But I just can't find it. Can anybody help me Best regards, CLenny In Case anybody else is looking for this information, too: I found it meanwhile in the only help: ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_vcmcpp/html/3d88607b-9cc4-490a-8d4c-31ee7610a26f.htm Best regards, CLenny ...Show All
Visual Studio 2008 (Pre-release) Display ContextMenu Shortcut Keys
Hi How to display ContextMenu Shortcut keys in the MenuItem. For example i have created a contextmenu with the menuitems of "Undo and Redo" for textbox. I want to display Undo Ctrl + Z in the Menuitem. i.e Undo with left alignment and Ctrl + Z with right alignment. Thanks & Regards, Sundaraguru GM If you are using Commands it should just work: <Grid xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " Background="Silver"> <Grid.ContextMenu> <ContextMenu> <MenuItem Header="Undo" Command="ApplicationCommands.Undo" /> </ContextMenu& ...Show All
Visual C++ Possible ATL buffer overflow in %Program Files%\Microsoft Visual Studio 8\VC\atlmfc\include\atldbcli.h
The ClearRecordMemory function buffer overflows and corrupts the heap when uLength is set to a correct WSTR length. As you can see, for the case DBTYPE_WSTR case, ulength is doubled. But if the length returned is correct, there is no need for the * 2 multiplication. The memset after the multiplication overwrites valid address space and the program crashes at a later point. A simple fix that works is: uLength = uLength + 2; Repro: Function tested against Microsoft SQL Server 2000 using Microsoft OLE DB Provider for SQL Server, VS.net 2005 and Windows XP SP2. Function causing the error: void ClearRecordMemory() throw() { for (ULONG i = 0; i < m_nColumns; i++) { DBLENGTH uLength = m_pColumnInfo[ i ].ulColumnSize; switch (m_ ...Show All
Visual Studio 2008 (Pre-release) Enabling HTTP Compression
What's the easiest way to get gzip compression for a WCF service using ws or basic Http bindings We're hosting in IIS, so can we just turn on IIS's HTTP compression for .svc files (we already require AspNetCompatabilityMode) I saw the custom encoder example, but that looks like a total pain, relatively speaking. But if it's the only possible way... Thanks, Michael I am not quite sure what a custom encoder is but to add compression to my web services all i did was create a partial class for the autogenerated Service proxy class as shown below: Option Strict Off Option Explicit On Imports System Imports System.ComponentModel Imports System.Data Imports System.Diagnos ...Show All
Visual Basic How To - Get a list of variables names and values in procedure at runtime
Hi, Is there a way to get all names and values of variables in a procedure or function at runtime and put them in an array or hashtable or else For example if the code is: dim a as string = "Hey" dim b as string = "You!" dim c as string = 52 dim ht as hashtable = getVariables()'<--I whish this would exist.... For Each de As DictionaryEntry In ht Console.WriteLine(de.Key.ToString & ": " & de.Value.ToString) Next 'The result expected: 'a: Hey 'b: You! 'c: 52 You can't do that, but you can do: Imports System.Reflection Dim mi as MethodInfo = MethodBase.GetCurrentMethod() Dim mb as MethodBody = mi.GetMethodBody() Then, you can look at mb.LocalVariables to f ...Show All
Windows Forms binding source - seeking to understand a logic
hi, i have a dgv with a navigator,. okay now both have a source a binding source bs. bs has datasource an object, ex. class person - name, phone1, fax. now, my bs is set at design time to the object so i get the columns and can reorder etc . when at run time, i ran a stored procedure to get values from my database,each variable comes from 1 table and this is my preferred method. okay still good. i get the values which are stored in a datatable,. i then change my bs.datasource = thedatatable, remember at design time, it was bs.datasource =myobject. Where i do not understand is that my grid is keeping the same layout as i did at design time, and the values are filling in the grid nicely., is that coincidence or a prop ...Show All
Visual C# Thread Synch and Monitor: How to handle Value Types, and Private Locking to Avoid Deadlocks
I've been doing some reading on the Monitor class for thread synchronization. Four questions have come up. Here's a pretty good example from the MSoft docs of synchronizing access by using Monitor around a critical area of code: class MonitorSample { //Define the queue to safe thread access. private Queue m_inputQueue; public MonitorSample() { m_inputQueue = new Queue(); } //Add an element to the queue and obtain the monitor lock for the queue object. public void AddElement(object qValue) { //Lock the queue. Monitor.Enter(m_inputQueue); //Add element m_inputQueue.Enqueue( ...Show All
SQL Server Backing up through VS2005
Hi, not sure I have should ask this in here or in the VS forums - but here goes anyway! My vb app is written using VS2005 with an SQL database. I'm now distributing this to users to use with SQL Express. It's hard enough explaining to them how to attach the database without going into the backup routines etc! So what I'd like to do is to have a "backup" button in my app, that backsup the database, trancates the log files & then shrinks the files. Is this possible Sure. As I said, if you have a connection that can issue a SELECT, it should be able to issue a BACKUP DATABASE (provided you have sufficient privs, of course). Just look up the syntax for BACKUP DATABASE in Books Onl ...Show All
Windows Forms Loading Image (Visual C# 2005)
Hey, I after these lines of code what should I put to make it load the image into a PictureBox openFileDialog1.DefaultExt = "*.gif" ; openFileDialog1.Filter = "Gif Images (*.gif)|*.gif|JPG Images (*.jpg)|*.jpg|TIF Images (*.tif), (*.tiff)|*.tif|PNG Images (*.png)|*.png|BMP Images (*.bmp)|*.bmp" ; openFileDialog1.InitialDirectory = "MyDocuments" ; openFileDialog1.CheckFileExists = true ; openFileDialog1.CheckPathExists = true ; Thanks :) oh..thats why...lol ok it works, butanother runtime error, now when I load a .gif and then save it as a .jpg I get a runtime error on the same line of code..it is: A generic error occurred in GDI+. I have to make sure it will save them as other formats thoe, becuase it ...Show All
Visual Studio Team System LoadTest result store
Hi, We need to execute a loadtest on a remote machine which has only VSTS. If we want to get the results back from that machine, what is the best way to get the results back. Does the results get stored in any xml file so that the xml file can be emailed back. We do not have remote access to that remote machine. Thanks. Ok, let me be more specific. I am going to execute a load test on a machine and will collect the .trx file from that machine. How can I analyze that .trx file locally on my machine I am not able to open the .trx file created on one machine on a different machine Hope I am clear. ...Show All
Visual Basic Coerce a byte string to a structure? [AMENDED POST].
I have a file that contains a series of packets. I've created a set of structures that map the elements of the packets. My question... Is there a technique in VB to map the string of bytes read from the file to the structures In 'C' this would be simple. In VB.NET I don't know. Suggestions are appreciated. Thanks, Johnny Hi, If you have an array in your STRUCTURES(s) you could use the string.split method. See.>> http://msdn2.microsoft.com/en-us/library/b873y76a(VS.80).aspx see also the StreamReader.Readline method.>> http://search.msdn.microsoft.com/search/default.aspx siteId=0&tab=0&query=readline Hope these help you.... Regards, S_DS ...Show All
