Asim_DIT's Q&A profile
Windows Forms icons in contextmenu
dev-env.: VS.net 2003. language: C# Hallo, how is it possible to add icons to a contextmenu Best Regards, mathoc I hope this article will be useful http://www.codeproject.com/csharp/trayiconmenu01.asp ...Show All
Visual C# Coding Concepts
I read a tutorial once.. that actually showed me and explained to me how C# conding concepts goes ( I really dont know how to explain this.. so please forgive me if you dont understand ) for example If I wanted to know what a namespaces was.. and what comes after it... like.. Namespace, Class, function or is it... Namespace, Class, Class function or does it matter.. because I want to know.. how do you know when you have to create a new instance of a class Its like today.. I added using System.Collection; Generic.List<string> list = new List<string>(); but I got an error.. so I did... using System.Collection.Generic List<string> list = List<string>(); and it works. namespace MyNameSpace { class MyClass { ...Show All
Visual Studio Reload Report data
I have a report that contains main data and details. In the initial load of the report i want to load the main data and when the user toggles a main item to show the details i want to load the details into the report .... i want to do this because loading the details from the DB takes a few seconds and in the initial state the user does not see the details. I only want to get the details from the database and load them into the report if the user asks for them. ...Show All
Visual Studio Express Editions Trying to create an object and use it.
I want to create a new vending machine object and use it. I think this class does create the object, but I have this funny feeling it's not really doing anything with it. For example, when I use Insert(nmbrQurtrs, nmbrDimes, nmbrNickels); I didn't have to use Caffeine.Insert() which make me think I have an unused object or something. I am not sure about whether I have done this in a way that actually uses the object. Should I make a subclass inside this class and put main there Well, I am confused at the moment, any info on what you see would be very appreciated. Thanks in advance. class VendingMachine { private double moneyInsrtd = 0.0; //exact change only private int cupsCoffeeAvail = 0; private doub ...Show All
Visual Studio Express Editions C++: Can build the dll file, but cannot register
I'm converting a VC++6.0 project from MBCS to Unicode. I was able to succeed in building it in Win32 Debug mode and also run it. The dll files were able to register using Regsvr32. RegSvr32 call DllRegisterServer of your dll. Can you debug that function If yes, see if you get the crashing instruction there. Looks like dereferencing a NULL pointer. -- SvenC ...Show All
Visual Basic dataset won't save back to database
hi all i have created an SQL db containing 1 table within VB 2005 express. i then created a datasource to connect to the DB. A dataset was then created. i dragged the dataset onto my "Form1.vb" and bindingsource, tableadapter and binding navigator were then created. i then pressed f5 to run. I can nvavigate through the records and create new one's but when i click on the save icon and then exit, the new records are not written back to the DB. any ideas Hi I already made this experience. Problem is that datasets are copies of database files so when You press f5 to run app it does not save to the original database the records. But if You build the program and run it fm the exe it normally works to mdb or mdf data files. Do ...Show All
Visual Studio 2008 (Pre-release) XBAP's and firewalls
Can someone point me to info on xbap's and firewalls/anti-virus. I tried to set up a friend's computer running Norton firewall and anti-virus and had a lot of problems downloading NET framework 3.0 and running the xbap. Eventually I got the xbap to download but it failed with an exception. Any info Thanks, John Agreed a firewall shouldn't block an XBAP or cause an exception to one. The first thing I'd look for is to make sure that the installed version of WPF matches the version of the XBAP. (e.g. the July CTP cannot handle a Beta 2 XBAP). ...Show All
Visual C# Column's name
How can i get my columns names from a TableAdapter or any other way that i can get my column's name in VC#2005. I'm sorry. I'm new in VC# 2005. Thanks Does this help foreach (DataColumn currentColumn in theDataTable) { MessageBox.Show(currentColumn.ColumnName); } this will go through each column of the dataTable and show you the column Name ...Show All
SQL Server Need to prevent database assembly creation
On certain servers, I don't want developers to be able to create assemblies. Unfortunately, the command sp_configure 'clr enabled', 0 only prevents the CLR-type from being executed, not its creation . I am unable to rename nor put triggers on sys.assemblies, sys.assembly_modules, sys.assembly_files, and sys.assembly_references . I would prefer the user know the boundaries well before implementation. Has anyone succeeded at this Thanks, that helped quite a bit! CREATE TRIGGER trg_CLR_Alert ON DATABASE FOR CREATE_ASSEMBLY, ALTER_ASSEMBLY AS BEGIN PRINT 'Assembly implementation is not supported on this machine.' ROLLBACK END I will p ...Show All
Visual Basic dispose
having created my user control (which contains a bunch of variables, subs, functions,and controls - buttons, textboxes, etc) and added them to a panel on my form i want to clear the panel.unfortunately it seems the memory never gets freed up as after a few loads and clears the program tosses an out of memory exception (on a laptop with 1.5 GB or ram). i cant seem to free up the resources properly... in the dispose method do i need to set everything to nothing (all the variables inside the usercontrol) and call the dispose method of any control that is inside the usercontrol is that all i need to do any debugging tips as to figuring out what isnt getting cleared so i can add it to the dispose method Thanks, Dan ...Show All
.NET Development Help : "error: 40 - Could not open a connection to SQL Server"
I'm using VS2005 and SQL2000. I created a database name "myDatabase" in SQL Server 2000 and built a website that connet to this database. When I'm running this website in VS2005 IDE (press F5 or Ctrl-F5), everything is OK. I publiced this site. When I connect to database on my computer, everything is OK also, but when I connect to database on another computer, an error occurred like this : "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)" Now, I do ...Show All
Visual FoxPro How do i use the WHERE clause in remote database connection?
After connecting to and oracle database i want to select specific records using the where clause as below gctype = 'A' gquery = '1' = SQLPREPARE(gnConnHandle, 'SELECT fssno,floc,fcurrent_address1,fcurrent_address2,; fhome_address,ferno,fquery_code,fdate_approved,fcap30,fbenefit_paid FROM cif_hist; WHERE ftran_type = gctype and fquery_code = gquery','MyCursor') = SQLEXEC(gnConnHandle) It gives me an error message "SQL statement parameter is required for non-prepared SQLEXEC() calls. Can someone help me Thanks for the response but i did as stated above and still does not work. Gives a an error message 'variable LCSQL not found'. All the SQLPREPARE syntax without the where clause works. I'm using VFP 6.0 ...Show All
Visual Studio 2008 (Pre-release) I am not able to install Orcas Technology Preview for .Net 3.0 on top of .NetFx 3.0 RC1
I am not able to install "Orcas" Technology Preview for .Net 3.0 on top of .Net 3.0 RC1 . I had installed .Net 3.0 RC1 and Win SDK 3.0 RC1 but was working with June CTP using msiexec /i vsextwfx.msi WRC_INSTALLED_OVERRIDE=1 mentioned by Rob Relyea on his blog.. http://rrelyea.spaces.live.com/Blog/cns!167AD7A5AB58D5FE!616.entry/ I have tried uninstalling everything and installing everything back again but the install programs would not run and complains of missing .Net3.0. How can I solve this nightmare Any leads.. Thanks for the heads up. I got it up and running using msiexec /i vsextwfx.msi WRC_INSTALLED_OVERRIDE=1 What a relief atleast I can keep on wor ...Show All
.NET Development Using XSD
Is there a way to use a XML Schema (XSD) in a project other than referencing the file path or URI I am reading this file using a DataSet's ReadXmlSchema method. dsInput = new DataSet (); string strXsdFile = @"C:\Documents and Settings\My Documents\Visual Studio 2005\Projects\MyProject\JobFeed.xsd dsInput.ReadXmlSchema(strXsdFile); ... I used brute force and used a stringbuilder to create a string, but this is not the most elegant method. ... string strXmlSchema = GetJobInputFeedXsd(); // Uses a stringbuilder to manually create the XSD string Stream strmXml = new MemoryStream ( ASCIIEncoding .Default.GetBytes(strXmlSchema)); dsInput.ReadXmlSchema(strmXml); ... What I would like to do is ...Show All
.NET Development Web Services on same port
Is it posible to consume 2 or more webservices on same port on same server. If yes, how Please let me know. Thanks Ashish sure Ashish, you have to create the new webservice using a different name or location (virtual path). It would be the same to create more than 1 web application in your server using the same port. you can try.... in VS create a new Web Service project.... let's call it http://localhost/MyServices/MyService1.asmx in this project itself you can create additional services... so let's say you can have also http://localhost/MyServices/MyService2.asmx The you can go and create another Web Service Project in VS using another location: http://localhost/MoreServices/Service.asmx And that' ...Show All
