NinetyNine's Q&A profile
Windows Forms change splitter color
i am using the splitContainer and i want to change the color of the splitter there's not a proprety of backcolor the u have to say splitContainer.BackColor = System.Drawing.Color.red for example if u want to put the backcolor in red. I hope it was usefull yo u, byes ...Show All
Software Development for Windows Vista UnauthorizedAccessException when using MSDTC
Hello everyone, We have a 3-tier application, the client, the server and the databaser server. It was developed using C# 2.0 and .Net 2.0, the database server is MS-SQL 2000 and we have some MSMQ in there. All 3 are located on different machines. The client is Windows XP SP-2, the application server is Windows Server 2003 SP1 and the daatabase server is also Windows server 2003 SP1. Most of the time when the client performs an operation to the application server the database gets updated and something is written to a queue. The writing to the database and queues is performed in the context of a transaction, we use the System.Transactions facilities and MSDTC. When the server performs the writing operation it 'impersonates' ...Show All
.NET Development Ad Removal via MSHTML
hey guys, i have an interesting quest ahead of me, i was wondering if its possible to load a website, and then parse out the ads ive been trying to look into adding ads and removing ads via MSHTML but no luck yet, can anybody show me some code or tutorials on adding ads and removing ads via MSHTML thanks for your time! I assume the web browser control gives you access to the raw HTML response stream. If so, you will then need to parse the HTML response and look for HTML IMG tags, etc that meet a specific set of criteria (ie. definition of an Ad). Since an Ad image can look (in code) just like an image from the page being accessed, you will need to come up with some heuristics to detect an Ad (perhaps look f ...Show All
Visual FoxPro How to check if a control exists?
Hi. How can I go about checking if a control, eg Label, exists on a form Thanks Look in help for PEMSTATUS() http://msdn.microsoft.com/library/default.asp url=/library/en-us/dv_foxhelp9/html/1a82169f-fe6a-4631-a9c3-d106d127046b.asp frame=true PemStatus(ThisForm,"label1",5) ...Show All
Visual C++ StgopenstorageEx
hr1 = ::StgOpenStorageEx(s.AllocSysString() , STGM_READ | STGM_SHARE_EXCLUSIVE , STGFMT_STORAGE, 0,0,0, IID_IPropertySetStorage , ( void **) &pPropSetStg); it gives result correct as S_OK but again i am trying to open that storage it gives share violation as useal but i want to open that storage again in read only mode .. can anyone help me how to write following code (Eg .correction in flags etc so that i will get S_OK) hr1 = ::StgOpenStorageEx(s.AllocSysString() , STGM_READ | STGM_SHARE_EXCLUSIVE |STGM_TRANSACTED , STGFMT_STORAGE, 0,0,0, IID_IPropertySetStorage , ( void **) &pPropSetStg); Ok, I have tried the sample, I get it to compile and so ...Show All
Visual Studio 2008 (Pre-release) IPv6, Teredo and WCF peer chat
Hi, I am trying to get the WCF peer channel chat example working on IPv6 with Microsoft Teredo. I got to the point that I think my two computers, each behind an NAT, have IPv6 addresses and can ping each other with "ping6". What do I do next to make chat instances communicate to each other I am running the name resolver in one of the peers. Replacing the address field of reolver endpoint from "net.tcp://localhost/servicemodel....." to "net.tcp://3ffe:831f:4136:e378...../servicemodel..." does not work. How would a WCF application take IPv6 address Do I need to do anything to the binding I read that there is "teredoEnabled" switch for the TCPTransport element. Do I need to set it to true for ...Show All
.NET Development Error: ExecuteReader requires and open and available Connection. The connection's current status is open, Fetching.
Hello, I am having a problem with selecting rows from an Access database (for code, I am using c# 2003). I have a list that I will go through one by one. As I increment through the list, I want to make a select statement to retrieve rows that meet my set criteria. Currrently, I am just outputting the selected column to the screen. However, I get the following error message: ExecuteReader requires and open and available Connection. The connection's current status is open, Fetching. What am I doing wrong int i = 0; try { string strOleDb; strOleDb = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + myPath; OleDbConnection cn = new OleDbConnection(strOleDb); OleDbCommand myCom = new OleDb ...Show All
Windows Forms Help Creating Bold Text...
Ok, the problem I'm having is thet when I select my text and click my BoldButton, no matter what my selected text font or text size is set to, it reverts it back to 'Microsoft Sans Serif, 8.25 pt' Here is my code: If (Color.op_Inequality( Me .BackColor, SystemColors.ControlDark)) Then Me .BackColor = SystemColors.ControlDark End If If Not ( Me .Font.Bold) Then Me .Font = New Font( Me .Font, FontStyle.Bold) RichTextBox1.SelectionFont = Me .Font Else Me .Font = New Font( Me .Font, FontStyle.Regular) RichTextBox1.SelectionFont = Me .Font End If RichTextBox1.Focus() I know it has to be a simple fix...........Thanks for your reply. Maybe bec ...Show All
SQL Server Newbie: please help with NS 2000 runtime error
We have a new big project coming, which will use Notification Services. So, I bought a book: "Microsoft SQL Server 2000 Notification Services" by Shyam Pather and did all steps including installing NS, setting up the environment, and creating the first sample NS application (Chapter03). Every single step was successful, no errors. I am pretty sure I didn't miss anything. All went well until I copied a sampla data file into the EventsWatchDirectory. At this point, the file name almost immediately changes to EventData.xml.20060908-160948.370.err (digits are different at every attempt, but please note the extension). I open this file using Notepad, and it is the exact copy of the original .xml file: <eventData> &nbs ...Show All
.NET Development Naming reason for ".Net"
Is there any naming reason for the word ".Net" What does the word ".Net" means Thanks, Benin. I worked for a company who had a tough competitor that made a large machine and called it "Compact blabla". Another one sold a machine that was slow and they called it "Ultra blabla". Around the time that MSFT started thinking about a java alternative, and couldn't just buy out Sun, they were grossly behind on jumping on the Internet band-wagon. It is surprisingly effective. Marketing, blech... ...Show All
Visual Basic how can we find the spacific text in the text file?
how can we find the spacific text in the text file for eg ABC12345 ABC48587 ABC75891 acctually i want to get the 5 numbers after abc thanks you could read through each line and check the text on the fly: Dim theStreamReader as new System.IO.StreamReader(" filename.txt ") while theStreamReader.Peak() > -1 dim theCurrentLine as string = theStreamReader.ReadLine() 'current line in file is stored in the variable above, now do whatever checking it is you would like to end while of course performance will decrease if you have a big file, since you are iterating through each line. to get specific text, you could use Regex (regular expression) to do a pattern matching techniqu ...Show All
Windows Forms DatePicker in DataGridView
Hello everybody I have datagrid with column in which every cell accept CalendarColumn object that responsible for DatePicker behaviour of this cell. I have two problems with it : 1. In textbox of DatePicker printed date with time - I need only date 2. User can add rows in the datagrid, so it shows empty row at bottom. In this blank line in CalendarColumn cell appears today's date. I want that cell will be empty too. Here are my classes for DatePicker column in datagrid : class CalendarColumn : DataGridViewColumn {} class CalendarCell : DataGridViewTextBoxCell {} class CalendarEditingControl : MyDateTimePicker, IDataGridViewEditingControl {} class MyDateTimePicker : System.Windows.Forms.DatePicker {} Thanks Yosef H ...Show All
Visual C# Object Oriented Programming
Hi all. Im a C++ Programmer that just moved to C# and am having problems learning about classes and objects, i just cant seem to understand it. Im not sure whether i have the wrong book, so any advice and help on the best place i can learn OOP for C# from would be much appreciated. Thanks. C# syntax is too much like C++ for it's own good sometimes. A destructor contains code that is guarenteed to run at a specific time, when an item is deleted or goes out of scope. C# does not have this, no. You need to impliment the dispose/finalise pattern to clean up resources and hope your client calls Dispose, or resources are not released right away. ...Show All
Visual Basic Strange error on Structure (possibly a IDE bug)
hi, i have defined a structure in my code as follow: Private Structure Test Public test1 As Long Public test2 As Test End Structure vb.net IDE says "A structure cannot contain an instance of itself". thats right, ok. but if i define the following structure: Private Structure Test Public test1 As Long Public test2 As Test Public FisID As SqlTypes.SqlGuid End Structure then the IDE pops up an error message "System Error &HC0000005" and in the form designer window the following text appear: "An error occurred while loading the document. Fix the error, and then try loading the document again. The error message follows: Exception from HRESULT: 0xC00000005" is this a bug ...Show All
SQL Server MSDE (SQL Server does not exist or access denied.)
Hi all, I'm getting this error message when I try to connect my MSDE database from other machine using enterprise manager application. Both of the machines are WinXP SP2. I found some solution such as using 'SQLServer Network Utility' but didn't work out for me. I even can not connect my database on my computer using TCP/IP. When I connect with name, it worked fine. I already enable both TCP/IP and Named pipe protocol on the MSDE machine. If someone has solution on that please let me know. Thanks, Myo Yes, There is also SQL 2000 and 2005Express running together with MSDE. I already changed the port no and try to connect it. But, still didn't work out. I tried at the other machine and it works. I don't know why it still doesn ...Show All
