458 Posted Topics
Why aren't old posts prevented from being commented on. Posts from 5+ yrs ago are being revived. I think that any post that has been inactive for 6 months or more should be closed and not accept any new comments. | |
Re: Are you using SQL Server or SQL Server Express? If so, are you trying to connect to an instance on the new machine? If so, did you install the db software on the new machine and create the database? | |
Re: Have you tried using the API? [Instagram API](http://instagram.com/developer/#) | |
Re: I've never used ReportViewer, but I found this post: [set page layout for report viewer...](http://stackoverflow.com/questions/12985990/set-page-layout-for-report-viewer-in-visual-studio-2010) The following is converted and and adapted for VB .NET: Dim myPageSettings As New System.Drawing.Printing.PageSettings() myPageSettings.Margins = New System.Drawing.Printing.Margins(0, 0, 0, 0) Dim paperSize As System.Drawing.Printing.PaperSize = New System.Drawing.Printing.PaperSize() 'ToDo: update with the PaperKind 'that … | |
Re: C# is case-sensitive. Are you sure your teacher didn't specify you to use "Base"? You can use "Base"--capital "B". Although, I wouldn't recommend using a different case of a reserved word. It would be similiar to you doing the following: string employee = "John"; string Employee = "Bill"; string eMployee … | |
Re: Try the following: Dim htmlElements As HtmlElementCollection htmlElements = WebBrowser1.Document.GetElementsByTagName("button") For Each element As HtmlElement In htmlElements MessageBox.Show("element name: '" & element.Name & "' InnerText: '" & element.InnerText & "'" & " Type: '" & element.GetAttribute("type") & "'") If element.GetAttribute("type") = "submit" Then element.InvokeMember("Click") Exit For End If Next | |
Re: Is your program running as a service? | |
Re: Did you try booting into safe mode and accessing your usb device? You could also download a boot cd/dvd and burn it to cd/dvd which you may be able to use to boot your computer and then copy/burn your files from your usb device to a dvd. Ensure your dvd … | |
Re: How many lines of code? Did you overstate your abilities during your interview? You may find it beneficial to shadow one (or more) of the users of the product--to get the end user experience. Aside from that, if you want to prove yourself, you will likely need to spend time … | |
Re: Use a file. Xml file would work well. Search how to read/write to an XML file. Or you can just save the connection information to a text file. | |
Re: In your program? Or in another program? | |
Re: Here are 3 different versions. * Version 1 uses the dictionary above, mentioned by Reverend Jim. * Version 2 uses two arrays. * Version 3 uses an array of a class. **Note:** Uses a ListView as mentioned by tinsaafl **Controls on form:** * Button named writeBtn * Button named readBtn … | |
Re: Add using statement: * using Microsoft.Win32; Then to find out if it is 32-bit (x86) or 64-bit: private string processorArchitectureKey = @"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment"; private string productVersionKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion"; Then: string processorArchitecture = Registry.GetValue(processorArchitectureKey, "PROCESSOR_ARCHITECTURE", null).ToString(); Console.WriteLine("Processor Architecture: " + processorArchitecture); string osVersion = Registry.GetValue(productVersionKey, "ProductName", null).ToString(); Console.WriteLine("OS: " + … | |
Re: Where is your code running? On your computer? Are you trying to update a database on your computer and on the web server? | |
Re: What is the project? What is the PhD in? | |
Re: Change the name using the properties for the control. Right-click the control, and select "Properties". Look for "(Name)". Change the name there. | |
Re: The following is an easy way to accomplish it. Add the following: Dictionary<string, string> filterDict = new Dictionary<string, string>(); private string whereClause = string.Empty; Then call the following everytime "TextChanged" (for any TextBox) occurs: **Version 1:** This version assumes that all of the column data types are string data types … | |
Re: [SendKeys.Send Method ](http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send(v=vs.110).aspx) *"Caution: If your application is intended for international use with a variety of keyboards, the use of Send could yield unpredictable results and should be avoided."* | |
Re: Search for DataView and DataView.RowFilter | |
Re: Use the code from your other post that uses the DataTable. Set the DataTable as the datasource for the DataGridView. A DataSet can hold multiple data tables. | |
Re: In the second example it will skip the rest of the else if statements when it has found a satisfying condition. In your first example every if statement will be evaluated. In your short example it doesn't make much difference. The difference is noticed in a loop with many iterations … | |
Re: See the [other post](http://www.daniweb.com/software-development/vbnet/threads/482957/update-not-working-using-idb2) on how to use parameters. I am not able to test it on DB2, but I believe that the driver follows the same syntax rules as other database drivers. | |
Re: [Create, Execute and delete Macro in excel using C#](http://codingsense.wordpress.com/2009/05/11/create-execute-and-delete-macro-in-excel-using-c/) There is also a VB .NET version in the post. **To add Microsoft.Vbe.Interop reference:** * Project * Add Reference * .NET * Microsoft.Vbe.Interop **To add Microsoft.Office.Interop.Excel reference:** * Project * Add Reference * .NET * Microsoft.Office.Interop.Excel [You must explicitly enable access … | |
Re: The following has been tested in Excel 2010: **Add a reference to Microsoft Excel xx.x Object Library** * Project * Add Reference * COM * Microsoft Excel 14.0 Object Library Create a new module named "Module1.vb". **Module1.vb:** Imports Excel = Microsoft.Office.Interop.Excel Module Module1 Public Enum ColumnVisibility Hide Show End Enum … | |
Re: First of all, your code doesn't compile. You're missing the following: Dim clients As New Hashtable In Server, try the following: Sub Recieved(ByVal Message As String, ByVal Client As ConnectedClient) Dim msg() As String = Message.Split(split) Select Case msg(0) ' switch case on server return Case "Login" clients.Add(Client, Client.Name) ListBox1.Items.Add("Connected … | |
Re: What is the data type of the column? | |
Re: First of all, you want to make sure that the DocumentCompleted event is only firing once. [Determine a web page is done loading in WebBrowser (CSWebBrowserLoadComplete)](http://code.msdn.microsoft.com/windowsapps/CSWebBrowserLoadComplete-ae1391fc) *"...In the case of a page with no frames, the DocumentComplete event is fired once after everything is done. In case of multiple frames, … | |
Re: Try the following: Dim param1 As New iDB2Parameter param1.ParameterName = "@username" param1.iDB2DbType = iDB2DbType.iDB2VarChar param1.Value = txtUsername.Text cmdUpdate.Parameters.Add(param1) Dim param2 As New iDB2Parameter param2.ParameterName = "@loginDate" param2.iDB2DbType = iDB2DbType.iDB2Date param2.Value = DateTime.Now.ToString("d") cmdUpdate.Parameters.Add(param2) Dim param3 As New iDB2Parameter param3.ParameterName = "@loginTime" param3.iDB2DbType = iDB2DbType.iDB2Time param3.Value = DateTime.Now.ToString("T") cmdUpdate.Parameters.Add(param3) Or in … | |
![]() | Re: How did you create the columns? In VS or using code? |
Re: You could use WebClient or HttpWebRequest to get the URL source. Then look for the desired info. **Add the following Imports statements:** * Imports System.IO * Imports System.Net **Version 1** (using WebClient)**:** **getUrlSource:** Public Function getUrlSource() As String Dim urlSource As String = String.Empty Dim client As New System.Net.WebClient Try … | |
Re: I haven't tested this, but it looks like it might be what you are trying to do: [Programmatically forwarding email message with inline images](http://www.codeproject.com/Articles/21342/Programmatically-forwarding-email-message-with-inl) | |
Re: [Creating and Using a Database](http://dev.mysql.com/doc/refman/5.1/en/database-use.html) *"...The USE statement is special in another way, too: it must be given on a single line..."* [Connection Strings](http://www.connectionstrings.com/mysql/) *"...The port 3306 is the default MySql port..."* Try the following: **In "saveImage":** Change line #5 to: string myConnectionString = "Server = " + server + … | |
Re: Use one of the following directories to store your data: Dim userProfileDir As String = Environment.GetEnvironmentVariable("USERPROFILE") Dim allUsersProfileDir As String = Environment.GetEnvironmentVariable("ALLUSERSPROFILE") Dim appDataDir As String = Environment.GetEnvironmentVariable("APPDATA") If you don't need to run your program on XP, you can use: Dim appDataDir As String = Environment.GetEnvironmentVariable("ProgramData") | |
Re: What os? Is the C drive where the os resides? If so, it's not a good idea to share the os drive to everyone even on your home network. What are you trying to accomplish? | |
Re: There is some code in [this post](http://www.daniweb.com/software-development/vbnet/threads/480531/regex-alternatives) that uses regex. It demonstrates usage of regex in VB .NET. | |
Re: I have a post [here](http://www.daniweb.com/software-development/vbnet/threads/480783/declaration-of-connection-string-using-ado/) that shows using ADODB. It is on page 1. See "Version 4 (using ADODB and OleDbDataAdapter)" It is for DB2 Express, but just change the connection string and it should work. For additional connection strings see: [Connection Strings](http://www.connectionstrings.com/) | |
Re: Please show your table relationships. | |
Re: If you have foreign keys, the order in which you drop the tables is important. If you are re-creating the tables exactly the same, it isn't necessary to drop the tables, only to delete the data. | |
Re: Personalize the message. In emailText replace the word "user" with each person's first name. Use String.Replace | |
Re: **Add reference to "Microsoft Outlook xx.x Object Library"** (where xx.x = 14.0, 12.0, etc)**:** * Click "Project" * Select "Add Reference" * Click "COM" * Select "Microsoft Outlook 14.0 Object Library" **Add Imports statement:** * Imports Outlook = Microsoft.Office.Interop.Outlook; **getContacts:** Private Sub getContacts() 'create new instance of Outlook.Application Dim outlookApp … | |
Re: What kind of database are you using? | |
Re: Try surrounding string values with single quotes. Or better yet, use parameters. Search for parameterized queries. | |
Re: Try posting more of your code. What version of VB .NET? What version of Outlook? | |
![]() | Re: What version of VS? What version of .NET? Are both UserControls being used on the same form or different forms? Do you have some screen shots? I'm confused by "I am trying retain the original instance so that a new instance will not block my original user control instance." Please … |
Re: So you want Table2 to be a copy of Table1? Why don't you delete all the data from Table2 and then use "Select Into". [SQL SELECT INTO Statement](http://www.w3schools.com/sql/sql_select_into.asp) [Inserting Rows by Using SELECT INTO](http://technet.microsoft.com/en-us/library/ms190750(v=sql.105).aspx) | |
Please add a feature that requires a short explanation for a down-vote. It is not beneficial to see that a post was down-voted without knowing why. | |
Re: If you want anyone to help, you need to provide your code. | |
Re: Use a "Sub". [Functions and subroutines](http://www.vb6.us/tutorials/functions-and-subroutines-vb6) *"...Subroutines are useful because they eliminate redundancy..."* | |
Re: Use wmi to get the relevant info (mac address, ip address, etc) and send that info wherever you want to send it. | |
Re: Please post some code and some more information. Are you adding the data using datagridview? Or on another form? |
The End.