rdeal3's Q&A profile
Windows Forms Need global reference to main form
(I originally posted this in the Visual C++ Express forums but I realise that I would probably get a better response here) Ok, so I've got a form with a bunch of ComboBoxes that are created at runtime instead of at design time. I want to give each of those ComboBoxes the same ContextMenu, which is a member of my MainForm: public ref class MainForm : public System::Windows::Forms::Form { // ... private: ContextMenuStrip^ myComboBoxContextMenu; // ... } I figured I should create a sub-class of ComboBox which automatically assigns the context menu in the constructor: ref class MyComboBox : public ComboBox { public: MyComboBox() { this->ContextMenu = /* reference to context menu in M ...Show All
.NET Development Web Services v/s .NET Remoting
In terms of performance, is there a difference between Web Services and .NET Remoting when the latter is hosted by IIS. If I understand correctly, in this case they would both be using SOAP to communicate with their clients, and I would like to know if there will still be a performance difference. Could there be any valid reason to choose Web Services over Remoting when It is guaranteed that .NET would exist on both the client and the server(or on all tiers of an n-tier model) ...Show All
Windows Forms How can I use the built-in VS.NET 2003 Style property editor with my custom web/server component in Designer's Property Window?
My custom web/server-side combobox component, written in VB.NET, and has four style properties, each of which I want to be able to edit using the built-in style editor when the user clicks these properties in the Designer's Property Windows. How can I set this up Also, I'm using CategoryAttribute.Design to make Style appear in the Design group of the property window, but VS.NET's help seems to indicate that you can put in in any category, including a custom one such as "Component", but it doesn't show how to do this. Anyone know how I can do this Here is the code from my Design Time render class that exposes the Style property and makes it appear in the property window: Private Property [Style]() As System.Web.UI. ...Show All
Visual Studio 2008 (Pre-release) Error in calling methods using Microsoft Enterprise Libraries in WCF
Hello! Im a newbie in WCF and Im currently having an "object not set to instance" exception inside the enterprise library component [Microsoft.Practices.EnterpriseLibrary.Data.DatabaseMapper.MapName(String name, IConfigurationSource configSource)] when calling a method through a Service model of WCF. The exception is as follow: {An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseMapper.MapName(String name, IConfigurationSource configSource) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.Bu ...Show All
SQL Server Create an automatic SUM ROW
Hello. In a previous program i used to create reports, I had the option to enter a "SUM ROW". I saw that in RS2005 I can check the "add total" when using the report wizard and it will create for me a row with SUM for my column. Is there a way to create a row like this automatically with out the wizard (a sum row for all my columns instead of creating a textbox with "sum" for each column) Thanks in advance, Roy. Hi, nom this behaviour is influenced by the normal summing / grouping operations. A sum in a row has nothing to do with this. I don’t think that the standard behaviour of the wizrad cab be changed in Reporting Services. HTH, Jens SUessmeyer. --- http://www.sqlserve ...Show All
Visual C++ Areas which act like button in OLE
I've noticed that in OLE containers and in flash there are areas which act like buttons. but they don't show up as buttons on windows spy programs - they don't show up at all ! i guess there must be a window rect area set up and when it determines the mouse is over this area, it animates a bitmap, or actions some code if mouse clicks within the area. my question is, how do i determine the 'hit area' of the button if i don't have the source code. any help or pointers would be greatly appreciated ! thanks For such issues, please use the newsgroups at http://msdn.microsoft.com/newsgroups OTP Thanks, Ayman Shoukry VC++ Team ...Show All
Smart Device Development Can't install .NET CF 2.0
Hi! When I tried to install .NET CF 2.0 redistributable on my I-mate (with Windows Mobile 2003) smartphone I got an error message, what said that file is not intended for my device. What can I do Please help :( There's nothing you can do as NETCF V2 is not supported on SP 2003. ...Show All
.NET Development Insert via SqlDataAdapter
Hi, not sure this is feasible or if I can explain what I need to do, but... I am creating a table in my console app, and filling it with data. I then need to do an insert to the database from my table. I have tried lots of different code snippets but so far nothing is working. My database table has 6 columns but some have defaults so its only necessary to actually insert a few of the columns, and this is what I'm trying to do. Say I have columns A, B, C, D, E and F and I am basically trying to do INSERT INTO (A, C, E) VALUES --> all the rows in my datatable, which has only these three columns. The few times I have gotten my code to actually get to where its connected and trying to do the insert, I get a Value cannot be NULL err ...Show All
Windows Forms assigning public key token by mage
Hello I have a problem in using mage. When I compare the Application manifest generated by mageUI it has public key token that I don't have it in generated by mage in command line (I have its attributute on assemblyIdentity tag but its value is 000000000000). When I added it will work. How can I assing it by mage. Thanks Mohsen ...Show All
Visual Studio 2008 (Pre-release) Cyclic object structure - ServiceModel.CommunicationException
I'm having a problem similar but slightly different to the problem mentioned here . I've got a class structure that has cyclictic properties within it that I use in one environment. However I am opening up these classes to be used as a data contract to a WCF Service. When the service gets called it throws a ServiceModel.Communication exception with message of: Object graph for type 'SomeType' contains cycles and cannot be serialized if reference tracking is disabled.'. Please see InnerException for more details. The inner exception is missing from the trace log, but I do know that the object SomeType contains a child property of SomeChildType that have a property that point back to SomeType. I've been able to serialize this ju ...Show All
Visual C# DateTime.parse problem when i change language
Dear All DateTime.parse giving me problem when i change language, the exception is " the conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value" SqlServer is not having that MM/dd/yyyy format. It is just current configuration of the server machine. Sql Server has general format of date which is yyyyMMdd HH:mm:ss and also yyyy-MM-dd HH:mm:ss. So if you send date values to sql server as strings it is better to use this general formats. But my idea of describing the problem more was in the right place. You should never send the datetime value to sql server as string. Send it as datetime value and everything will be fine, and you will not have to worry about date ...Show All
SQL Server Error creating Subscription to reports
Hi all, I am having a HUGE issue with SSRS, I am running SQL 2005 on Win 2003 server, the SQL uses SQL and windows permissions. I have a datasource which stores it credentials securely on the server but for some reason when i try to subscribe to the report it errors saying "Subscriptions cannot be created because the credentials used to run the report are not stored, or if a linked server the link is no longer valid." Beats me but the credentials are stored, I am connecting using a user account which can run the report fine (This is proven). I have SP1 installed, and have literally tried every last option in the book. N.B i have read all the existing post about this and i seem to have a different ...Show All
Internet Explorer Development Change page result when there is no internet connection
Hi I need change the page that is displayed when IE doesn't have internet connection. I know that res://ieframe.dll/navcancl.htm is show when this happen, but i need to show a different html page. I tried changing the registry value, but it does not work. I NEED HELP thanks Hi, Try a BHO or Toolbar that redirects to your custom error page on the onError event. Yes, Changing the about: protocol entry in the registry does not seem to work. I read that there is a 500kb file size thresshold size before a custom error page is downloaded, but I could never get it to work with the about: protocol. Oh check if there is a HKCR entry for about: in the registry (to lasy to check myself). The ...Show All
Visual C# How to use ActiveX in a Windows Service
I developed a Windows Service, which will create instance of ActiveX, but I got an error: System.Threading.ThreadStateException: Could not instantiate ActiveX control 'b0b25446-7656-456c-8d3c-60a0ac6eac49' because the current thread is not in a single-threaded apartment. at System.Windows.Forms.AxHost..ctor(String clsid, Int32 flags) at System.Windows.Forms.AxHost..ctor(String clsid) at AxJDSMSCtrl.AxJindiSMSControl..ctor() at SMSPlatForm.MainService.start() [Code] AxJDSMSCtrl.AxJindiSMSControl ocx = new AxJDSMSCtrl.AxJindiSMSControl(); This service log on as Local System, and "Allow service to interact with Desktop". This service communicates with serial port, the functionality is provided by a third party OCX ...Show All
Visual Studio Web Setup Project Build Error
I have both VS 2003 and 2005. I create the same web application project and the same web setup project both in VS 2003 and 2005. No problems in 2005, but in 2003 when building the setup project after it says "building satellite assemblies" I get "Error: The parameter is incorrect." What is going on here Pars, For assistance with web deployment or web application projects please post to http://forums.asp.net/ . Neil ...Show All
