Nidal-Fouad-Hajj-Youssef's Q&A profile
Visual C# Multi-Line statement
How to write statements running into multi-lines in C#, like using "_" in vb6. Here are some examples. string myString = "Please, this is line1. " + "here is line2"; string message = ( status > 0 "Done" : "Error" ); MyMethod( myString, message, null ); ...Show All
Visual Basic find first word of text box
How do you find the first word of textbox1 This has stumped some people on other forums. What i want to find is the text before the first space. Thanx in advance! You could add a Module and place a function in here which you will be able to access from any of the forms in the problems Function FirstWord(TextString as string ) as string Dim firstWordInString As String = System.Text.RegularExpressions.Regex.Match( TextString , "^\w+\b").Value Return firstWordInString End Function Or instead of a module you could use a class and set this as a shared method. Ach ...Show All
Visual Basic "Undo operation on a component context threw an exception"
I have been developing an application with Visual Basic and I have been recieving this error more and more. It seems, according to the bug report, to occur most frequently with asynchronous callbacks. I am wondering if anyone has any further information on this error. The resolution in the bug report does not work - even with my async code with the workaround, I get the exception. As stated in other threads , this is not an easy error to debug because the debugger cannot give any information about the exception or what caused it. Any help would be greatly appreciated. I've the same problem. Same code works ...Show All
Windows Forms Best Practice?
Hi, I have a form which shows a datagrid with all users. If you press new user, a new form opens, you enter all info including password and close the window with save. Then the new user appears in the datagrid from the first window. So far so good. My question is, how do I send the new user information (including password) to the first&n ...Show All
SQL Server date distribution
Hi I have a table with 3 columns - start date, end date and volumes if the month in the start date is same as that of end date, the volume remains same, else if the months in the two dates are different, then i have to distribute the volume in such a way that some part will go in the first month and the rest in the other month.. i have to somehow calculate (or prorate) the volume according to the no of days in each month for ex start date end date volume month finalVolume 1/1/2000 12/1/2000 100 jan 100 12/10/2000 30/11/2000 120 oct nov Please help me Are you trying to do this with a query or using a VS l ...Show All
Visual Studio Express Editions The Online Enabled MovieCollection Starter Kit...
I have installed the Online Enabled MovieCollection Starter Kit and created an application under this project and saved it to file. Then I ran the app and searched online for a Batman movie and added it to the database! Then when I re-ran the app after closing it down; I noticed my record did not save in the database itself; but while under my previous instance of the app when I downloaded the info from Amazon on a batman movie and added the info to the database's dataset it remained fine in the DS. But no save to the database itself. I even opened the database explorer and right clicked my table to show table data a ...Show All
.NET Development MCST Certification
Where can I find any material about MCST Certification (Web development in C# 2005) like e-books, printed books, articles, simulated exams Hello Juliano, Please visit http://www.microsoft.com/learning/mcp/ to learn more about the new certifications overall, and visit http://www.microsoft.com/learning/mcp/mcpd/webdev/ to learn about the Web application-specific certification options. We have published Preparation Guides for each exam showing the topics covered by the exams. So far there are no official Training Kits or practice tests for the exams. The exams are still in Beta, and the resources generally take a few months to c ...Show All
Visual Basic "button" as a link to email
hi, Ok, I want a button to be functioned to send information from a program that I have created to an email address. I am wanting to push "submit" and have the information I have put it, be sent to my email. How can I do that I am working with Beta 2 version of Microsoft Visual Studio 2005 "Express Edition", can anyone help I hope you are success in this matter. I have been using SMTP recently and had some expeperience too. You need to find out the AOL's host name for the first step. Here is a FAQ (unofficial) http://members.aol.com/adamkb/aol/mailfaq/imap/ The AOL IMAP and SMTP server addresses (for USA) are: imap.aol.com ...Show All
Visual Studio 2008 (Pre-release) Use custom attribute to execute some actions
Hello All ! I have some questions on attributes. I would like to be able to tag my method so they can behave specially. For example I would have imagined to do something like [TestMethod] [UseDataSource("myConnectionString", "my Dataset file")] public void TestDataSource() { //do some testing } I have imagined that so my test code contains only what I am testing and some attributes is specifying which data it has to use in DB. But to make it wokr correctly, I need a way to get some other code being executed when my method is called. So is there a way to have a special method in my attribute to be calle ...Show All
SQL Server Capturing and reporting execution errors
We have a report subscription that emails an excel file every morning at 11am. For the past two mornings the subscription fails due to one of the parameters being null. This was caused by another programmer changing a stored procedure used in the report. What I'd like to know is how can I capture and report that the report failed to be produced. I have loaded the Execution Log sample reports and the relevant DTS package to load the logs is run every 5 mins. However, this error does not show up in the reports. The entries in the Report Server log file are as follows, ReportingServicesService!dbpolling!25a4!17/08/2005-11:00:12:: EventPol ...Show All
.NET Development Authentication with the TCP Channel
Hi there, I'm working with the July CTP of VS.NET and found this article: http://msdn2.microsoft.com/library/59hafwyt(en-us,vs.80).aspx Somebody out there who tried authentication with the tcp channel I have a website that talks over a tcp channel to a marshal-by-ref bussiness layer object that is hosted in a windows service. I want to impersonate my users, so that I can use role-based security in the business layer object. I would really like to use the tcp channel authentication as described here, but when I do that as described in the article (setting the server side authenticationMode to ImpersonateCallers and the client impersonationL ...Show All
Visual Studio 2008 (Pre-release) Problem Drawing to Desktop DC
When I create a DC by calling CreateDC(L"DISPLAY",NULL,NULL,NULL), what I draw disappears very quickly. This did not happen until I installed build 5219. It continues to happen in build 5231. This makes a technique used to draw tooltips not work. It does not happen under remote desktop, just on the local screen. Any ideas on when this might be fixed CreateDC(L"DISPLAY",NULL,NULL,NULL), means getting a screen DC. This is incompatible with how the new desktop composition system in Windows Vista works. A reasonable workaround is to create window and then set style bits to make it not have a frame, use a layered window instead. ...Show All
Windows Forms Creating and Adding text to tables in word
Hey All, I'm working on a metrics program that is taking data from Access databases, inserting it into Word and formatting it into tables. For each datatable in my program I need to create a new table in Word. The program is creating a new table for each datatable but the problem is the data is being overwritten in the first Word tabl ...Show All
Windows Forms DataGridView - doing update/add/delete
I've been mostly doing asp.net the last couple of years and now need to do a new project in windows forms using the new DataGridView control. I have my 4 basic CRUD stored procedures written and have added a DataGridView control and bound it to the sprocs. My question is what work is involved in getting a basic grid to handle add/delete/update It seemed like the new control could add a lot of the functionality automatically for simple grids but I can't seem to get it working or find any good tutorials on it. Thanks for any suggestions. I built a simple master-detail example with 2 related/synchronized gridviews by: - using the Add ...Show All
Windows Forms How to show a picture from sql server( BLOB type )
My table has a blob type field,it's a "*.jpg" picture how can I show it in control picturebox I use System.Drawing.Image.FromStream(stream),but it's error why Pls help me about blob my code is from vs.net sdk,it's good,but it's not showing in picturebox! Nice...never knew there was an ImageConverter. ...Show All
