MrWolf78's Q&A profile
Visual C# Is primitive types are ref or value types?
Hi, we can call new operator on primitive types, such as- int age=new int(); but we all know that int is an alias for System.Int32 STRUCTURE, and also we know that structures are of *VALUE* types. from this I came to understand that *age* is of value type although *new* operator is called, becoz it is structure. But, I read that the abov declaration is a *REFERENCE* type. I need solution to this and your idea pls frendz. have a nice day... It's simple: new works with both value types and reference types. For reference types it allocates memory for them and calls the constructor while for value types it just calls the constructor. In the particular case of int and other primitive types the constructor is not even ...Show All
SharePoint Products and Technologies Calculated field in SharePoint list not displaying correctly in asp:dropdownlist control
I have a simple SharePoint list which has three fields - two of which are single line text values and the third is a calculated field set to =[Field1] & ":" & [Field2]. The data in the list is fine. When I create a new aspx page, drop on the data source control and then the asp:dropdownlist control and bind the control to the source, I get items like this in my dropdown. "string;#Business:Business Model" "string;#Processes:Enabler" Any idea where the string;# is coming from ...Show All
Software Development for Windows Vista Monitoring problems
Hey! Just installed Vista a couple of days ago, and it works really smoothly, except one problem. When I start a game, and try to tab out - the only thing that happens is that I get alot of thick green/white lines all over my monitor (A 19" Sony XDK95) the same happens when I don't touch the computer or any programs are running (It takes maybe 30 minutes) there's no way to get into Vista, I have to reboot every time. I'm going VGA->Dvi (Monitor->GFX) I've got the newest GFX drivers (Nvidia 7950 gt) My other specs are (If that should matter somehow) is E6400 2,13ghz Core2duo, 1gb of DDR (5400 Corsair memories) and Msi Power up Edition. Anyone encountered the same problem and knows how to solve this issue ps: (Whil ...Show All
Visual Studio 2008 (Pre-release) DLinq thread safety
I am working on an application using both WCF and DLinq. As we all know, DLinq is not thread safe. Since DLinq supports lazy-loading, it is more difficult to control when the DLinq will get involved. There always will be more than one threads in WCF application. What is the best way to safely use DLinq I just wonder why DLinq itself is not thread safe. That is will be a lot easier for programmers. Keith Farmer wrote: I didn't promise (I'm not a PM). I merely suggested that it was something we recognize as highly desireable. :) Nonetheless - if they do instantiate quickly I'm giving you credit :) ...Show All
Visual Studio 2008 (Pre-release) Listener won't accept new channel after first one is finished
Hey, I posted regarding my custom transport, and the including of security the other day. I solved that problem but it seems like the adding of security caused some more trouble. This is on the server side, where a ServiceHost is used. Without security this was what usually happened (using reliable messaging though): In the Listener, OnBeginAcceptChannel() is called, and an async setup of communication is done. When ready OnEndAccept() is called, and a ReplyChannel is returned. On this channel ReceiveRequest() is called and a RequestContext is returned. Using the RequestContext.Reply() a reply is sent. Back to (1), where a new channel is created for the next message... Now, with security, BeginReceiveRequest ...Show All
Visual Studio Express Editions registration key, invalid e-mail
hi! I'm trying to get a registration key after I downloaded Microsoft Visual Studio c# Express Edition, and it alway writes when I try to register Invalid e-mail, can someone help me thanks Check this thread, jluca777's solution seem to work for others. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=567005&SiteID=1 Found a solution. Goto profile.microsoft.com, signin and make sure all info is correct especially the email address. When the profile is successfully updated, try registering again. should work. ...Show All
Windows Forms Find the type of a Control
I have a GroupBox that I have dynamically added controls to. (Label, textbox, etc.). I need to itterate through all the controls, so I was going to do a simple for loop... However, how do I tell the "type" of control that I have foreach(control C in GroupBox1.Controls) { //HOw do I tell /check to see if C is a Label, TextBox, DataGridView etc. } Any help would rock, thanks. This is from a Post on clearing items that might give you some ideas: private void TypeOfControl(Control control) { if (control is TextBoxBase) (control as TextBoxBase).Clear(); if (control is ComboBox) (control as ComboBox).SelectedIndex = -1; if (control is DateTimePicker) (control is DateTimePicker).Text = string .Empty; forea ...Show All
Visual Basic prevent null exception from occurring
Hi there, I'm fairly new to VB.NET and love it but I'm not sure how to prevent a null exception from occuring. I can use the Try ... Catch to prevent the program crashing but I would prefer not to use this method. Is there a way to test for this without throwing exception I need to return a blank value for objUserInfo.Properties.Item( "mail" ).Value for example if nothing is found. I'm building a string from data gathered in active directory to output to a CSV file. It seems if a value is blank then an exception is thrown. The relevant section of code is: Dim objUserInfo As DirectoryEntry Try objUserInfo = GetUserInfo(objSubFolder.Name) ' ' Exception occurs on the following line s = s & ",&qu ...Show All
Internet Explorer Development Javascript Popup/Image Width issue
The following javascript resizes a popup browser to the size of the image displayed in the browser. It has worked fine in IE6 and other browsers, but in IE7 it causes the width to be much too small, cutting off the image in the popup. It appears that IE7 is treating "document.body.clientWidth-document.images[0].width" differently than in IE6. Anyone know how to easily remedy this Here's the script.... <script language="JavaScript"> //--> // Set the horizontal and vertical position for the popup PositionX = 5; PositionY = 5; // Set these value approximately 20 pixels greater than the // size of the largest image to be used (needed for Netscape) defaultWidth = 720; defaultHeight = 520; ...Show All
Visual Studio 2008 (Pre-release) Service Configuration Editor and custom bindings
Is it possible to have the Service Configuration Editor correctly represent an XmlDictionaryReaderQuotasElement property on a custom message encoder in a custom binding I'd like to have Reader Quotas display in the editor with all its properties read/write, as usually seen on a standard binding or message encoding; instead I get a read-only property that displays only the type of the element. I'm using the GZipMessageEncoding binding element from the SDK with a few changes. The config as shown below works when the configuration is applied to the binding element, but it would be nice to have the editor show the Reader Quotas property correctly. <customBinding> <binding name="compressedBinding"> <gzipMess ...Show All
Visual Studio Team System Checkin changes on behalf of another user
I cannot seem to be able to checkin pending changes performed by another user (schan)using the tf following command: tf checkin /author:schan $/Adventureworks/TPOnline/VBProjects/test.frm /login:mchan,mchan TF keeps coming back with the following: There are no pending changes. No files checked in. But there are pending changes and I have administrative permission and should have permission to checkin other users' changes. I have successfully undo other users' changes. Is there something else I need to do Both mchan and schan can log on the same machine, two workspaces are mapped to different directories. So there is no problem accessing the changed file in schan's workspace. ...Show All
Visual C++ Partially displayed items in a list view
Hi all: Not sure if this is the right place to ask this question. If not, just ginore my post. Thanks. I got a problem with list view. My list view is a virual list derived from MFC. I use DrawItem to display the items. The problem is by scrolling down or up, sometimes it displays half line of the item at the bottom or top and another half line of another item which was shown in the previous window. I can resolve this problem by refreshing window manually or call UpdateWindow after I draw items. But it causes a performance issue when I scroll down/up very quickly. Is there any possible reason for this problem The following is the code of DrawItem if you are interested in it. It looks a bit complicated. :) Thanks ...Show All
Microsoft ISV Community Center Forums protect,unprotect question help needed
Hi, I need help with a excel file. I know very little about VBA. I have excel pro 2007 beta loaded. I would like to lock or protect all the sheets the workbook using vba. And still be able to add data to unprotected cells on one any worksheets. I need vba macro to do this so all the sheets are protected and run the macros but still be able to edit cells that are unprotected. The code below does not protect all the worksheets. Only the 1 st 2 out of 3. The two that are protected are where the macros run from. The third is not. If you need any answers to my questions. I can e-mail it so it can be reviewed. My code is below. Sincerely, Tom Robert Public K(7) Sub Pick6() ActiveSheet.Unprote ...Show All
Windows Forms datagridview combobox column
Hi All, I need code which support vb.net 2005 Problem: While clicking the items in DataGridViewComboBox which inserted in DataGridView( Grid control in vb.net 2005). i want to populate the records in the grid that related to the item which i selected in combo box. I will explain with example: I have grid control named GridCustomer. My grid have three columns which are customer ID, Customer Name, and Address. On the first column i created one combobox contain Customer ID(CmbCustomerID) which comes along with DataGridView. So while selecting this CmbCustomerID i want to display corresponding records in the grid. The data which are coming in the combo box is from table. Sample Code I am attaching sample code, that ...Show All
Game Technologies: DirectX, XNA, XACT, etc. My take on Breakout
I've just about finished up my second game with XNA (the first being the obligatory pong game). It's my take on Breakout. It's a little more polished than the first few I've seen. It's got multiple block types, advanced paddle physics and animated sprites. All I've got left to do is add a menu and replace some of the temp audio files. Unfortunately, all I've got is a wireless Xbox 360 controller so the only control is using the keyboard but it works well enough. Here are a few screenshots: http://www.malevolence.org/images/breakout/breakout00.png http://www.malevolence.org/images/breakout/breakout01.png http://www.malevolence.org/images/breakout/breakout02.png I plan on releasing the game + full source sometime tomorrow. I'd be interes ...Show All
