Saurabh Pant's Q&A profile
Windows Forms MainMenu border alteration
Can anyone provide me with an example of how to manipultate the borders on a MainMenu component Ideally, I would like to remove the border. Thanks. The MainMenu class is a component, not a control. It is displayed in the non-client area of the form and you have very limited control over it. I suggest you use the MenuStrip control instead. It was created specifically to overcome the limitations of the MainMenu. ...Show All
Visual Basic Returning Private Sub Name In Error Message
I have a command button on a form to delete the current record. The corresponding subroutine is called Private Sub cmdDelete_Click(). I'm looking for a way to display "cmdDelete_Click" in an error message if an error is thrown. I want to have the the statment be the same for each subroutine I have so I don't have to hard code the name for each one. Is there a way to return the name of the current subroutine as I described I found something like form.module.name but that wasn't it. Here's an example - which will display the Assembly and function name that the exception wa ...Show All
Windows Forms ContextMenuStrip Problems
Hello Everyone, VS BETA 2 I have a MenuStrip with the standard items. I wish to create a contextmenu dynamically with the edit menu dropdown items in it. Obviously I don't wish to duplicate event handlers and of course I don't want to hard code the creation of the items. Why does the contextmenustrip remove items from the original list when adding them to the contextmenustrip. columnDataGridViewContextMenuStrip.Items.Add Is there any work around just to reference these items without duplicating them for each contextmenustrip I am sure I am missing something.... :-) Also of interest is that adding a seperator to a contextm ...Show All
SQL Server Looping through rows in flat file
I'd appreciate some guidance on how to solve a problem. I have a flat file of the format Header1 Header2 Header3 Data Record Data Record ... etc. ... Data Record Trailer1 Trailer2 I want to loop through each data record. I want to take a column value (string) from each row, and call a stored procedure passing in that value. The s/p will return another string which I want to use to update the original column value from the flat file. If I can't update the original column value I'm happy to add a derived column. Once I've done this "lookup" for all records, I want to re-create the flat file again with the new column values. I don't need a deta ...Show All
Windows Live Developer Forums Games with Messenger Presence?
I have a couple questions about building games both full screen and using the messenger api, that have a copule of features. How do i do the following 1. Make a full screen game in which I can display the presence of messenger users over their in game characters for both people on auto pilot not in the game and people that aren't in the game that I would like to invite into the game. 2. Is there a way to IM people that aren't in the game, from within the game to come into the game For both 1 and 2 I'd like to do this in a licensed way, since i'd like to get my startup funded - if i can. 3. What's the best way to notify people th ...Show All
Visual C# Is there a way to marshal a CArray from unmanaged function
Hi, I am trying to call a function from a unmanaged MFC dll. The function use a CArray as a parameter and I am looking for a way to call that function from my C# application. I am using the System.Runtime.InteropServices and it works fine for the other function where the parameter are simple. For a CArray, it is more difficult. Thanks You are trying to pass a CArray as a parameter from C# to a DLL function through P/Invoke The best thing for you to do then is to write a wrapper DLL in C++ that accepts simple parameters, converts them to the MFC types like CArray, and passes them through to the target funct ...Show All
Visual Studio Express Editions Problem: Form Modifing with StatusStrip
Hello, can somebody tell me please, how can I resolve this problem: I've programed an application in Visual Basic and I set FormBorderStyle of Form on None ( I don't want to display the Form Borders and other Informations), i insert the component StatusStrip in my application and after execute, i cann't change the size of my application anymore. How cann i programme this so that it works but without FormBorders and other Informations, please show me with an Code Example Thanks Best Regards AMI Try the following settings for your form form borderstyle=sizeable tool window form tex ...Show All
Smart Device Development storing image in sql mobile 2005 using c#
I am developing a application in c# compact framework, where i would like to store image into the sql mobile database using the Image datatype. Can anybody help me how can i store this image into the database and as well as retrieve and display on the picture box. Thank you This should help: http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/search group=microsoft.public.dotnet.framework.compactframework&q=SQL+CE+image+picture&qt_g=1&searchnow=Search+this+group ...Show All
Visual C++ Merge IDEs
I find the MSVC .NET GUI just awfull... (no offence :P). Is it possible to use the .NET linker and compiler with MSVC 6 Thanks. Speaking of moving folders. Moving/reordering folders at least manually in the project (text) file worked well before 2005 and is broken in 2005 (now all folders are sorted alphabetically no matter what you do - maybe the C# team pressured them for this, but we C++ guys get this now too and any resolution has been delayed until Orcas) This has been mentioned in a bug at the product feedback center - you can vote on it here: http://lab.msdn.microsoft.com ...Show All
SQL Server Management Studio lists all databases
I was under the impression that Management Studio wouldn't list any databases that a user doesn't have access to. But if I create a new user and give them db_owner permissions to just one database, if they log into Management Studio, they are able to see all databases listed. They don't have access to do anything further, but they can still see the list which I thought was handled better in 2005. I'm using the Sept CTP. Is there something I can do to hide all databases that the user doesn't have access to Thanks, Scott Forsyth A member of db_owner will inherit the VIEW ANY DATABA ...Show All
.NET Development Web Reference
I am migrating a class that leverages a web service from Dev to Prod. The problem seems to be that when i set the properties of the reference I get the error "The underlying connection was closed: The remote name could not be resolved". That is because the dev can't "see" the prod and I don't have and can't have VS.NET installed on Prod. What can I do What property are you setting that returns that particular error message It sounds to me like the problem is the Url property that is embedded in the class definition. It's possible that your problem will go away if you set the Url property on the property clas ...Show All
Windows Forms Can not use a static function in a class library
We have a c# windows service project which needs to reference a class library and use it. To start with, we only tried to use a static method of one of the classes of the class library. We get no exceptions and when we debug from VS2003, it smoothly passes the code line which uses the static method! We have other projects which uses the same& ...Show All
SQL Server Outer Join Issues in Sql 2005
Hi, The following query works fine in Sql 2000 database, but it throws an error ('Query contains an outer-join request that is not permitted.') while executing the query on Sql 2005 database. We have already set the compatibility level of the Sql 2005 database to 'Sql Server 2000(80)'. But still we are getting the error. select top 2 * from table1 t1, table2 t2 where t2.col8 =* t1.col1 and t2.col9 =* ( select max(t21.col9) from table2 t21 where t21.col8 =* t2.col8 ) We are planning to convert all our sql 2000 databases to sql 2005 databases. We have used this kind of outer join(=* or *=) in many places in our application. It is ...Show All
SQL Server Oddball SQL calculation query - any Gurus up to this??
OK, so I have a situation where the Client gets money from activites based on mileage. The further from 'home', the greater the mileage rate is. The distance per stopover is measured from wither home, or the last stopover, making it a continuous interval. Dependinig on the load size, the rates will increase or decrease as well. Assume the following are skeleton table structures. Table structures assume that appropriate keys are in place as 'Keyfields': Table1Fields: <Table one holds the actual user-entered data per Size> Key Keyfield(s), <keys to Table2's Keyfields> Size Varchar, DistanceFrom Number, (all ...Show All
SQL Server Cancel Error Event
I have 2 containers within a package (one sequence container in another). I have an OnError Event handle for each container and a package. When an error is raised, the OnError event gets called for each container and the package. How can I stop the error from bubbling to the next OnError Is there a way I can swallow the error within OnError event of Sequence container so the error doesn't get rethrown Thank you for the response and the solution works great. However, the variable name is System::Propagate. ...Show All
