Dmitry N. Oleshko's Q&A profile
Windows Forms Unsubscribing from all events
Hi, I have a control and throughout my code I have multiple places where I subscribe to events e.g. MyEvents.SetNumberEvent += new MyEvents.SetNumberHandler(SetNumber); I'm having a problem that when some controls are disposed these subscriptions to events are not disposed with the control so when an event fires exceptions to do with the disposed control are thrown. Is there a way for me (in my HandleDestroyed method) to go through all the events I've subscribed to and unsubscribe from them rather than finding every event in my code and unsubscribing one-by-one myself Thanks in advance. Friendly Dog and RizwanSharp, I think you both missed my point - I know how to unsubscribe from an event but I wanted t ...Show All
Windows Forms TextbBox size in GridView Edit mode
I have a GridView with a field that contains long strings of text. I would like to make the grid directly editable, rather than using a details view. I finally figured out how to make the TextBox in the Edit view bigger, but I cannot find option to to make the text in it wrap or for adding scroll bars. Is there a way to accomplish what I'm trying to do, either with control properties or through manual coding Thanks in advance for your advice. Steve There is a property for the textbox called "Textmode". change the property to Multiline, it will add a verticle scrollbar and wrap text in the horizontal. It's very unfortunate that nobody has answered you sooner. Aren't these forums monitored by microsoft ...Show All
Windows Forms Get datakey value from DataGridView
How can I get the datakey value from the datagridview current row (without using the key field as a non-visible column) Thanks. ...Show All
SQL Server T-SQL Badly needed
To one of our sql server database Table A , we need to migrate data from another sql server database Table B . Assume there are two columns in a table namely OrderID and Comments . Here OrderID is a foreign key. And therefore, I can have any number of comments for a Particular OrderID. Thru a TSQL query, I wish to have all the Comments data beside the OrderID seperated by comma like Ord1 Comm1, Comm2, Comm3 Ord2 Comm5, Comm6. Comm7, Comm8, etc., This is just the thing we used to do for numeric columns using GROUP BY statement as SELECT ORDERID, SUM(ORDER_TOTAL) AS AMT FROM B GROUP BY ORDERID Want to know how to achieve similar effect with Varchar type of data. I'm currently using Cursor to concat, but it is taking long l ...Show All
SQL Server System Variables in a SSIS package
hello all, I am having a hard time referenceing system variables. Can some one give me a quick lesson I am trying to save system variables suck as StartTime finishtime and processes ran I want to store these items into a table for use later. Where are you trying to reference the system variables in an expression you should be able to use @[System::StartTime] Most locations that you need to use variables you should be able to select the variable from a drop down or use the expression editor ...Show All
SQL Server Returning resulsets between procedures !!
Hello, I need to do the following, But I receive an error: CREATE PROCEDURE dbo.EJEMPLO_A AS BEGIN SELECT TOP 10 NAME, ID FROM SYSCOLUMNS END -- and Later use the one above... like this... CREATE PROCEDURE dbo.EJEMPLO_B AS BEGIN DECLARE @temp_lista TABLE (NOMBRE VARCHAR(500), IDENT NUMERIC(5)) INSERT INTO @temp_lista execute dbo.EJEMPLO_JULIAN END Pd. I just have to capture the dbo.EJEMPLO_A resulset... and I can't modify It Jortiz: You have to use a temp table instead of a table variable to receive your data. create a temp table instead of declaring a table variable; you are not allowed to use a table variable for what you are attempting. Dave ...Show All
Visual C# panel.visiable's problem..I've to double click then it works
// in my webpage I put my controls in a panel , when page load I set panel.visable = false. only when botton_click and then panel.visable=true //my problem is panel doesn't appear when I click once. I've to double click and then panel become visiable.. what's going wrong is my problem concern with "post back " I've no idea... P.S... I write panel.visiable while datareader.read() thanks thank you now my code are like below protected void Page_Init(object sender, System.EventArgs e) { PanelYes.Visible = false; PanelNo.Visible = false; } and I run program ... result is the same.. I 've to click bottom twice and then panel can be showed ... this way doesn't w ...Show All
Visual Studio Team System issue with TFS mail alert
hi , The mail alerts on my TFS server stopped working suddenly with this message Event Type: Warning Event Source: TFS Services Event Category: None Event ID: 6011 Date: 12/5/2006 Time: 1:02:25 PM User: N/A Computer: CTSINGVCSASF Description: TF53010: An unexpected condition has occurred in a Team Foundation component. The information contained here should be made available to your site administrative staff. Technical Information (for the administrative staff): Date (UTC): 12/5/2006 7:32:25 AM Machine: CTSINGVCSASF Application Domain: /LM/W3SVC/3/Root/services-2-128096762500808237 Assembly: Microsoft.TeamFoundation.Server, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727 Process Details: Process ...Show All
.NET Development Connection Manager
I am connecting to Sql Server through WIFI/VPN. I have been establishing connection through pocket explorer. Sometimes the connection is dropped/closed which creates SQL connection errors. I would like to invoke(call) the connection manager from within my app. when the connection is not present. Can this be done I am using VS 2005 (VB) on PPC 05. Not sure if this is the correct forum. Thanks, Jay There is no managed code API to do this. You need to use RAS API and P/Invoke into the RAS API to establish the connection. I just want to warn you that it is not trivial. ...Show All
Smart Device Development Exchange data trough USB
Hello, I want to exchange data between pocket pc and desktop pc via USB. This works ok but now I want to integrate it into a windows service. When i try to connect to the ppc in the Windows Service I get the message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) I found a lot of things on google but nothing changed ... There's a timer which tries to connect via USB to a pocketpc (using active sync). The code is correct because it works in a windows application. ...Show All
Visual Studio Express Editions If Windowkey pressed then startmenu hide
hello, how can I do this If e.keycode = keys.lwin or keys.rwin then 'make the start menu hide End If thanks! ...Show All
Visual Basic Folder View I think
beginer::: I need help on how to make the folder i select show up as buttons and the name of the folders be there also. I am new to code and would like to learn more. I am trying to build a photo view, so when i click on the tree view that folder shows up and the files that are in the folder the name shows. Thanks. notdoutt, According to your question, I recommend you to ge more information on the TreeView control. Then I suggest you to read an article titled Implementing a Folder View. Unlike the tree view, Microsoft Windows Explorer does not manage the contents of a folder view. Instead, the folder view window hosts a child window that is provided by the folder object. The folder object is respons ...Show All
SQL Server Lookup Transformation
Is there a way to ignore the unmatched rows using Lookup without creating another destination (Error Transformation for red connector) shafiqm wrote: Is there a way to ignore the unmatched rows using Lookup without creating another destination (Error Transformation for red connector) Yes, Just use 'Ignore failure' in the error output...the unmatched rows will go into the green output having null in the looup columns ...Show All
Visual Studio Error: When using FriendlyFilenames explicit interface methods are not compiled in CHM file
Hi, When using friendlyfilenames no explicit interface methods are included in the chm-file builder process. This is because the filename of such a method is named like: M_MyWebControl_System#Web#UI#IPostBackEventHandler#RaisePostBackEvent_1_72eac341.htm I believe the CHM-builder process doesn't like the #-character in the filename referenced, so it thinks that the file isn't referenced and this causes the file not be compiled in the CHM-file. When using GUIDFilenames everything works just fine. Kind regards, Stephan Smetsers Thanks Stephan for finding this issue. As Pritam mentions we will fix this for our December drop. Anand.. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. the error
I would like my game to come up to the opening scene, and when i press the spacebar it goes away and my game starts. I have tried something like this in my program: void _startGame; { using (Blank game = new Blank()) { game.Run(); } } But when i press spacebar it gives me an error. Thanks, for the help! You might want to look into using GameComponents or a similar OO method of handling what's displayed. For a small game you can get away with doing things like that, but the more you add to it the more difficult it's going to be to maintain. I believe there's some tutorials on doing this on the various XNA tutorial sites. ...Show All
