Jump to content
Xtreme .Net Talk

Mike Bailey

Avatar/Signature
  • Posts

    60
  • Joined

  • Last visited

Everything posted by Mike Bailey

  1. One thing I think everyone has over looked. Because of the automation making things easer; more people are using computers. Due to that fact alone more people are using computers; there using them to learn things. Things they probable would have never tried to learn before. Our automated technology gives me more time to learn things like ---> what my kids are doing in School and who her friends are. My 4 year old can already add and subtract Thanks to the automation of computer programs. Just something to think about Mike Bailey
  2. Rant I have posted need for help on some pretty silly programs that no one would won�t to work on infact there would be no real world need for some of the programs I�ve asked for help on. You see programs like that are for learning and nothing else. That is what a forum is for after all don�t you think????????? So in conclusion if you don�t like the posts and aren�t willing to help others no matter how silly it might be maybe you should find a different forum. You see we ask the stupid questions in the forum and not at work.
  3. Now that I�m half way through my second semester at School I�m starting to write some decent code(or I think it is:-) I would like to start saving it for use in other projects. I have been saving it to word then copy and past when I need it. Theirs got to be a better way. How is everyone else handling this. I'm useing Visual Studio.Net 2003
  4. What exactly do you want to automate? If it is the complete presentation then you can use the timers.
  5. ??? What do you mean??? -->Get the icon in startup
  6. This is what I ended up with what do you think This is what I ended up with what do you think?? It works fine. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim newstring As String Dim backstring As String Dim temp As String Dim mystringlenght As Integer Dim x As Integer temp = TextBox1.Text.ToUpper.Replace(" ", "") mystringlenght = TextBox1.TextLength For x = mystringlenght To 1 Step -1 backstring = Mid(temp, x, 1) newstring = newstring & backstring Next If newstring = temp Then MsgBox("YaHooo") Else MsgBox("BooHooo") End If End Sub End Class
  7. Thanks Thanks for the great reply worked great.
  8. I�m trying to create a program that will reverse a string like->(ABC -->= CBA) But if there are any spaces in the string I need them removed. It would look like this -->(A B C --> = CBA) In my code I have handled reversing the string and converting it to all upper case. But for the life of me I can�t seem to remember how to remove the spaces. The purpose of this whole stupid thing is to see if a string is the same word or sentence backwards as it is forwards. I think it�s called a Paladrom Can anyone help????????? Dim mystring As String Dim newstring As String Dim backstring As String Dim mystringlenght As Integer Dim x As Integer TextBox1.Text = TextBox1.Text.ToUpper mystringlenght = TextBox1.TextLength For x = 1 To mystringlenght mystring = Mid(TextBox1.Text, x, 1) newstring = newstring & mystring Next For x = mystringlenght To 1 Step -1 mystring = Mid(TextBox1.Text, x, 1) backstring = backstring & mystring Next If backstring = TextBox1.Text Then MsgBox("YaHooo") Else MsgBox("BooHooo") End If
  9. Thanks for the reply. I tried to recreate a program I found that was written in VB6 it converts numbers to words like 1= one and so on but as you can see I wasn�t very successful. Would anyone like to help?????????????
  10. Public Class Form1 Inherits System.Windows.Forms.Form Dim BigOnes(9) As String Dim SmallOnes(19) As String Dim Dollars As String Dim Cents As String Dim Words As String Dim Chunk As String Dim Digits As Short Dim LeftDigit As Short Dim RightDigit As Short #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents txtAmount As System.Windows.Forms.TextBox Friend WithEvents txtWrite As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1)) Me.Label1 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Button1 = New System.Windows.Forms.Button Me.txtAmount = New System.Windows.Forms.TextBox Me.txtWrite = New System.Windows.Forms.TextBox Me.Label3 = New System.Windows.Forms.Label Me.Label4 = New System.Windows.Forms.Label Me.SuspendLayout() ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.Transparent Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.Location = New System.Drawing.Point(8, 8) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(96, 48) Me.Label1.TabIndex = 0 Me.Label1.Text = "Michael S. Bailey 1825 NE. 3rd Renton WA, 89056" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.Transparent Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Red Me.Label2.Location = New System.Drawing.Point(376, 0) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(88, 24) Me.Label2.TabIndex = 1 Me.Label2.Text = "38069" Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter ' 'Button1 ' Me.Button1.Location = New System.Drawing.Point(16, 152) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(96, 24) Me.Button1.TabIndex = 2 Me.Button1.Text = "Button1" ' 'txtAmount ' Me.txtAmount.Location = New System.Drawing.Point(360, 56) Me.txtAmount.Name = "txtAmount" Me.txtAmount.Size = New System.Drawing.Size(80, 20) Me.txtAmount.TabIndex = 3 Me.txtAmount.Text = "" ' 'txtWrite ' Me.txtWrite.BackColor = System.Drawing.Color.PaleGreen Me.txtWrite.Location = New System.Drawing.Point(24, 96) Me.txtWrite.Name = "txtWrite" Me.txtWrite.ReadOnly = True Me.txtWrite.Size = New System.Drawing.Size(424, 20) Me.txtWrite.TabIndex = 4 Me.txtWrite.Text = "" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.Transparent Me.Label3.Font = New System.Drawing.Font("Monotype Corsiva", 15.75!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.Location = New System.Drawing.Point(288, 160) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(160, 24) Me.Label3.TabIndex = 5 Me.Label3.Text = "Michael S. Bailey" Me.Label3.TextAlign = System.Drawing.ContentAlignment.BottomCenter Me.Label3.Visible = False ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.Transparent Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.Location = New System.Drawing.Point(288, 56) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(64, 24) Me.Label4.TabIndex = 6 Me.Label4.Text = "Amount" Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.SystemColors.ActiveBorder Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image) Me.ClientSize = New System.Drawing.Size(456, 189) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.txtWrite) Me.Controls.Add(Me.txtAmount) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.MaximumSize = New System.Drawing.Size(464, 216) Me.MinimumSize = New System.Drawing.Size(464, 216) Me.Name = "Form1" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Bank of America" Me.ResumeLayout(False) End Sub #End Region Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Public Sub ParseChunk() Digits = CShort(Mid(Chunk, 1, 1)) If Digits > 0 Then Words = Words & " " & SmallOnes(Digits) & " Hundred" End If Digits = CShort(Mid(Chunk, 2, 2)) If Digits > 19 Then LeftDigit = CShort(Mid(Chunk, 2, 1)) RightDigit = CShort(Mid(Chunk, 3, 1)) Words = Words & " " & BigOnes(LeftDigit) If RightDigit > 0 Then Words = Words & " " & SmallOnes(RightDigit) End If Else If Digits > 0 Then Words = Words & " " & SmallOnes(Digits) End If End If End Sub Private Sub form1_load() BigOnes(1) = "Ten" BigOnes(2) = "Twenty" BigOnes(3) = "Thirty" BigOnes(4) = "Forty" BigOnes(5) = "Fifty" BigOnes(6) = "Sixty" BigOnes(7) = "Seventy" BigOnes(8) = "Eighty" BigOnes(9) = "Ninety" SmallOnes(1) = "One" SmallOnes(2) = "Two" SmallOnes(3) = "Three" SmallOnes(4) = "Four" SmallOnes(5) = "Five" SmallOnes(6) = "Six" SmallOnes(7) = "Seven" SmallOnes(8) = "Eight" SmallOnes(9) = "Nine" SmallOnes(10) = "Ten" SmallOnes(11) = "Eleven" SmallOnes(12) = "Twelve" SmallOnes(13) = "Thirteen" SmallOnes(14) = "Fourteen" SmallOnes(15) = "Fifteen" SmallOnes(16) = "Sixteen" SmallOnes(17) = "Seventeen" SmallOnes(18) = "Eighteen" SmallOnes(19) = "Nineteen" txtAmount.Text = Format(txtAmount.Text, "000000.00") Dollars = Left(txtAmount.Text, 6) Cents = Right(txtAmount.Text, 2) Words = "" 'check to make sure incoming number is not too large If Dollars > 999999 Then txtAmount.Text = "Dollar amount is too large" Exit Sub End If 'separate the dollars into chunks If Dollars = 0 Then Words = "Zero" Else 'first do the thousands 'I get error on chunk and left-----> Chunk = Left(Dollars, 3) If CDbl Chunk > 0 Then 'And here----> ParseChunk() Words = Words & " Thousand" End If 'do the rest of the dollars Chunk = Right(Dollars, 3) If CDbl Chunk > 0 Then ParseChunk() End If End If 'concatenate the cents and display If Cents = 0 Then Cents = "No" Words = Words & " and " & Cents & "/100" txtWrite.Text = Words Exit Sub ParseChunk: Digits = Mid(Chunk, 1, 1) If Digits > 0 Then Words = Words & " " & SmallOnes(Digits) & " Hundred" End If Digits = Mid(Chunk, 2, 2) If Digits > 19 Then LeftDigit = Mid(Chunk, 2, 1) RightDigit = Mid(Chunk, 3, 1) Words = Words & " " & BigOnes(LeftDigit) If RightDigit > 0 Then Words = Words & " " & SmallOnes(RightDigit) End If Else If Digits > 0 Then Words = Words & " " & SmallOnes(Digits) End If End If Return Label3.Visible = True End Sub End Class
  11. Now I'm getting this The messeage comes when it runs the last line of code Hers my code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim objEmailMessage As System.Web.Mail.MailMessage Dim objSMTPServer As System.Web.Mail.SmtpMail objEmailMessage = New System.Web.Mail.MailMessage With objEmailMessage .To = txtToEmail.Text .From = txtFrom.Text .Subject = "Great Job!" .Body = "Want all my money?" End With [color=red] objSMTPServer.Send(objEmailMessage)[/color] End Sub End Class When the code that is in red is ran I get this error An unhandled exception of type 'System.Web.HttpException' occurred in system.web.dll Additional information: Could not access 'CDO.Message' object.
  12. no and I will be puting this program on another machine so I really need to be abel to specafy the smtp server. I really need to beable to use a smtp sever like comcast (smtp.comcast.net) This project is for the Museum of Flight In Seattle what it�s going to do is take a picture of the user ( With a webcam) and email that to anyone the user specifies. I t will work a lot like the one at the Microsoft Museum if you have ever seen that one. I probably could have just got that one but then I wouldn�t have learned anything and that is what this is all about. I�m not making any money just a project for School. Thanks for any additional halp
  13. Thanks everyone for all the help I have worked on this and everything is working fine I will need to modify the code provided by (samsmithnz) (Tanks by the way) But it seems to work just like it is. When I run it I see my outgoing email scanner go off but I never receive an email I changed the code to my email address but still get nothing. The only thing I can think of is that I have specified an SMTP server. Can anyone help???
  14. Yep tryed it and it works THANKS ALOT. In the code above I dont see a way to add a smtp server. Is it useing seting already on the computer or what?
  15. Yes this is a Windows App but I don't understand what adding a ref to SustmeWeb.dll means
  16. Thank you very much but what do you mean by. (First you'll want to add a reference to system.web.mail.)
  17. I�m a student studding the DOT Net framework we are currently working in V.B. I would like to build a program that will send an email with an attachment (like a picture) can anyone get me started in the right direction. I don�t know if you can send email directly from a V.B program or if I must link to Outlook? Can someone tell me where to find the commands and the Syntax. Thanks for any help
  18. A bite is one bite of information like a letter or number. A Byte is 8 bits
  19. Personally I find the M.S.D.N. hard to understand a lot of the time. Maybe I�m still to much of a newbie????????
  20. How do you use the format function to format a decimal number so that you just get one number after the decimal.
  21. Recently a Microsoft speaker came to my school to talk about programming. She talked about a lot of things but the thing that stuck out the most was when she started talking about planning a project. She told us that one of the biggest problems they have at Microsoft is planning. She told us that most of the programmers at Microsoft would just jump in to writing the program with out much planning. So now one of my instructors is having us do Flow charts for every project we do (I hate floew charts)any way at home I use Visio but at school we don�t have Visio so I use Word. I would just like to know what everyone else uses?
  22. I found this that solved my problem. http://www.codeproject.com/managedcpp/dotnetsetup.asp#xx534351xx
  23. I would like to add I think VB is easer to learn then C#.. I�m currently studding both in School and find VD much easer.
  24. I would like to build a few programs in .Net but for anyone else to be able to run the programs they must have the .NET framework installed on there computer. Is there a way to put this in to my setup file? What is every one else doing about this?
  25. Click Click Click Thank you for the great reply. The light just came on; thanks for the help. That is what i love about this site. In 2 years I hope to return what i have goten here to someone:D :D :D :D :D
×
×
  • Create New...