646 Posted Topics

Member Avatar for mar_tech546

[QUOTE]Even if we copy the same dll on that machine, it is not working.[/QUOTE] And you did register that dll with regasm, not just copy it, right? [QUOTE]what are all the dlls required to use GETOBJECT() method in VB.Net program[/QUOTE] I suggest downloading the whole [URL="http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en"]Primary Interop Assemblies[/URL] separately and …

Member Avatar for Teme64
0
113
Member Avatar for kasimacsys

[QUOTE]I have declare a array variable in module, i need to access this variable to ToolStripMenuItem_Click Event.[/QUOTE] Declare the array public. For example, [ICODE]Public MyArray() As Integer[/ICODE] [QUOTE]when type that variable it shows "Class 'System.Windows.Forms.ToolStripMenuItem' cannot be indexed because it has no default property"[/QUOTE] You're trying to access ToolStripMenuItem's item …

Member Avatar for Teme64
0
185
Member Avatar for plusplus

[QUOTE]I don't know the path when it's published[/QUOTE] Application.StartupPath returns the path where your application is executed. That path is usually under "Program Files" folder. If you need Vista/Win 7 compatible application, you shouldn't write [B]anything[/B] to that folder. Instead, use either Application.CommonAppDataPath (= All Users) or Application.LocalUserAppDataPath (= currently …

Member Avatar for Teme64
0
134
Member Avatar for babbu

Didn't test it but if I remember right [CODE=VB.NET]oledbcom.CommandText = ("INSERT INTO Customer Company, Address, Telephone values ?,?,?")[/CODE]should be [CODE=VB.NET]oledbcom.CommandText = ("INSERT INTO Customer (Company, Address, Telephone) values (?,?,?)")[/CODE] HTH

Member Avatar for Teme64
0
98
Member Avatar for sweetsasthi

[COLOR="Red"]babbu > u can hav as many tables as u want.[/COLOR] When you deal with computers you deal with restricted resources. See [URL="http://msdn.microsoft.com/en-us/library/aa933149%28SQL.80%29.aspx"]Maximum Capacity Specifications[/URL] for SQL Server 2000. It says: [QUOTE]Database objects include all tables, views, stored procedures, extended stored procedures, triggers, rules, defaults, and constraints. The sum of …

Member Avatar for Teme64
0
107
Member Avatar for Piya27

For the latter approach [QUOTE]I couldn't findout how to retrieve the last entered columns field using ExecuteRead[/QUOTE] use [CODE=VB.NET] Dim oCmd As SqlCommand . . strSQL = "INSERT INTO <table> (<fields>) VALUES (<values>)" strSQL = strSQL & "; SELECT @@IDENTITY AS 'Identity' " oCmd.CommandText = strSQL NewIdentity = CInt(oCmd.ExecuteScalar())[/CODE]in your …

Member Avatar for Teme64
0
165
Member Avatar for murid
Member Avatar for Teme64
0
188
Member Avatar for kimbula...

[QUOTE]How can we change the default color of a project in VB.net?[/QUOTE] You could change in each form with [ICODE]Me.BackColor = <color>[/ICODE]. I'm not sure if you could do a project template with your own color(s). [QUOTE]I want to change the color of the messagebox same as the color of …

Member Avatar for vbguru
0
96
Member Avatar for sreeram01
Member Avatar for madhurimonica
Member Avatar for kvprajapati
0
43
Member Avatar for manikandan_n84

[QUOTE]how to send a mail via ip address[/QUOTE] You don't send emails via IP addresses, you use SMTP servers. Take a look at [URL="http://msdn.microsoft.com/en-us/library/system.net.mail(VS.80).aspx"]System.Net.Mail[/URL] namespace in MSDN.

Member Avatar for kvprajapati
0
112
Member Avatar for mackre58

Hi mackre58! Read first "[URL="http://www.daniweb.com/forums/announcement58-2.html"]We only give homework help to those who show effort[/URL]" and then post your code.

