Luc001 77 Posting Whiz

Found a solution.
Here is my code:

   If e.ColumnIndex = 5 AndAlso Len(e.Value) > 0 Then

            e.CellStyle.BackColor = Color.FromArgb(235, 255, 238)
            e.CellStyle.ForeColor = Color.FromArgb(0, 100, 50)
            e.CellStyle.Font = New Font("Adobe Caslon Pro", 12, FontStyle.Italic)

        ElseIf e.ColumnIndex = 5 AndAlso Len(e.Value) <= 0 Then

            e.CellStyle.BackColor = Color.FromArgb(175, 255, 255)

        End If

Thanks for helping.

Luc001 77 Posting Whiz

rproffitt that is not what I meant.
The code about te Forecolor is working great. The text is coloring Darkgreen.
What I want is, if there is no text inside a cell in the same column the background color of those cells will be Red.

Luc001 77 Posting Whiz

Like the title says, I'm trying to coloring an empty cell in bounded datagridview.
I've got this code to coloring a cell with specitic value and is working well.
This code is in the DatagridviewCellFormattingEventargs.

If e.ColumnIndex = 5 AndAlso e.Value <= Date.Now.ToShortDateString Then
              e.CellStyle.ForeColor = Color.DarkGreen
              e.CellStyle.Font = New Font("Adobe Caslon Pro", 11, FontStyle.Bold)
End If

How can I change this code that in the same column and the cell is empty the backgroundcolor becomes red?

Thanks in advance.

Luc001 77 Posting Whiz

Hi,

You can add a Column to your Datagridview and then select a DatagridviewImageColumn.
In the properties go to Appearance and add an Image

Luc001 77 Posting Whiz

Double post.

Luc001 77 Posting Whiz

Hi,

You can try this;

TabControl1.TabPages.Item("TabPage2")
Luc001 77 Posting Whiz

Hi,

Please create a new dicussion instead to have more luck, because this discussion is 3 years old and Solved.
Thanks in advance!

Luc001 77 Posting Whiz

Hi,

You can try something like this:

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
    TextBox1.Text = ComboBox1.SelectedItem
End Sub
Luc001 77 Posting Whiz

Hi,

Remove this part:

 ' Fail validation (prevent them from leaving the cell)
e.Cancel = True
Luc001 77 Posting Whiz

Hi,

You need to declare your tabpage as the new one, give this page a name and add that new tabpage to the Tabpagecontrol.
Add this code to the Listview selectedindexchange event.

Try this and show us your codes.

Luc001 77 Posting Whiz

Hi,

You can find a tutorial, Here
Please try some coding and when you still have some trouble we'll glad to help.

Luc001 77 Posting Whiz

Hi,

You can find some information, Here, with example codes

Luc001 77 Posting Whiz

Hi,

This thread is already 2 years old.
Please start another one and we'll glad to help you with your problem.
Thanks in advance.

Luc001 77 Posting Whiz

Hi,

I don't know which VB.Net version you're uusing, but there is a Chart Control provided.
You can find some information, Here

Luc001 77 Posting Whiz

Hi,

Try this:

 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ComboBox1.Items.Add("")
        ComboBox1.Items.Add("1")
    End Sub

    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        If Not TextBox1.Text <> "" Then
            ComboBox1.Enabled = True
        Else
            ComboBox1.Enabled = False
        End If
    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
        If Not ComboBox1.SelectedIndex <> 1 Then
            TextBox1.Enabled = False
        Else
            TextBox1.Enabled = True
        End If
    End Sub
Luc001 77 Posting Whiz

Hi,

There are basically two ways to start application when Windows starts. First and maybe the easiest way is to copy a shortcut to your application in Startup folder. Second way is to start up VB.NET application from the Windows registry.
Some installer applications can do this for you. But if you want to give users the option not to start application when Windows starts, you have to deal application starting programmatically.
A few words of warning. Always be careful when changing registry with your application. So backup your registry first or otherwise make sure that you can restore your system if something goes wrong.

Luc001 77 Posting Whiz

Hi,

You can find an example about Removehandler, Here

