646 Posted Topics

Member Avatar for Zandermander

[QUOTE]Is there any way to un-dispose the Tcpclient[/QUOTE] No. [QUOTE]is there a way to disconnect without disposing the Tcpclient[/QUOTE] AFAIK no. [QUOTE]once the user disconeccts from the server using TcpClient.close he can not reconnect without restarting the app because clientSocket is disposed[/QUOTE] TcpClient.Close disposes the socket as you noticed. You …

Member Avatar for Zandermander
0
1K
Member Avatar for Saravanan07

Does your code show the message box when you use "James007" as an input? If your code is in a procedure, you should exit procedure or do something to not to execute DB insert code [CODE=VB.NET]If (IsNumeric(TextBox1.Text)) Then MsgBox("Numeric Characters are not allowed in Name!", MsgBoxStyle.Critical Or MsgBoxStyle.OkOnly, "Invalid") TextBox1.Text …

Member Avatar for kvprajapati
0
220
Member Avatar for Apexa Dhongde

AFAIK no. Any special reason to do inheritance at the run-time and not in the design mode? What would you like to inherit from the parent form (there might be other solution than inheritance)?

Member Avatar for Teme64
0
98
Member Avatar for Romil797

Never used myself, but recommended a few times is [URL="http://code.google.com/p/geckofx/"]GeckoFX[/URL] with support on [URL="http://geckofx.org/"]GeckoFX Forum[/URL].

Member Avatar for Teme64
0
95
Member Avatar for lolwtf

[QUOTE]Do i need some sort of Epic if statement to validate what the user inputted into the text boxes[/QUOTE]I'm afraid you need it. [QUOTE]am i on the wrong path[/QUOTE]I don't think so. I don't know what type of DBAuser is. But the SQL syntax [ICODE]"SELECT login,password FROM login WHERE userName …

Member Avatar for lolwtf
0
149
Member Avatar for omotoyosi

[QUOTE]any image i add into it will not display at runtime. i mean the picture box will be blank and will not show the image i added to it.[/QUOTE] Post the code which "adds" (loads from a file?) the image(s) and displays image(s) in the picture box control.

Member Avatar for Teme64
0
76
Member Avatar for DAWNIE

See first: [URL="http://www.daniweb.com/forums/announcement58-2.html"]We only give homework help to those who show effort[/URL] announcement. I'll give you something to get started with. VB.NET stores controls in controls collections, so you can't have a control array (of checkboxes) like in VB6. Here's an example, how to loop a control collection and check …

Member Avatar for Teme64
0
323
Member Avatar for eostre

[QUOTE]I haven't found a control that'll act as a way for the receptionist to view appointments day to day so I'm using a listbox, where choosing a specific date using the datetimepicker will call up a list. Is there a better way?[/QUOTE]I don't think that VB.NET itself has a fully …

Member Avatar for Teme64
0
183
Member Avatar for bigtreeworld

A bullet-proof method is [CODE=VB.NET]WebBrowser1.AllowNavigation = False[/CODE] but that does prevent [B]all[/B] navigation. That's probably what you don't want. You could trap NewWindow event (like you did) [CODE=VB.NET]Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow ' Prevent opening a new windows e.Cancel = True End Sub[/CODE]and …

Member Avatar for bigtreeworld
0
1K
Member Avatar for RobinTheHood

Here's how you do it with ODBC [CODE=VB.NET]Imports System.Data.Odbc Dim oConn As OdbcConnection Dim oCmd As OdbcCommand Dim oReader As OdbcDataReader Dim strSQL As String ' Set a proper connection string oConn = New OdbcConnection("Driver={Microsoft Access Driver (*.mdb)};Dbq=D:\test.mdb;Uid=;Pwd=;") Try ' Open the connection oConn.Open() Catch ex As Exception ' Failed …

Member Avatar for RobinTheHood
0
160
Member Avatar for InVerteBrain

VB.NET stores controls, like text boxes, to a control collection. See [URL="http://www.daniweb.com/forums/thread192517.html"]this[/URL] DaniWeb's thread, how to loop through the control collection, recognize text boxes and finally, how to use control's properties.