Member Avatar for sonia sardana
0
63
Member Avatar for Moselekm

[QUOTE]I am used to mIRC's language where you can create, edit, and retrieve data from .txt files.[/QUOTE] You mean mIRC's script editor, rigth? You should be able to do that. There's only one small problem. .NET's text box control doesn't support line numbers. You could create a custom control, inherited …

Member Avatar for scsachira
0
169
Member Avatar for ChrisPaul

You could start with looking for how you can send email directly from SQL Server: [URL="http://www.databasejournal.com/features/mssql/article.php/3626056/Database-Mail-in-SQL-Server-2005.htm"]Database Mail in SQL Server 2005[/URL]. IMHO all you need after that in ASP.NET is a way to check if it's time to send (store last sent date), and a code snippet to trigger SQL …

Member Avatar for Teme64
0
110
Member Avatar for manutd4life

You're at least missing the ending '-character at [B]both[/B] SQL clauses. Your code [CODE=VB.NET]" Where WatchID='" & cmbWatchId.Text[/CODE]should be [CODE=VB.NET]" Where WatchID='" & cmbWatchId.Text & "'"[/CODE]assuming WatchID is textual value. Otherwise remove '-character from WatchID='" In your update clause [CODE=VB.NET]"',DescriptionOfWatch='" & txtDescription.Text & ",Price="[/CODE]you're also missing one '-character. It should …

Member Avatar for Teme64
0
128
Member Avatar for tripes

See [URL="http://www.daniweb.com/forums/thread119377.html"]How to read csv file contents in VB.Net[/URL]. It reads a csv file [U]lines[/U] in to an array. There's comment at the end, how to get (comma) separate values from one line. Use the code in that thread and add a second loop to split lines and finally put …

Member Avatar for Teme64
0
211
Member Avatar for Vivek_1986

[QUOTE]i require a general syntax for checking if the SQL table is empty or Contains records.[/QUOTE] Although I used SQL Server's data types, this is [B]very[/B] general syntax [CODE=VB.NET] Dim strSQL As String Dim oCmd As Data.SqlClient.SqlCommand Dim RecCount As Integer ' SQL Statement strSQL = "SELECT COUNT(*) AS RecCount …

Member Avatar for sknake
0
1K
Member Avatar for lalchetian

[QUOTE]Any other way to get around?[/QUOTE] Use web browser control. Here's your (simplified and modified) HTML[CODE] <html> <script> function showMoreFF4() { alert('foo'); } </script> <body> <A id=moreFF4Link style="DISPLAY: inline" onclick="showMoreFF4()" href="javascript:return(0);"><BR>Show More &gt;</A> </body> </html>[/CODE]And the code to "click" that link [CODE=VB.NET]Private Sub Form1_Load(ByVal sender As Object, ByVal e As …

Member Avatar for Teme64
0
278
Member Avatar for Piya27

[QUOTE]This site itself is a very good source of learning[/QUOTE] Yes it is. Especially when you got stuck with your code :) There are plenty of online tutorials, try googling [URL="http://www.google.com/search?q=vb.net+tutorial"]http://www.google.com/search?q=vb.net+tutorial[/URL] them and check for good ones. MSDN's [URL="http://msdn.microsoft.com/en-us/library/2x7h1hfk(VS.80).aspx"]Visual Basic[/URL] is not a tutorial but a good reference when needed. …

Member Avatar for Piya27
0
142
Member Avatar for williamyounger

If you want to use the same procedure, pass a parameter to proc to tell which form to show [CODE=VB.NET]Public Sub GotoForm(ByVal FormIndex As Integer) ' Change form Select Case FormIndex Case 2 frmLevel1.Close() Dim frmLevel2 As Form2 frmLevel2 = New Form2 frmLevel2.Activate() frmLevel2.Show() Me.Hide() Case 3 frmLevel2.Close() Dim frmLevel3 …

