Mike Gabriele's Q&A profile
Software Development for Windows Vista Load xoml in runtime (beta 2)
I have a workflow with two custom activities from an activities library. I run this workflow from another console app. From what i understood, if i change the order of the activities on th xoml file and save it, the change should take place without building. anyhow, it's not working for me. (I have code activity in the custom activities which print me the activity name so i can see if there is a change in the order. Any suggestions Hi Amit, Since you are using activities (Code Activity) that need code beside (compiled code) you need to do the following to get this thing working 1) Create your own type with derives ...Show All
.NET Development C Style char array returned by an event from a DLL COM
I am using a DLL (COM interop) in Visual Basic 2005 and can not get the correct values returned from an event. The last argument is a variable length array of char that is returned as a pointer to the first element in the array. The only thing I get is the first byte no matter how many characters are to be returned. For exampe, if the returned value is 257 in two bytes, my value I get is 1. This is the event handler: Private Sub ads_devicenotification( ByRef pTime As TcAdsDll.TimeStamp, ByVal hNotification As Integer , ByVal cbLen As Integer , <MarshalAs(UnmanagedType.LPArray, SizeParamIndex:=128> ByRef pData As ...Show All
.NET Development How do i enable AllowDBNull property with TypedDataSets?
I would like to make certain columns to have the AllowDBNull=false in a typed dataset. I tried setting the nillable property to 0 and also tried false in the DataSet designer, but this does not work when I build. It appears that the MSDataSetGenerator only sets AllowDBNull property if the column is a key. Dont what im doing wrong. Any ideas. Thanks. If you have minOccurs = 1 in the XSD on the corresponding column element, then the typed dataset should generate the code so that the column's AllowDBNull is set to false. ...Show All
Visual C# Is it generally more efficient to pass by ref?
Just a random thought, but, since passing by value means a creating a copy of the variable, I'm assuming that passing by reference is more efficient in processor terms. Hence should one always pass by ref when given the choice (eg. when the method being passed the parameter doesn't modify it), or is the performance benefit (presumably pitifully insignificant for most simple variables) negated by the reduced readability ("why have they used refs everywhere !"). Thanks! Carlos PS sorry if this is a hopelessly newbesque question... When you have a reference type (i.e. class instead of struct), the variable for that object is ac ...Show All
.NET Development Remoting + Lazy Load
Hi guys, I have little experience with distributed app. and now am trying to build an app. using .net remtoing. But I am stuck on using whether marshal-by-value or marshal-by-reference. I understand their differences and I think marshal-by-value object is much more efficient as it saves a lot network traffic. But from what I read, when you serialize an object and pass it across the network, all objects referenced by this object will be serialized as well. It has adverse effect on performance, obviously. So my question is how can I use marshal-by-value object and at the same time lazy load some/all objects refer ...Show All
SQL Server Removing duplicates
Hi all, I have a table like UserNo UserName 1 Ajit 2 Ajit 3 Ajit &nbs ...Show All
Visual Basic Using images as baground slows down my program alot!!
Hi Im working on an aplication and is far from finished, but already now the program seems to be a bit slow. I've experimented with using a picture as a bagground (i really like these small fading bagrounds from light blue to white) but this seems to realy slow my program down when switching beetwen forms (not just in design fase, also in the compiled version) i only use gif images 256 colors so it isnt large images (about 12 kb). I use the tab control and when putting a background image on it, it really slows down!! I have a labtop 2800 Mhz with 756 Mb ram and xp sp2, so the hardware shouldnt be the problem. Is there a compiler pro ...Show All
Visual Studio ClearCase Integration with VS.NET 2003
I installed Visual Studio .NET after I installed ClearCase. Therefore, ClearCase hasn't properly integrated into VS .NET. VS only recognizes Visual SourceSafe, which I don't use. I heard that uninstalling then re-installing ClearCase with VS .NET already installed will allow ClearCase to properly integrate into .NET. But, the ClearCase installation takes a lot of time, and then there are all of the development views to download!!! Does anyone know of another way to get VS .NET to recongnize ClearCase Thank you! Hi Laurent, Can you check whether you have an entry for Clear ...Show All
.NET Development WSE/DIME - WSE352: The size of the record uuid:{g-u-i-d} exceed its limit
I've gotten DIME attachments to work, but I'm running into the infamous 4096 limitation. How can I download a 20 meg file as a DIME attachment I've tried the maxRequestLength setting <messaging> <maxRequestLength>-1</maxRequestLength> </messaging> but this doesn't have any effect. Actually, looking at the docs indicates to me that this setting has an effect for uploads, rather than downloads since this is intended to prevent denial of service attackers from submitting large file uploads to the server. How do I download really large files via DIME attachments T ...Show All
Visual Basic How to mark all the particular words in a RichTextBox
When I was trying to search a particular word, say "trade", in the text of RichTextBox, I wrote the following code: RichTextBox1.SelectionStart = RichTextBox1.Find("trade") However, the text contains a number of "trade" and the above method can only find the first one. My question is how to highlight all "trade" in the RichTextBox. Hi Imran, We would like to get in touch with you, could you please give us your email address Thank you for your continued support in the forums! Regards, Bhanu. ...Show All
Visual Studio Express Editions C# networking help
Hi everybody... i just wanna your help with a piece of code.... client/server program, that the client wanna log in on a server ( send a username and a password) and the server verify if the username and the password match. if they math, the server sends to the client that the usernaem and password are correct. else, it sends that they are not correct. the suernames and passwords pairs are stored in an array or in a Hashtable in the server. no need for database ( for simplisity ). anybody can help me and write me this piece of code Hi! What technology do you want to use Sockets, Web services, ...Show All
.NET Development Binding to a datagrid
Can anyone help with this one Have a form with a listbox and 5 textboxes, by clicking the different customer id's in the listbox this then displays the relevant info in the textboxes which is first name, last name, city, state and zip code, this works fine but I'm trying to display at the same time the order details for each selected order id in a datagrid but can't get it to work The order details to be displayed in the datagrid from the database are OrderID, OrderPrice and CustomerID, do I need to incorporate a data relation here This is the coding I have so far Imports System.Data.OleDb Imports System.IO Public Class Form1 Inherits System ...Show All
Visual Studio Team System Create Private Accessor and generic collections?
Hi, the generated wrapper class to access private members doesn't contain any accessors for fields with a generic type, e.g. private Dictionary< string , CacheEntry> m_cache; Does anybody know a workaround for this problem Thanks, Andy Thanks for the answer, Michael. I really hope that some support will be included in the final release, since things like private generic Dictionaries used as internal data structures are likely to become common, we already use them extensively, for the usual reasons (type safety, performance). It would be a shame if it would not be possible to access ...Show All
SQL Server Disabling Product Feedback on en masse deployment?
Hello. After installing SQL 2005 Enterprise (MSDN-version), I was greeted with Product Feedback pop-ups on opening SSMS. I'm all about product feedback (hence why I'm here), but before I deploy a final/non-MSDN version to lots of users, I was wondering - if this also occurs with the non-MSDN version - if there is a way to pre-disable the feedback options I assume you're referring to the Watson and SQM messages, which I think is the final screen of the Setup process. This is present in all versions of the product. One way to disable the pop-up is to do a command line install, specifying an appropr ...Show All
Visual Studio 2008 (Pre-release) Aligning an ItemsPresenter inside a Grid
I am playing with the TreeViewItem control template, trying to align a tree node header and node children along the left side. The template is a 2x3 grid with the header taking up last two cells on the top and the children taking up the last two cells on the bottom (as an ItemsPresenter). The problem is the ItemsPresenter has some indentation that I can't seem to remove. I have set Margin="0,0,0,0", HorizontalAlignment="Left", and Padding="0,0,0,0" on every element involved where it is legal and still there is some indentation. A possible solution to align the two is to move the header right, but this give ...Show All