Member Avatar for Teme64
0
92
Member Avatar for lolwtf

Was it SendEmailMessage and/or SendFakeEmailMessage that throws the error? Anyway, change [CODE=VB.NET]SmtpMail.Send(mailmsg)[/CODE] to [CODE=VB.NET]Try SmtpMail.Send(mailmsg) Catch ex As Exception MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Debug.Print(ex.Message) End Try [/CODE]and then please post the error message you receive. See also [URL="http://www.daniweb.com/forums/misc-explaincode.html?TB_iframe=true&height=400&width=680"]Explain Code Tags[/URL]. For VB.NET it's [CODE = VB.NET] [/ CODE] (without [B]any[/B] …

Member Avatar for lolwtf
0
138
Member Avatar for sonia sardana

I don't use Safari but I have it installed (version 3.2.2 (525.28.1)). I took a quick look at history.plist and it looks like valid XML to me. I also changed the file extension to xml and it opened with my xml editor without errors. Maybe you don't have to do …

Member Avatar for Teme64
0
215
Member Avatar for kerek2

This is what I came up with thinking quickly. The code is for the client forms [CODE=VB.NET]Public Class Form2 Private Sub Form2_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated ' Call resize to position this form _after_ creation ' Call with dummy (empty) args Form2_Resize(Me, New System.EventArgs) End …

Member Avatar for Teme64
0
130
Member Avatar for sunil01

Use ToShortDateString of the DateTime class. Here's an example [CODE=VB.NET]Dim SQLDateTime As Date Dim OnlyDate As String ' Debug, get this value from SQL Server. Notice: This is my locale date format SQLDateTime = CDate("15.5.2009 15:53:00") OnlyDate = SQLDateTime.ToShortDateString MessageBox.Show(OnlyDate, "Only Date", MessageBoxButtons.OK, MessageBoxIcon.Information)[/CODE]

Member Avatar for Teme64
0
112
Member Avatar for lolwtf

The only problem is to validate user input as a valid file name. AFAIK the following should be 100% bullet-proof method [CODE=VB.NET]Dim FileName As String Dim bIsValidFileName As Boolean Dim i As Integer ' Get user input FileName = TextBox1.Text ' Validate bIsValidFileName = True ' Can't be empty If …

Member Avatar for lolwtf
0
1K
Member Avatar for arunasingh

The timer control can't go "backwards". You'll have to "count" the elapsed time "forward" [CODE=VB.NET]Private Const MAX_MINUTES As Integer = 60 ' 1 hour, change this value (has to be > 0) Private CurrentMinute As Integer ' Track minutes Private CurrentSecond As Integer ' Track seconds Private Sub Form1_Load(ByVal sender …

Member Avatar for Teme64
0
114
Member Avatar for zaimah