Luc001 77 Posting Whiz

Hi,

Because I doesn't use Zedgraph found this.
I hope it helps you,

Luc001 77 Posting Whiz

Hi,

Can you show us you're code?

Luc001 77 Posting Whiz

Hi,

No problem glad to help!

Luc001 77 Posting Whiz

Hi,

Add this:

'add control to form
Controls.Add(NT)
Luc001 77 Posting Whiz

Hi,

You try Here to find more explanation how to solve your problem.

Luc001 77 Posting Whiz

Hi,

I think you can try this:

 ' Display items in the ListView control
For Each row As DataRow In dtable.Rows
    listView1.Items.Add(New ListViewItem(New String() {row("Firstname").ToString(), row("Lastname").ToString()}))
Next
Luc001 77 Posting Whiz

Hi,

Perhaps you can find some more information,Here

Luc001 77 Posting Whiz

Hi,

After a little search via uncle Google found some information about Microsoft POS, Here

Hope it helps,

Luc001 77 Posting Whiz

Hi,

I think that you need to add EZTwain to your project using Project - add item: Go to the EZTwain toolkit folder (usually \Program Files\EZTwain), go to the sub-folder for your language: VB.NET, add the declaration file you find there.

Luc001 77 Posting Whiz

Hi,

Here's another way of doing it with the Textbox_Textchanged event:

   Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
    Button1.PerformClick()
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If Me.TextBox1.Text <> "" Then
        For Each ch As Char In Me.TextBox1.Text
            TextBox2.Text = CStr(Asc(ch))
        Next
    End If

End Sub
Luc001 77 Posting Whiz

Hi,

Perhaps you can find some information, Here

Luc001 77 Posting Whiz

Hi,

Use:

Buttonname.PerformClick()
Luc001 77 Posting Whiz

Hi,

This thread is already several years old and you should have started a new one.
However, add a label, Timer and some other controls and it shoud work:

Public Class Form1
    Public Declare Auto Function GetCursorPos Lib "User32.dll" (ByRef lpPoint As Point) As Integer

    Dim mousepos As Point
    ' This stores the cordinates of the mouse cursors location
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Timer1.Enabled = True
        Timer1.Start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim R As Long = GetCursorPos(mousepos) ' You'll get your location in mousepos
        Label1.Text = "Mouse Cursor Location : " & mousepos.X & "x" & mousepos.Y

    End Sub
End Class
Luc001 77 Posting Whiz

Hi,

You can find a Step by Step creating a Setup and Deployment, Here
On page2 you can find a way how to add folders, files you wish to instal on the users PC.

Kind regards,
Luc

Luc001 77 Posting Whiz

Hi nashy,

Glad to help.
You could mark your thread as "Solved" with the link below the last post.

Luc001 77 Posting Whiz

Hi,

Here are other ways of doing it with Keychar or CharacterCasing:

  Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    TextBox2.CharacterCasing = CharacterCasing.Upper 'already by formload can you set te Char in a Textbox toUpper
End Sub

Private Sub TextBox1_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        If Char.IsLower(e.KeyChar) Then

            e.Handled = True

            SendKeys.Send(Char.ToUpper(e.KeyChar))

        End If
    End Sub

Hope it helps,

Begginnerdev commented: Correct! +8
Luc001 77 Posting Whiz

Hi,

There isn't a property for that, but you can use this in the Form load event:

 TabControl1.Dock = DockStyle.Fill
Luc001 77 Posting Whiz

Hi,

You can try this:

 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        DateTimePicker1.Format = DateTimePickerFormat.Time

    End Sub

    Private Sub DateTimePicker1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles DateTimePicker1.KeyDown
        If e.KeyValue = 38 Then ' Arrowkey Up
            ' up
            DateTimePicker1.Value = DateTimePicker1.Value.AddMinutes(30)
            e.SuppressKeyPress = True
        ElseIf e.KeyValue = 40 Then ' ArrowKey Down
            'down
            DateTimePicker1.Value = DateTimePicker1.Value.AddMinutes(-30)
            e.SuppressKeyPress = True
        End If
    End Sub

