Answer Questions
ACCOUNTINGONLINE.US Simplest method to add e-mail to an application
I am trying to find the simplest (& hopefully, most flexible) way to add e-mail capabilities to a Windows Forms application. I know I can use System.Net.Mail to send e-mail, but this requires some pretty specific information (server name, username, & password) that my application will not have access to. In an old VB6 application, I used MAPI to send e-mails, which I suppose is still an option in .NET. The benefit of using this is that MAPI handled all of the account information for me - it just "used" Outlook to send the e-mails. The only [minor] downside here was that my application required Outlook or OE to be installed on the computer - which is not really a problem where this application is distributed. Is t ...Show All
yanivpinhas convert string to date : error out of index range
In my fresh installation of Visual Studio Professional 2005 Visual Basic I have typed this code dim olddate as date olddate=datevalue("01-01-2006") I receive an error: index out of range exception On an other pc with the same fresh installation this do not happen. Why I have tried with other funtions : ctype, cdate but I receive the same error, while on an other pc this code is fine. Can help you me. Thanks. Spotty has almost certainly nailed the cause - my suggestion is to avoid string to date conversions, and just use Date literals instead: olddate = #1/1/2006# - just be careful that these are always in the month/day/year format. Alternatively, you can also use the globalization class to create a cultu ...Show All
h1 Error codes
When I use an add command to add data to an Access dB, supposing that db doesn't exist or a connection is lost to the dB or anything atall, and my VB program returns an error to my program, rather than allowing it to crash is there an error code that gets returned that I can use to handle the program execution appropriately thanks tattoo I have been using the Try Catch block but I guess my problem was how to handle the error. Your explanation of reading the documentation makes sense. One of my problems is If I use the following to do an Update DataAdatper.Update(Dataset, "Table_Name") I'm not sure which is the Class in that statement... I came from an IBM AS/400 environ ...Show All
Alexnaldo Santos How to link buttons and textboxes, to do the same thing?
I have some tab's, and need to link some buttons and textboxes at different tab's. Is there a way to do it, other then doing it by code What do you mean by "link" DO you want something in common to happen when you click a button or go into a textbox Yes you can do those things but it must be done in code DMan1, for the buttons, a simple Handle to both will work. To the text box, I want them to to have the same thing written on both, and I think I will try it by using a .lostfocus, to copy the string to the next textbox. Lucas Lucas Pasquali wrote: rkimble, I think this will work well! DMan1, if I make a Textbox2.text=Textbox1.te ...Show All
nbrege A Web Browser thing?
How do I set up the web browser. With the address text box n' stuff HELP Is this a programming question You can put the web browser control into a form, and also put a textbox which you can use to set the current URL by hooking into events on the web browser control and the text box itself. ...Show All
ThirtySix Software Error while inserting data in to sql server from vb.net 2003
Hello, I have a problem while inserting data in to sql server from vb.net. the code given below works perfectly but when i try to insert string with single quotes it is not working properly. Ex. string: 'This is a sample question' myCommand = New SqlCommand("Insert into " & TableName() & " (Questions,Option1,Option2" & _ ",Option3,Option4,CorrectAnswer,LODType) values ('" & strQuestion & "','" & strOption1 & _ "','" & strOption2 & "','" & strOption3 & "','" & strOption4 & "','" & strCAns & "','" & strLODType & "')", conn) I think the problem in the insert qu ...Show All
PaoloZ From .Net 2003 to VS2005
Our project has got some user controls in the old VB6 Version, in the form of .ocx. When upgrade to VB.net 2003, they were changed to interop&Axinterop dlls. Now I hope to open the project in VS2005, and i've done upgrade following the upgrade guidance. But after upgrading, there were some warnings said the reference to those dlls can not be found. I checked the vbproj file of VS2003 and found out that in <reference> node, there're "name" and "assemblyname" properties. When they're the same, the reference in VS2005 is no problem. Otherwise, the refernce cannot be found. I'm really confused about this, anyone can help me Thank you very much. Hi - I'd only expect that ...Show All
Jimmy_fingers SEEKING: Component or library for creation of HTML code
I'm trying to find a library, DLL, etc. what would make creating HTML easier. So, it might have functions like: dim hConverter as new HTMLConverter dim hTable as new TableObject (rows, col) hTable.Cell (1,1)=hConverter.ToBold ("Hell world") + " this is NOT bolded" WebBrowser.Text=hTable.toHTML I think you get the idea. Component need not be free. Any suggestions Using the WebBrowser control as a web page editor . ...Show All
narend Multithreading cancellation Methode
Hi All, Lately I explore about multi threading,because there is a urgent need to implement this feature.I came up with a case of multi threading cancellation. There is two kind of multi threading we have. 1. threading in the program itself. ex. Private Sub Worker_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles Worker.DoWork Dim intI As Integer Dim intJ As Integer Dim intK As Integer Dim counter As Integer For intI = 1 To 20 For intJ = 1 To 20 For intK = 1 To 20 counter = counter + 1 'DO SOMETHING HERE Next Worker.ReportProgress(counter / 8000 * 100) Next Next End Su b 2. threading t ...Show All
Sorean Problem faced in updating databases
I designed a softwaere usng vb 2005.. i face a problem with sql server 2005... i used the automated database designing tables with the gridview option... the problem is that i cant update the database once i exit the appln. during runtime, the database works well, but the database doeant update or create the new records after exiting th appln... also provide some help on how to deploy an appln.. the databses dont get installed during installation... Also be sure that your database file isn't getting overwritten each time you build the project: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=427451&SiteID=1 can you show the code you use for updating the database how are you updating it We n ...Show All
Tony Antonucci stringbuilder or string within structure to match a C++ struct..??
********************** C ++ 6.0 ******************************************* typedef struct sSegment { char szName[128]; } sSegment; int EXPORTED GetSegment(long lSegmentIndex, sSegment* pSegment) ********************** data marsaling in vb.net ******************************************* Public Declare Function GetSegment _ Lib "EVaRT40.dll" _ (ByVal lIndex As Integer, ByRef objSegment As Segment) As Integer ****************** ...Show All
Captain007 Detecting the datatype of a data column
I have written a generic routine which accepts an object (in this case a database column) and returns an object which is the data in that column. The calling routine passes the necessary row and column for the routine to handle. I have written the routine to save having to check for null values individually, however, I need to detect the column type so I can respond to each individually. For example, if the column is a Boolean (bit) column, I need it to default to 'false' if the field is DBNull. If the column is a int32, int64, etc., then I need the resultant object to pass back as a "0". I have used the following code, and it seemed to work until I hit a null field for one of the datetime fields. It was only then ...Show All
MaggieChan Reading/Writing INI Files
I Add this code in a Module And i wrote this file that i called "Italian.lng": [DATA] Field1 = Speaker <DllImport("kernel32.dll", SetLastError:=True)> _ Public Function WritePrivateProfileString _ (ByVal lpApplicationName As String, _ ByVal lpKeyName As String, _ ByVal lpString As String, _ ByVal lpFileName As String) _ As Integer End Function <DllImport("kernel32.dll", SetLastError:=True)> _ Public Function GetPrivateProfileString( _ ByVal lpAppName As String, _ ByVal lpKeyName As String, _ ByVal lpDefault As String, _ ByVal lpReturnedString As StringBuilder, _ ByVal nSize As Integer, _ ByVal ...Show All
alphonso instr function for special chars
how do I do an instr for a special character eg: a quote. Instr(1,a$,vbQuote) doesn't work. Hi Bolo I may be missing something, but I don't see any connection with the VSTO technology in your question This seems more a question about the VB. NET language. So I'm moving you message to a more appropriate forum Enough talk, here they are: The following 3 will all work Public Class Form1 Public Const VBQuote As String = """" Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim stringtosearch As String = "fred" & ControlChars.Quote If Microsoft.VisualBasic.InStr(stringtosearch, ControlChars.Quote) Then ...Show All
Lynn Trapp Can i run VB.Net code (for Server) on UNIX?
i'm trying develop a Client/Server application to transform files from UNIX(Server) to Windows(Client) using VB.Net. Plz help me out how can i build this application. Hi That kind of depends what parts of the framework your application is using. The MS CLR will not run on a unix box, but projects such as mono and rotor successfully support a chunk of the framework on other operating systems. Head on over to www.go-mono.com to see whether your application can be supported. Richard ...Show All