Member Avatar for williamyounger
-1
123
Member Avatar for Fahim.Tamim

I was just going to show the same example :) Anyway. Here's a small fix for removing tab page [CODE=VB.NET]Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If TabControl1.SelectedIndex >= 0 Then TabControl1.TabPages.RemoveAt(TabControl1.SelectedIndex) End If End Sub[/CODE]You should always check the value of <control>.SelectedIndex before using …

Member Avatar for Teme64
0
119
Member Avatar for plusplus

I tried your code with [ICODE]Dim myRequest As WebRequest = WebRequest.Create("http://www.daniweb.com")[/ICODE] and got no empty line as the first line. Have you tried other URLs? What if you comment out [ICODE]myRequest.Proxy = WebRequest.DefaultWebProxy[/ICODE] line, does it help? I can't see any obvious reason why you should get an empty line, …

Member Avatar for Teme64
0
594
Member Avatar for b89smith

I would use button's Tag property to store information about which button have been clicked. Here's the full code [CODE=VB.NET]Public Class Form1 Private Sub NewButton(ByVal ButtonNumber As Integer) ' Create a new button Dim oButton As Button oButton = New Button ' Set properties. Change these as you like and …

Member Avatar for Teme64
0
1K
Member Avatar for kerek2
Member Avatar for TheFueley

[QUOTE]I'm guessing it is searching for a matching switch object with in the list right?[/QUOTE] That's right. You can't use Contains method in this case. You have to loop and cast to find the right value [CODE=VB.NET]Dim i As Integer For i = 0 To VisioSwitchArray.Count - 1 If CType(VisioSwitchArray.Item(i), …

Member Avatar for TheFueley
0
1K
Member Avatar for Lewis_UnderGrad

[QUOTE]The only firewall'like program i am running is Avira. Is there a way to configure Avira to open port 3306? I have tried turnning Avira off whilst installing too..[/QUOTE] AFAIK you need that (default) port open later too. I believe you do have some firewall, maybe Windows Firewall. That's where …

Member Avatar for Teme64
0
233
Member Avatar for Tamir09

Have you ever tried DaniWeb's Site Search? Ok, here's a thread "[URL="http://www.daniweb.com/forums/thread194596.html"]parse XML in an array in vb.net console application[/URL]" where I posted XML to array procedure. It should be easily modified for your needs.

Member Avatar for Tamir09
0
3K
Member Avatar for sonia sardana

Just guessing. It might be some "modified" epoch time format used in *nix systems. See [URL="http://windevblog.blogspot.com/2008/09/epoch-time-in-vbnet.html"]Epoch time in VB.NET[/URL]. By modified, I mean that the base date is not 1.1.1970. Also the value "1244272348453125" is not 32-bit integer like it should be in epoch time :-/ You could ask your …

Member Avatar for Teme64
0
101
Member Avatar for mrclark

Use the debugger for the first problem. Set a breakpoint to [ICODE]DrawPad.Image.Save(SaveDrawing.FileName, System.Drawing.Imaging.ImageFormat.Bmp)[/ICODE] line (move cursor over the line and press F9 to toggle breakpoint on and off). Run the code until it stops that line. Open the immediate window (press Ctrl+G). In the immediate window, write [ICODE]? DrawPad[/ICODE] and …

Member Avatar for Teme64
0
133
Member Avatar for mohankumar554

[QUOTE]can u tell me how to develop an web application using vb.net and the application's data is stored in the database .and the database is mssql...[/QUOTE] Start by learning basics first. Do some googling for tutorials and examples. For example, following search gave a few pretty good results: [URL="http://www.google.com/search?q=vb.net+asp.net+tutorial"]http://www.google.com/search?q=vb.net+asp.net+tutorial[/URL]

Member Avatar for Teme64
0
98
Member Avatar for TheBrenda

Both zip-files unzipped perfectly both with Windows XP's unzip and WinZip 12.0. Are you sure you downloaded zip-files from the Mirrors column?

