poguemahone 2 Light Poster

job

poguemahone 2 Light Poster

Step #1. Go to local job service.
Step #2 Apply for a non-programming job.
Step #3 Get non-programming jojb.

Problem solved.

poguemahone 2 Light Poster

Do you still need help with this?

poguemahone 2 Light Poster

Step #1. Go to local job service.
Step #2 Apply for any job that does not involve programming.

Problem solved.

poguemahone 2 Light Poster

Your posting couldn't be more vague. I am guessing that English is your second language. No problem, just ask someone who is fluent (In English) to write down your question for you and then post it here.

poguemahone 2 Light Poster

You could start off by using the System.IO namespace of the .NET Framework. What is the purpose of storing all that info in textbox? You could store some sort of a unique identifier as the value of the textbox and then when a user selects something from the textbox, showw the details of the drive[object] that they selected.

poguemahone 2 Light Poster

Have plane......will fly....

poguemahone 2 Light Poster
poguemahone 2 Light Poster

Do you mean XP-Visual Styles?

poguemahone 2 Light Poster

You cannot possibly learn all you need to know from some examples. Go to classes, or some other schooling. The fact that people don't take programming seriously is why we have so much bloat and crapware out there. Please, for the good of mankind, educate yourself with something other than the internet!

poguemahone 2 Light Poster

Check this out. If it does not help, let the forum know.

http://msdn.microsoft.com/en-us/library/ms178139.aspx

poguemahone 2 Light Poster

I would like to know what your program is considering you have no idea what the .NET Framework is.

poguemahone 2 Light Poster

In the Select Case, change str1stCharacter to str1stCharacter.ToUpper.

Select Case str1stCharacter.ToUpper()

poguemahone 2 Light Poster

Try this:
<code>
Dim strInput As String = ""
Dim str1stCharacter As String = ""
Dim strOutput As String = ""
Dim intStringLength As Integer = 0

strInput = Me.xEnterText.Text

str1stCharacter = Microsoft.VisualBasic.Left(strInput, 1)
Select Case str1stCharacter
Case "A", "E", "I", "O", "U", "Y", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
strOutput = strInput & "-WAY"
Case Else
intStringLength = Len(strInput)
strOutput = Microsoft.VisualBasic.Right(strInput, 3) _
& "-" & Microsoft.VisualBasic.Left(strInput, 2) & "AY"
End Select
Me.xAnswerLabel.Text = "The Pig Latin Translation of " & strInput & " is " & strOutput & "."
Exit Sub
</code>

Good Luck!

poguemahone 2 Light Poster

Sorry, my first one was incomplete.

Try using the RichTextBox_SelectionChanged Event.
Inside of the event handler test the SelectionLength property of the RichTextBox like this:

If RichTextBox.SelectionLength > 0 Then
            MenuStripItems.Visible = True
        else
             MenuStripItems.Visible = False
        End If
poguemahone 2 Light Poster

Try using the RichTextBox_SelectionChanged Event.
Inside of the event handler test the SelectionLength property of the RichTextBox like this:

    If RichTextBox.SelectionLength > 0 Then
            MenuStripItems.Visible
    else

    End If
poguemahone 2 Light Poster

Try:

SELECT COUNT(*) FROM Producao WHERE ProdUserID=UtilizadorID.

This will give the number of rows that meet this criteria.

poguemahone 2 Light Poster

Try these:

RichTextBox.SelectionFont = New Font("Tahoma", 12, FontStyle.Underline)
RichTextBox.SelectionFont = New Font("Tahoma", 12, FontStyle.Bold)
RichTextBox.SelectionFont = New Font("Tahoma", 12, FontStyle.Italic)

Then add the text to the RichTextBox Control.

ITKnight commented: Very Helpfull +1
Naruse commented: Help me too +1
poguemahone 2 Light Poster

The Delegate Sub can be put anywhere within the Class declaration, but not within another Sub or Function.

The name of the EventHandler Function should replace ThisFunction. In other words,
the name of the function that is being called when the Event is being raised.

The remainder of the code would go into the beginning of the EventHandler function like this:

Public Sub EventHandler()
'Test to see if the correct thread is being used. If not, InvokeRequired will be true.

  If Me.lblFilename1.InvokeRequired Then
            'If InvokeRequired = True then this function will be re-called from the UI Thread.
            Dim d As New LengthyProcessCallback(AddressOf ThisFunction)
            Me.Invoke(d)
        Else
         [I]Place your code here from the EventHandler Function[/I]  
End If
End Sub
chris_dev2 commented: Thanks! This worked :) +0
poguemahone 2 Light Poster

Ok,
What you want to do is create a Delegate Sub like this:

Delegate Sub LengthyProcessCallback()

In the beginning of the code for the event handler function add this:

'Test to see if the correct thread is being used. If not, InvokeRequired will be true.

  If Me.lblFilename1.InvokeRequired Then
            'If InvokeRequired = True then this function will be re-called from the UI Thread.
            Dim d As New LengthyProcessCallback(AddressOf [I]ThisFunction[/I])
            Me.Invoke(d)
        Else
            [I]Continue normal processing[/I]
        End If

I hope this makes more sense to you in the context of your app.

poguemahone 2 Light Poster

Apparently, I have given you bad advice. The solution I presented appears to no longer be supported. The following is a comprehensive view of updating a UI from another thread and also using the background worker. This is an actual program that demonstrates the concepts. You can start a new Windows Application Project and paste the code in the code-behind of Form1. If you get build errors, delete the code from the Form1.Designer.vb file.

Imports System
Imports System.ComponentModel
Imports System.Threading
Imports System.Windows.Forms

Public Class Form1
   Inherits Form

   ' This delegate enables asynchronous calls for setting
   ' the text property on a TextBox control.
   Delegate Sub SetTextCallback([text] As String)

   ' This thread is used to demonstrate both thread-safe and
   ' unsafe ways to call a Windows Forms control.
   Private demoThread As Thread = Nothing

   ' This BackgroundWorker is used to demonstrate the 
   ' preferred way of performing asynchronous operations.
   Private WithEvents backgroundWorker1 As BackgroundWorker

   Private textBox1 As TextBox
   Private WithEvents setTextUnsafeBtn As Button
   Private WithEvents setTextSafeBtn As Button
   Private WithEvents setTextBackgroundWorkerBtn As Button

   Private components As System.ComponentModel.IContainer = Nothing


   Public Sub New()
      InitializeComponent()
    End Sub


   Protected Overrides Sub Dispose(disposing As Boolean)
      If disposing AndAlso (components IsNot Nothing) Then
         components.Dispose()
      End If
      MyBase.Dispose(disposing)
    End Sub


   ' This event handler creates a thread that calls a 
   ' Windows Forms control in an unsafe way.
    Private Sub setTextUnsafeBtn_Click( _
    ByVal sender As Object, _
    ByVal e As EventArgs) Handles setTextUnsafeBtn.Click

        Me.demoThread = New Thread( _
        New ThreadStart(AddressOf Me.ThreadProcUnsafe))

        Me.demoThread.Start()
    End Sub …
poguemahone 2 Light Poster

That means that the thread that you started for the "lengthy process" is the thread that is trying to update the UI. Could you post the code from the button_click event?

poguemahone 2 Light Poster

In the code of your UI try using
AddHandler objFileIOClass.Event, AddressOf UIClass.Function
where FileIOClass.Event is the Event Raised from the FileIOClass and UIClass.Function is the Address of the function you want to execute in the UI when the Event is raised. It should look something like this:

Dim objFileIOClass as New FileIOClass

AddHandler objFileIOClass .Event, AddressOf UIClass.Function

Dim FileIOThread = New Threading.Thread(AddressOf FileIOClass.BeginOperation)

FileIOThread.Start()

chris_dev2 commented: Thank you! Yes been a few years yet helped me with a multi-threading task :) +0
poguemahone 2 Light Poster

Try the SerialPort Class.

.NET 2.0, 3.0, 3.5
Namespace: System.IO.Ports
Assembly: System (in system.dll)

poguemahone 2 Light Poster

You could start the file IO in a separate class from the UI and use Thread.Start(). In your file IO class, you can raise an event after each operation (or whatever interval you choose) and have it call back to the UI to perform updates.