[QUOTE]it shows conn = nothing[/QUOTE] In [ICODE]Private Function GetRunNo() As Long[/ICODE] you have[CODE=VB.NET] Finally conn = Nothing ds = Nothing End Try[/CODE] and in [ICODE]Private Sub UpdateRunNo(ByVal lastDateUsed As DateTime, ByVal lastRunNoUsed As Long)[/ICODE] you have [CODE=VB.NET]Finally conn = Nothing comm = Nothing End Try[/CODE]Take [ICODE]conn = Nothing[/ICODE] lines (or …

Member Avatar for Teme64
0
186
Member Avatar for Mcdermid

Like Ramy said, use SQL functions to sum the points. Here's a one sample code [CODE=VB.NET]Public Function TeamTally(ByVal TeamName As String) As Integer ' Return total points for TeamName Dim oConn As OdbcConnection Dim oCmd As OdbcCommand Dim strSQL As String Dim QueryResult As Object ' Create and open an …

Member Avatar for Teme64
0
87
Member Avatar for rickdanna

[QUOTE]I would like to come up with a number generator that takes the Total number (for this example I'll say 20), divides it by 2, and does alternating additions so the end result will generate a list like this: 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, …

Member Avatar for Teme64
0
97
Member Avatar for En-Motion

[QUOTE]though maybe I could just declare them globally once[/QUOTE]Yes, you can do that [CODE=VB.NET]Public Class Form1 Dim number1 As Double Dim number2 As Double Dim total As Double . . . End Class[/CODE]But the point where your code goes wrong is [CODE=VB.NET]Public Class Form1 Dim number1 As Double = CDbl(txtNum1.Text) …

Member Avatar for Teme64
0
177
Member Avatar for Zandermander

First, take a look at thread [URL="http://www.daniweb.com/forums/thread185804.html"]Search multiple words using Find method[/URL]. That's about highlighting all occurrences of the given string. Secondly, you have a control with a name TextBox1, which is the default name for the first text box control dropped on the form. First rich text box would …

Member Avatar for Teme64
0
628
Member Avatar for murid

If I understood your question right I don't see any reason why that can't be done. I won't give you any code. It's better that you learn first the basics of d&d and try to do it yourself. I quickly googled three articles which get you started. They're for VB.2003 …

Member Avatar for Teme64
0
158
Member Avatar for DAWNIE

What is the exact error message? And at what point it comes. You may try this [CODE=VB.NET]Try connAdd.Open() Catch ex As Exception Debug.WriteLine(ex.Message) End Try . . . Try cmdAdd.ExecuteNonQuery() Catch ex As Exception Debug.WriteLine(ex.Message) End Try[/CODE]to get error message(s) and post them here. Since you're dealing with two computers …

Member Avatar for DAWNIE
0
203
Member Avatar for asmsycool

Where do you have this code? In an event handler? What is Accomodation in the line [ICODE]If Accomodation = AccStandard(index) Then[/ICODE]? [QUOTE]but i got hooked at this point.[/QUOTE] At what point you're hooked? Give enough details and code, please.

Member Avatar for Teme64
0
88
Member Avatar for deepali_245

If you want to get an answer to your question, you should post it in DaniWeb's [URL="http://www.daniweb.com/forums/forum18.html"]ASP.NET[/URL] forum. This is VB.NET forum ;)

Member Avatar for Teme64
0
85
Member Avatar for willrose84

IO.WatcherChangeTypes.Changed is raised when the file's [B]or[/B] the folder's size, attributes, last accessed etc. are changed. First, filter [ICODE]FileSystemWatcher1.NotifyFilter = NotifyFilters.LastWrite[/ICODE]This should assure that the event is raised only when the file is updated. However, you still get the same event twice because the folder is updated too. Use a …

Member Avatar for Teme64
0
236
Member Avatar for willrose84

.NET has a FileSystemWatcher control which monitors changes in a given directory and notifies if there are changes made. See MSDN documentation of [URL="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(VS.80).aspx"]FileSystemWatcher Class[/URL].

Member Avatar for Teme64
0
110
Member Avatar for mem81

[QUOTE]I am obviously missing something[/QUOTE]Yes, you are. You take a [ICODE]Dim RowValue As String = Mid(Line, 96, 9)[/ICODE] which would be a nine character long string. Then you compare it with strings [ICODE]Dim StrArray() As String = {"Value1", "Value2", "Value3", "Value4"}[/ICODE] each with the length of six characters. That's why …

Member Avatar for mem81
0
107
Member Avatar for aveao

Declare your array to class level scope and initialize array in form's load event, like this [CODE=VB.NET]Public Class Form1 Private s() As Integer Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' Initialize array s(0) = 0 s(1) = 0 s(2) = 0 s(3) = 0 …

Member Avatar for Teme64
0
95
Member Avatar for amorphis88

Actually your code does the opposite thing. It adds to third list box items from list box A that do exist in list box B. Otherwise, there's nothing wrong with your code. Here's your code (list boxes renamed) [CODE=VB.NET] ListBox1.Items.Add("first@acme.com") ListBox1.Items.Add("second@acme.com") ListBox2.Items.Add("second@acme.com") ListBox2.Items.Add("third@acme.com") For k As Integer = ListBox1.Items.Count - …

Member Avatar for Teme64
0
691
Member Avatar for Zandermander

You might get those remote computer names with WMI. I found this article "[URL="http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr06/hey0425.mspx"]How Can I Determine the Name of the Local Computer Using WMI?[/URL]" which may be a good starting point.

Member Avatar for Zandermander
0
3K
Member Avatar for ecedano

a) No. But if you can separate the "sensitive" part of the code to a different project, you could compile it as a DLL and use obfuscator. Even that doesn't provide a total, 100% protection b) I suggest using version controlling with branch/merge. MS has its SourceSafe but there are …

Member Avatar for Teme64
0
121
Member Avatar for stephen lowry

Here's something to get started with [CODE=VB.NET]Dim ImportedFile As String Dim ImportedLines() As String Dim OneLine() As String Dim strSQL As String Dim i As Integer If My.Computer.FileSystem.FileExists("C:\test.txt") Then ' Read the whole text file ImportedFile = My.Computer.FileSystem.ReadAllText("C:\test.txt") ' Separate lines ImportedLines = Strings.Split(ImportedFile, Environment.NewLine) For i = 0 To …

Member Avatar for Teme64
0
317
Member Avatar for Beuki

Start recursing folders and files from current user's Start Menu[CODE=VB.NET] Dim StartMenu As String StartMenu = My.Computer.FileSystem.SpecialDirectories.Programs[/CODE]I don't have VB2003 so I didn't check if it works with that.

Member Avatar for Beuki
0
100
Member Avatar for infernojmd

[QUOTE]my code only opens the last part of the file it read[/QUOTE] Actually only the last line. [ICODE]RichTextBox.Text = fileString[/ICODE] replaces the content of the richtextbox each time you read the next line. You should append lines so the previous content is not lost [CODE=VB.NET]RichTextBox.AppendText(fileString)[/CODE] You could also check [ICODE]My.Computer.FileSystem.ReadAllText[/ICODE] …

Member Avatar for Teme64
0
105
Member Avatar for Nommy

[ICODE]Debug.Print(NfcCommOpen(Me.Handle), "1"))[/ICODE] passes a handle to form. The prototype is short NfcCommOpen(HANDLE *hCom, char *com_port) and parameters: - hCom-series handle - com_port, file name of series port IMO you should pass a "hCom-series handle" as the first parameter, not a handle to form. I guess the function tries to open …