Member Avatar for TheBrenda
0
221
Member Avatar for kerek2

Here's a Q&D solution [CODE=VB.NET]Public Function NewFileName(ByVal FileName As String, ByVal FileExt As String) As String ' Dim NewName As String Dim DateStr As String Dim TempStr() As String Dim i As Integer ' Get date and time DateStr = System.DateTime.Now.ToString ' Remove time TempStr = Split(DateStr, " ") DateStr …

Member Avatar for Teme64
0
166
Member Avatar for ad65222

[QUOTE]i am a newbie in this[/QUOTE] I can see that. [QUOTE]please help me[/QUOTE] That's good, ask politely. But [QUOTE]ASAP. keenly waiting for ur reply with "FULL CODE"[/QUOTE] since most of us answer these questions beside their day-time jobs, you can't expect: ASAP "FULL CODE". Ok. Sai_Vargheese offered a solution that …

Member Avatar for samir_ibrahim
0
172
Member Avatar for mem81

Here's a function to parse XML file to arrays [CODE=VB.NET]Imports System.Xml Public Sub ImportXML(ByVal FileName As String, _ ByRef Names() As String, ByRef CountStart() As Integer, ByRef CountEnd() As Integer) ' Dim FStream As FileStream Dim XReader As Xml.XmlTextReader Dim XDoc As XPath.XPathDocument Dim XNav As XPath.XPathNavigator Dim XIter As …

Member Avatar for mem81
0
2K
Member Avatar for Sylenas

Didn't quite get what you're trying to do. But here's the basic idea, how you get data from a text line (VB2005 / .NET 2.0 and newer) [CODE=VB.NET]Dim FileText As String Dim FileLines() As String Dim OneLine() As String Dim SeparatorChar As String Dim i As Integer ' Check that …

Member Avatar for Teme64
0
2K
Member Avatar for kerek2

If you store a [B]string[/B] "00001" in the database it will be saved as "00001" [CODE=VB.NET]Dim strSQL As String Dim ValueStr As String ValueStr = "00001" ' Store as a string strSQL = "INSERT INTO <mytable> (<mytextfield>) VALUES ('" & ValueStr & "')"[/CODE]What may cause your problem is not in …

Member Avatar for Teme64
0
101
Member Avatar for pardeep3dec

[QUOTE]I need a small code that can read a text file from LAN i.e. through IP address and there is no sharing folder on that pc[/QUOTE] May I ask why you want to do that? [QUOTE]is it possible to read a text file read and write on the same time …

Member Avatar for ithelp
0
120
Member Avatar for toko

[QUOTE]I have one sub and I have it handleing different events of different objects. So my problem is I want to determine which event was triggered from which object.[/QUOTE] Could you please post your code.

Member Avatar for Teme64
0
119
Member Avatar for zuve_fox

[QUOTE]why result different sometimes: display MessageBox with text 1 ,3,3,5 and 6 every executed,the result different[/QUOTE] Threads are executed asynchronously. Different results come from, which order OS yields time for the threads to be executed. [QUOTE]i want display result 1,2,3,4,5[/QUOTE] How about [CODE=VB.NET]For i = 1 To 5 MsgBox(i) Next …

Member Avatar for Teme64
0
88
Member Avatar for DAWNIE

This continues from the thread "[URL="http://www.daniweb.com/forums/thread192517.html"]How to add up total point?[/URL]" First, I have to correct my answer about detecting control's type. Here's how it should be done [CODE=VB.NET]If TypeOf (oCtrl) Is CheckBox Then If CType(oCtrl, CheckBox).Checked Then End If End If[/CODE]You have to make sure that you don't refer …

Member Avatar for Teme64
0
319
Member Avatar for Loony064

MS Access wasn't developed for a multi-user, concurrent environment needs. I would suggest some other back-end database. Good alternatives are [URL="http://www.microsoft.com/Sqlserver/2005/en/us/express.aspx"]SQL Server 2005/2008[/URL] (free Express Editions, check the end user license agreement) and [URL="http://www.mysql.com/"]MySQL[/URL] (free Community Edition, check the end user license agreement). Both are "real" db's i.e. they support …

