|
i did it it is working now!!! ahhhhhhhhh finally...
don't laugh:
i was using port 8088 before, for my older application
so probably two applications was killing each other...
well thank you anyway...
now my other problem to solve is static ip, i have no money to pay for it i will do some HTTP requests to read ip and then connect to given ip...
|
|
|
|
|
Hi All,
Actually i am trying to send attachments by using System.Net.Mail.SmtpClient.Sometimes the Timeout error is generate.
So please suggest me what is best timeout intervel for sending 10 mb data.
Thanks in advanced
If you can think then I Can.
|
|
|
|
|
There is no "best timeout". Since the users connection speed can vary greatly, any timeout you can come up with would be pointless if the users connection slows down.
|
|
|
|
|
Hi,
You need a variable timeout.
I would experiment sending mail manually with different attachment sizes, and note the times it takes (say for 1MB and 100MB).
Then I would set up a linear timeout, with a minimum and a safety factor, say
3*(t1MB + t100MB * actualTotalSize/100MB) .
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi Guys, just loaded vb 2005 onto my PC to start a project for a local club.
Basically they wish to record times that a competitor crosses the line. Each competitor will have enough time in between them to allow the user to enter competitor number.
I have created a text box for the user to enter rider number, a timer that updates with current system time, and when user clicks button it records the rider number and time the button was clicked. Nice and simple.
But, whats the best way to allow this for 100 competitors, for the programme to record each one on a separate line.
The data will also need saving, but Im not that far yet so really just looking for guidence on where to go from just 1 single input to infinte inputs.
Many thanks in advance
|
|
|
|
|
Probably a little overkill, but I would put the button, timer, textbox into a custom control which derives from Panel. Then I would loop from zero to the number of required inputs, adding an instance of this control to a FlowLayoutPanel each time you increment. That saves you the trouble of having to muck about with locations, sizes, etcetera. The other advantage is that when you use a custom control, you only have to make a change to the code in that control, and have that change almost instantly apply to the instances you add to the FlowLayoutPanel
|
|
|
|
|
The logistics seem a little off to me. Sounds like the logging of the record is going to become part of the competition. 100 competitors crowded around a limited number of computers waiting to finish sounds, well, wrong.
Think about using barcode or RFID scanners, these achieve the sames as typing the details but faster.
You are right, you are going to need a database to store the data, use SQL express or Access (under duress). There are plenty of examples of data access here on CP.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i suggest using vb2008 instead of vb2005
as vb2008 is much better allowing better
control and many other things
TheMrProgrammer
|
|
|
|
|
Reply to the OP - I use C#
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Depends on what you're used to..
Motivation is the key to software development.
|
|
|
|
|
Wow. Those were really useful posts... Way to help out. BTW: VB.NET can do ANYTHING that C# can do. Anything.
The easiest way to do what you want is with a collection. I would also get rid of the timer and just use Now.timeOfDay to get the current time. Heres an example:
The example below needs the following controls on it's form:
Control Name
=================================
TextBox txtID
Button btnAdd
Button btnSave
ListBox lstResults
=================================
'Begin Code:
'============================================================================================================
Option Explicit On
Option Strict On
Public Class Form1
'Create a new structure to make saving our data easy.
Private Structure Competitor
Dim ID As String
Dim FinishTime As DateTime
End Structure
'Create a collection to hold all of the competitors.
'I like using collections instead of arrays because
'they're easy to resize
Dim myCompetitors As New Collection
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
'Create a competitor variable to temporarily hold the
'competitor we are adding.
Dim currentCompetitor As New Competitor
'Set their ID to the the text of the textbox
currentCompetitor.ID = txtID.Text
'Set the finish time to the current date/time
currentCompetitor.FinishTime = Now
'Add the competitor to the collection
myCompetitors.Add(currentCompetitor)
'Update the list of competitors/times
UpdateResults()
'Reset the textbox and give it focus
'so we don't have to click on anything
'to enter the next competitor.
txtID.Text = ""
txtID.Focus()
End Sub
Private Sub UpdateResults()
'This sub updates the listbox with all of
'the competitors in the collection.
'Clear the contents of the listbox
lstResults.Items.Clear()
'Loop through the collection, adding the competitors information
'to the listbox.
For Each currentCompetitor As Competitor In myCompetitors
'add the competitor's ID followed by the date and time of their finish.
'if you want to show just their time, you would
'change currentCompetitor.FinishTime.ToString to currentCompetitor.FinishTime.timeOfDay.ToString
lstResults.Items.Add("ID: " & currentCompetitor.ID.ToString & " Finish Time: " & currentCompetitor.FinishTime.ToString)
Next
End Sub
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
'Create a new SaveFileDialog to ask the user where to save the file.
'You could also create a String variable if you want to hard-code the
'location of the file.
Dim myFile As New SaveFileDialog
'Create a DialogResult to tell us which button on the SaveFileDialog they clicked.
Dim fileResult As DialogResult
'Set the SaveFileDialog to save the file as a .txt file.
myFile.Filter = "[*.txt] Text File|*.txt"
'Show the dialog and set the fileResult to the button they click
fileResult = myFile.ShowDialog
'If they clicked on the OK button, then...
If fileResult = Windows.Forms.DialogResult.OK Then
'...save the file!
FileOpen(1, myFile.FileName, OpenMode.Output)
'loop through the collection, saving a new line to the file
'as we go:
For Each currentCompetitor As Competitor In myCompetitors
PrintLine(1, "ID: " & currentCompetitor.ID.ToString & " Finish Time: " & currentCompetitor.FinishTime.ToString)
Next
'We're done saving, so close the file!
FileClose(1)
End If
End Sub
End Class
'===========================================================================================================
'End Code
I hope that's what you're looking for.
-Ray
|
|
|
|
|
How can I get a Kerberos ticket in VB.NET?
|
|
|
|
|
You're going to have to explain what you're doing, or trying to do with this. Your question, as it stands, covers a lot of ground and can't be answered in a single forum post.
|
|
|
|
|
Ask nicely. Seriously though, look up this link for documentation and these search results
|
|
|
|
|
Hello all,
I'm using Outlook 2000 and I'm trying to access data held on a customised Outlook task form held in a public folder.
I'm using the following code to get at what I need, and can see certain values via objTask, but I can't see where I get at other 'fields' used on the form. One of the fields, for example, is called "CC Ref", but I can't find where I can get at it.
Dim objOutlook As Outlook._Application
objOutlook = New Outlook.Application()
Dim objNS As Outlook._NameSpace = objOutlook.Session
Dim oAllPublicFolders As Outlook.MAPIFolder
Dim oPublicFolders As Outlook.MAPIFolder
Dim objCodeChangeRequests As Outlook.MAPIFolder
oPublicFolders = objNS.Folders.Item("Public Folders")
oAllPublicFolders = oPublicFolders.Folders.Item("All Public Folders")
objCodeChangeRequests = oAllPublicFolders.Folders.Item("Code Change Requests")
Dim objItems As Outlook.Items = objCodeChangeRequests.Items
Dim objTask As Outlook._TaskItem
objTask = objItems.GetFirst
Thanks in advance!
|
|
|
|
|
Found it ...
Dim objUP As Outlook.UserProperty
objUP = objTask.UserProperties.Item("CC Ref")
|
|
|
|
|
I am receiving this error at Runtime:
Retrieving the COM class factory for component with CLSID {FDD4C8C1-69C9-11D3-9DC8-525400E38CF9} failed due to the following error: 80040154.
What is the problem?
Thank you in advance.
Thayhor
|
|
|
|
|
Did you even try and research[^] this issues before posting!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi all...
I want to scan an image and then search that image in a lots of image stored in database.
I want to know that how to compare two images and verify that both are same images or both are same images of a single person.
Suggest me how can I do this.
Thanks.
Gagan
|
|
|
|
|
Presumably you would read the image in as a binary blob. Then look for a facial recognition algorithm. If you're looking for a match of an entire person, then shape recognition might be useful to you as well
|
|
|
|
|
Thanks for your quick response.
But I have still some confusions. I don't know how to read image in as a binary blob.
So give me any example or tell me logic to read image in as a binary blob.
Thanks.
Gagan
|
|
|
|
|
Gagan.20 wrote: I don't know how to read image in as a binary blob.
Then the odds of you doing the rest of this task, are pretty damn close to zero.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
CG be generous, give him a link to one of your articles, you seem to have done and published a lot of work on graphics.
I was actually waiting for you to dip into this request given your predilection for graphics.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Adn this is the easy part! Google for "save image to database" and you'll find the technique documented thousands of time.
The rest of your requirements are university-grade research projects. You won't find much in the way of sample code to do those.
|
|
|
|
|
Hi to All,
sorry to say this is a cross post......But I have put here....coz may be there could be way in vb.net to do so...
I know my subject doesn't say much...All i need to know...is there any method so that the primary key of a table maintains its value after deletion of records.
Eg: if the table has primary key from 1-10. Now if I delete the row 1....primary key starts from 2-10....next time I insert a new record, it shoul generate the primary key as 1.
I am using VB.NET2005 with Ms acceess2007
Is there any function/way to do this....
Thanks in advance
-----------------------------
I am a beginner
|
|
|
|