Member Avatar for Teme64
0
321
Member Avatar for likewhoa

That's an error image i.e. some image can't be found. At least [ICODE]mybutton.Image = Image.FromFile("tripleword.jpg")[/ICODE] may not look for the image from the place you were thinking of. Also, you can't assign to picture box in itself, use Image property.

Member Avatar for Teme64
0
133
Member Avatar for tableray

[QUOTE]why isnt there a mouseclick event in the webbrowser method listbox?[/QUOTE]Because the mouse click is sent to the web page shown in the control. Just like you normally click the web pages in your browser. The explanation above is not totally correct, but I think it's good enough ;) I …

Member Avatar for Teme64
0
152
Member Avatar for aveao

Declare your variable in the class itself. It will be a class-level variable and every procedure in the class can access it unless you "hide" it with a procedure level variable. This is called the scope of the variable [CODE=VB.NET]Public Class Form1 Private q(5) As String ' This variable's scope …

Member Avatar for Teme64
0
265
Member Avatar for Nastadon

Since you're dealing with textual data, use string data type, not object. This is slightly modified code of yours [CODE=VB.NET]Dim s As String Dim myArr(64145) As String Dim i As Integer : i = 0 FileOpen(1, My.Application.Info.DirectoryPath & "\Words.txt", OpenMode.Input) Do While Not EOF(1) s = LineInput(1) myArr(i) = s …

Member Avatar for Teme64
0
99
Member Avatar for lukechris

[QUOTE]which removes the �PNG line[/QUOTE]You mean everything after </MenuItem> string? [CODE=VB.NET] Dim TempPos As Integer TempPos = TextBox1.Text.LastIndexOf("</MenuItem>", System.StringComparison.OrdinalIgnoreCase) ' Found? If TempPos >= 0 Then ' Remove the rest of the content TextBox1.Text = TextBox1.Text.Substring(0, TempPos + "</MenuItem>".Length) End If [/CODE]