Member Avatar for Teme64
0
681
Member Avatar for gareth.nic

I don't either spot any logical error in the code. Have you tried [CODE=VB.NET]Dim iBottle As Integer Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' iBottle = 750 End Sub [/CODE]or just [CODE=VB.NET]Dim iBottle As Integer[/CODE] if the user hits cmdNewBottle as the first button.

Member Avatar for Teme64
0
1K
Member Avatar for neutralfox

I ripped my old code for searching files [CODE=VB.NET] Imports System.IO ''' <summary> ''' Return file names ''' </summary> ''' <param name="RootPath">The path to start searching files</param> ''' <param name="FileMask">An array of file masks</param> ''' <param name="FileNames">Argument returns fully qualified file names</param> ''' <param name="ShortFileNames">Argument returns file names only</param> ''' …

Member Avatar for Teme64
0
303
Member Avatar for sonia sardana

Here's a code ripped from my old app [CODE=VB.NET]Public Sub ParseUrlFile(ByVal FileName As String, ByRef NewUrl As String) ' Return URL from the url-file ' Dim FileStr As String Dim OneLine() As String Dim i As Integer Dim j As Integer Const PROCNAME As String = "ParseUrlFile" Try NewUrl = …

Member Avatar for sonia sardana
0
202
Member Avatar for Fire00f1y

Most likely you have "off-by-one" error while indexing the matrix. Try this in sub All() [CODE=VB.NET]For i = 0 To x For j = 0 To y If i > pictures.GetUpperBound(0) OrElse j > pictures.GetUpperBound(1) Then ' Debug MessageBox.Show("Out of bounds", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) End If If pictures(i, j) Is …

Member Avatar for Vandamn
0
310
Member Avatar for aditya_amb

Since Mathfuncdll.dll is a .NET library, you use it like .NET's "built-in" libraries. Add from "Project Properties" a reference to that .NET DLL and in your code import DLL's namespace if it has one and just call its methods. You shouldn't need any [ICODE]Public Declare Function MathFuncs Lib "MathFuncsDll.dll" ()[/ICODE]. …

Member Avatar for Teme64
0
320
Member Avatar for mrclark

[QUOTE]i have found e.location.x that says it is a reador wright variable, but when i set it equal to a number i get an error saying "Expression is a value and therefore cannot be the target of an assignment."[/QUOTE]What event are you trapping? For example [CODE=VB.NET]Private Sub Form1_MouseClick(ByVal sender As …

Member Avatar for Teme64
0
141
Member Avatar for Saravanan07

[QUOTE]This system is developed using VB.Net.[/QUOTE] I highly doubt that. It looks like to be directly ported from VB6 which uses ADO. I've no idea if it works but you may try to add a reference to ADO COM component. The better way would be to write it .NET way …

Member Avatar for Teme64
0
221
Member Avatar for maheen123

Comparing a string to "" actually compares with a string which has a length of zero. This is not the same thing as an empty string. Use instead String.IsNullOrEmpty() to test both cases [CODE=VB.NET]If String.IsNullOrEmpty(TextBox1.Text) OrElse String.IsNullOrEmpty(TextBox2.Text) Then MsgBox("Please Enter the text") Exit Sub End If[/CODE] If you want to …

Member Avatar for Teme64
0
2K
Member Avatar for znetweb

Here's something to get you started [CODE=VB.NET]Private m_FileNames() As String Private m_CurIndex As Integer ''' <summary> ''' Return file names ''' </summary> ''' <param name="RootPath">The path to start searching files</param> ''' <param name="FileMask">An array of file masks</param> ''' <param name="FileNames">Argument returns fully qualified file names</param> ''' <param name="ShortFileNames">Argument returns file …

Member Avatar for Teme64
0
291

The End.