Change Minutes with the Arrowkeys Up and Down.

Luc001 77 Posting Whiz

Hi,
Try this:

txbStateTaxPcnt.Text = stateSlsTax.ToString("#,0.00")
Luc001 77 Posting Whiz

Hi Eternal Newbie,

He has already set the Form windowstate Maximum.

Luc001 77 Posting Whiz

Hi,

You can find an example, Here

Luc001 77 Posting Whiz

Hi,

You can try this;

  Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
    Const SWP_HIDEWINDOW = &H80
    Const SWP_SHOWWINDOW = &H40
    Dim taskBar As Integer

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Button1.Text = "Hide" Then
            Debug.Write(SetWindowPos(taskBar, 0&, 0&, 0&, 0&, 0&, SWP_HIDEWINDOW))
            Button1.Text = "Show"
        Else
            Debug.Write(SetWindowPos(taskBar, 0&, 0&, 0&, 0&, 0&, SWP_SHOWWINDOW))
            Button1.Text = "Hide"
        End If
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        taskBar = FindWindow("Shell_traywnd", "")
    End Sub
Luc001 77 Posting Whiz

Hi,
No, only the one who has the focus and you want to write numbers in that textbox.
You can show numbers in the textboxes but not write numbers in them.
Try this example;

 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        TextBox2.Text = "555-666-777"
    End Sub

    Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown, TextBox2.KeyDown, TextBox3.KeyDown, TextBox4.KeyDown, TextBox5.KeyDown
        Select Case e.KeyValue
            Case Keys.A To Keys.Z
            Case Keys.Space
            Case Keys.Left, Keys.Right, Keys.Back
            Case Else : e.SuppressKeyPress = True
        End Select
    End Sub

After debugging this example you'll see the text: 555-666-777 in textbox2.
Delete the text in TextBox2 and try to rewrite the numbers into the textbox2.

Hope it helps,

Luc001 77 Posting Whiz

Hi GeekPlease,

You have the event for TextBox1_Keydown and this event wil happen only for KeyBox1.
Now, When you add more TextBoxes at the end of this event, like I showed you in previous post, then the event will also happen for the other TextBoxes when they have the focus.
Hope it helps,

Luc001 77 Posting Whiz

Hi,

You can add as many Events as you want on the End. As long as the Subroutine can Handle them, the Event will happen.

Private Sub TextBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)Handles TextBox1.Keydown,TextBox2.Keydown,TextBox3.Keydown,TextBox4.Keydown ' as many as you have...
Luc001 77 Posting Whiz

Hi,

You need to select in the properties of your mdiparentform: IsMdiContainer=true

Luc001 77 Posting Whiz

Hi,

You can find some information about how to do it: Click Here

Luc001 77 Posting Whiz

Hi,

After checking your code I found a fault that could causes the Crash.
"cColor" isn't declared in this part of your code!
Is it declared elsewhere?

Why you need this part of code:

blnColorClicked = True

Change this part:

If (CColorD.ShowDialog() = System.Windows.Forms.DialogResult.OK) Then

            cColor = CColorD.Color ' change this into: Me.BackColor = CColorD.Color
        Else

            cColor = System.Drawing.Color.Black ' change this into:   Me.BackColor = Color.Black
        End If

Hope it helps,

Luc001 77 Posting Whiz

Hi,

You can find the whole explanation about Assemblies, Here

Grtz,

Luc001 77 Posting Whiz

Hi,

I'm asking because in some versions there is a setup & deployment project build in.
In VB.Net 2010 you can find that project in:

File -> New project -> Other project types -> setup and Deployment -> make your selection

Grtz,

Luc001 77 Posting Whiz

Hi Jockster,

Glad to help.
Mark your thread as resolved, so it can help others.

Grtz,

Luc001 77 Posting Whiz

Hi,

You can find an example about Catch Exception, Click Here

Hope it helps.

Grtz,

Luc001 77 Posting Whiz

Hi,

Like Calleman said you can use Inno Setup, but first I want to ask you wich version of VB.net your working with?