Member Avatar for Teme64
0
135
Member Avatar for Kecy

With a little googling you should get (helpful) stuff [URL="http://www.google.com/search?q=fingerprint+biometrics"]http://www.google.com/search?q=fingerprint+biometrics[/URL] or [URL="http://www.google.com/search?q=fingerprint+biometrics+"source+code""]http://www.google.com/search?q=fingerprint+biometrics+"source+code"[/URL] You can also define your searches from the "Advanced Search" options. For example, search only domains .edu [URL="http://www.google.com/search?q=fingerprint+biometrics+"source+code"+site%3A.edu"]http://www.google.com/search?q=fingerprint+biometrics+"source+code"+site%3A.edu[/URL] And since this is a VB.NET forum, remember to add "VB.NET" to your searches :)

Member Avatar for Teme64
1
104
Member Avatar for Aeterna

I'm not familiar with that particular application but found this KB article from their site: [URL="http://www.hide-my-ip.com/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=10&nav=0"]Which programs can I hide my IP with?[/URL] [URL="http://vbdotnetforum.com/index.php?showtopic=503"]Use Proxy with Web Browser Control[/URL] shows how to use proxy with web browser control. I'm not sure if you can combine that information and make your …

Member Avatar for Teme64
0
147
Member Avatar for kn2790

I have some dejá vu feeling I've posted to this thread. See [URL="http://connectionstrings.com/"]The connection string reference[/URL] for Access connection string(s). You're connection string seems 'suspicios' and it doesn't point to any mdb file? IMO it should be something like [ICODE]"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;"[/ICODE] or [ICODE]"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=;"[/ICODE] without a password. …

Member Avatar for kn2790
0
145
Member Avatar for mps727

Actually you can make a COM component by setting from classes attributes "COM Class" to True. MSDN has an extensive article [URL="http://msdn.microsoft.com/en-us/library/ms973807.aspx"]Creating Components in .NET[/URL] which discusses also Out of Process components. And, of course, .NET provides threading and BackGroundWorker control. Finally, check if you could use .NET Remoting

Member Avatar for Teme64
0
105
Member Avatar for amorphis88

It could be done simply with VB.NET's Split method [CODE=VB.NET]Dim OneLine As String = "fristname.lastname@emailadress.com,,,,,,membergroup" Dim SplittedLine() As String ' Split the whole string SplittedLine = Strings.Split(OneLine, ",") ' Email address is now SplittedLine(0) and so on... ' Get first and last name Dim Temp() As String ' First remove …

Member Avatar for Teme64
0
100
Member Avatar for TheBrenda

Here you have [CODE=VB.NET] ' My test file! Dim myXMLFile As String = "D:\test.xml" Dim oStream As FileStream Dim XReader As Xml.XmlTextReader Dim XDoc As XPath.XPathDocument Dim XNav As XPath.XPathNavigator Dim XIter As XPath.XPathNodeIterator Dim TempStr As String oStream = New FileStream(myXMLFile, FileMode.Open) XReader = New Xml.XmlTextReader(oStream) XDoc = New …

Member Avatar for Teme64
0
338
Member Avatar for VIPER5646

[QUOTE]Hi I have an INSERT INTO SQL that keeps on retuning an Syntax error in Insert Into[/QUOTE] You get that error when you execute the SQL clause? What is the [B]exact[/B] error message that you get? You are inserting all five values as a text. Is CustmrID field also textual …

Member Avatar for VIPER5646
0
121
Member Avatar for Cardboard Box

[QUOTE]Does anyone know how to place sound in a vb.net project?[/QUOTE]If I take that literally, you're asking about embedding an audio resource? You do that from "Project" menu -> "<prjname> Properties" -> "Resources" tab, and there you select resource type (Audio) and the resource source (usually a file). Or do …

Member Avatar for nileshsarode06
0
99

The End.