Luc001 77 Posting Whiz

Hi,

I've used this in VB 2008 and works:

Dim form2 As New Form2
        form2.TextBox1.Text = Me.TextBox1.Text
        form2.TextBox1.Enabled = True
        form2.Show()
        Me.Hide()

All you need to do is add a button and textbox in form1 and textbox in form2.
Put then this code into the button event.

However, if you really want to copy the entire textbox, location and size then Codeorder's code is better.

Luc001 77 Posting Whiz

Hi,

You can find some explanation, how to add your Chrystal Report into your project when you want t publish.
Look, here.

Luc001 77 Posting Whiz

Hi,

You can find an example, here.

Or you can use SkinCrafter, look here.

Luc001 77 Posting Whiz

guys How do you Create Database in MS Access Using Oledb in vb.net?

Hi,

You can find a tutorial how to create a Database with Access in vb.Net.
Look, here.

Luc001 77 Posting Whiz

Hi,

You should do it like this:

Sub Main()
        Dim Bday As Date
        Console.WriteLine("What is your date of birth?")
        Bday = Console.ReadLine
        Dim d1 As Date
        Dim d2 As Date
        d1 = Now
        d2 = Bday
        Dim iage As Integer
        iage = DateDiff(DateInterval.Year, d2, d1) - 1
        Console.WriteLine(iage)
        Console.ReadKey()

    End Sub
Luc001 77 Posting Whiz

Hi y2kshane,

Thanks for the reputation points.
If that solved your problem mark it as solved.

Luc001 77 Posting Whiz

Hi,

Try this:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.WindowState = FormWindowState.Maximized

End Sub
Luc001 77 Posting Whiz

Hi,

You can try this:

'following code resizes picture to fit

        Dim bm As New Bitmap(PictureBox1.Image)
        Dim x As Int32 'variable for new width size
        Dim y As Int32 'variable for new height size

        Dim width As Integer = Val(x) 'image width. 

        Dim height As Integer = Val(y) 'image height

        Dim thumb As New Bitmap(width, height)

        Dim g As Graphics = Graphics.FromImage(thumb)

        g.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic

        g.DrawImage(bm, New Rectangle(0, 0, width, height), New Rectangle(0, 0, bm.Width, _
bm.Height), GraphicsUnit.Pixel)

        g.Dispose()


      'image path. better to make this dynamic. I am hardcoding a path just for example sake
        thumb.Save("C:\newimage.bmp", _
System.Drawing.Imaging.ImageFormat.Bmp) 'can use any image format 

        bm.Dispose()

        thumb.Dispose()

        Me.Close()  'exit app
y2kshane commented: thnx for the reply :) work fine +1
Luc001 77 Posting Whiz

Hi,

I found this in the MSDN library for the Hijricalendar and here for the Hebrewcalendar.
Perhaps you can find some information how to solve your problems.

Luc001 77 Posting Whiz

Hi,

You could try:

Dim str1() As String = Nothing
Luc001 77 Posting Whiz

Hi,

If your browsebutton is a combobox, where you can do some selections, then you do 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,

That's a datagridview.
For some example Images look, here.

For an explanation, look here.

Luc001 77 Posting Whiz

Hi,

You can some explanation about Keyboard hook, here.

Luc001 77 Posting Whiz

Hi,

Put the Label part inside the For Each loop.

Luc001 77 Posting Whiz

I have made a program consisting of about 15 smaller projects, each with their own .dll/.exe
I need to make a custom installer that will prompt the user for different options, which the installer setup built into VS10 does not support.
I need to be able to have this run like its own program, with combo and text boxes for usr input, and then to compress all the files i need into the .exe
How would one go about doing this?
if possible i would like to keep everything inside of VS10 instead of a third party application. And free would be the best too. =)
Thanks
~Matt

Hi,

I think you can find some explanation in the Launch Condition Management in Deployment
Look, here.

Luc001 77 Posting Whiz

Hi,

You can try something like this:

TextBox1.Text = Date.Now.DayOfWeek.ToString
GeekByChoiCe commented: not what the OP wanted to know +0
Luc001 77 Posting Whiz

Hi,

The listbox doesn't work like that.
You can either use a ListView, natively supporting the concept of a column or create a new user control, put a list box onto it and draw in a column header.

You can find some explanation about a Listview, here.

Luc001 77 Posting Whiz

Hi,

I found this solution:

I seemed to have solved the problem...I realized the compact frameworks had nothing to do with the problem...and I don't even know why they were installed...so I removed them (that didn't fix the problem)...Windows Update then did a Security Update for Microsoft Visual C++ 2010 Redistributable...I then installed .NET Framework 4.0 beta 2, because I figured maybe VS 2008 didn't remove it properly and stuffed up the registry or something...I then had to restart my computer and it configured the updates whilst shutting down and after restarting as well...I'm not sure if it was configuring the Microsoft Visual C++ 2010 Security Update or .NET 4.0 beta 2 but after I logged back in...I was able to install VS 2010 express edition flawlessly...

I hadden't any problem with installing vb express editions, but you can try it.

Luc001 77 Posting Whiz

Hi,

Because your working with Arrays, you should use the Imports System.Collection namespace.
You can find some explanation, here.

Luc001 77 Posting Whiz

Hi,

You can find some explanation, here.

Luc001 77 Posting Whiz

Hi,

You can do it like this:

Private Sub TextBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseDown
        TextBox1.Text = ""
    End Sub
Luc001 77 Posting Whiz

Hi,

Yes your right.

In stead of BringToFront(), try calling:

SetForegroundWindow(Me.Handle)

Add this declaration:

Private Declare Function SetForegroundWindow Lib "user32.dll" (ByVal hWnd As IntPtr) As Boolean
Luc001 77 Posting Whiz

Hi,

You can try with topmost like this:

Me.Topmost = True
Luc001 77 Posting Whiz

Hi,

You can find an example how to print pdf files in this thread.

Luc001 77 Posting Whiz

Hi,

You can try this function:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        IsPalindrome(strToCheck:=TextBox1.Text)
    End Sub

 Public Function IsPalindrome(ByVal strToCheck As String) As Boolean

        Dim iForward As Integer
        Dim iBack As Integer
        Dim iMid As Integer
        Dim bPalindrome As Boolean

        IsPalindrome = False
        bPalindrome = True
        On Error GoTo ERR_IsPalindrome

        iBack = Len(strToCheck)
        iMid = iBack / 2
        iForward = 1

        If (iBack < 1) Then
            Exit Function
        End If

        Do While (iForward <> iBack And
    iForward <= iMid)
       If (Mid(strToCheck, iForward, 1) <> Mid(strToCheck, iBack, 1)) Then
                bPalindrome = False
                MsgBox("It's not a Palindrome")
                TextBox1.Text = ""
                TextBox1.Focus()
            Else
                MsgBox("It's a palindrome")
                TextBox1.Text = ""
                TextBox1.Focus()
            End If
            Exit Do
            iBack = iBack - 1
            iForward = iForward + 1
        Loop

        IsPalindrome = bPalindrome
        Exit Function

ERR_IsPalindrome:

        Debug.Print("Error: " & Err.Description)

    End Function
Luc001 77 Posting Whiz

Hi,

You can find some information about insert a new row, here.

Luc001 77 Posting Whiz

Hi,

If you know the cell, like having a reference to it from the variable desiredCell you can simply do the following:

dataGridView1.CurrentCell = desiredCell
dataGridView1.BeginEdit(True)
Luc001 77 Posting Whiz

Hi,

Was my answer correct, because I couldn't tested it?

Mark your thread as solved. :)

Luc001 77 Posting Whiz

Hi,

You can read all about the textbox.scrolltocaret method, here.

Luc001 77 Posting Whiz

Hi,

I think your listview is populated by a database.

So you need to delete the record from the database to formulate the delete query after selecting the item in the listview. Something like "delete from table where.." then execute the query. After that you can refill your ds variable and reload the listview items.

Luc001 77 Posting Whiz

Hi,

It's a tutorial, so you can make some changes.
For example, add your database file like an embedded resource and then when you create a setup your file will be added during setup.

Luc001 77 Posting Whiz

Hi,

If you still need more, then don't hasitate to ask them in this forum.

Don't forget to mark your thread as solved when you've got an anwser. :)

Luc001 77 Posting Whiz

Hi,

You can find a tutorial, here.

Luc001 77 Posting Whiz

Hi,

You can try something like this:

If Me.txtLine2Rcon.Text = "" Then MsgBox("Please insert a running condition for Line 2 before you add it to the database", vbOKOnly)
        End Sub
else
        Dim NewLongDesc As String
        Dim RConv As String
        Dim StkCodeV As String
        ' rest of your code
Luc001 77 Posting Whiz

Hi,

You can find a good tutorial how to use a Access database with VB.Net, here.

Luc001 77 Posting Whiz

Hi,

No problem, mark your thread as solved. :)

Luc001 77 Posting Whiz

I am working vb.net application vs 2005,I am using culture ("ja-JP") japan in my application but i need to display date in this format("dd-MMM-yyyy") how to change it?
Thanks

Hi,

You can try something like this:

Label1.Text = Date.Now.ToString("dd/MMM/yyyy", CultureInfo.CreateSpecificCulture("ja-JP"))

I couldn't tested it, because I haven't a japanese font on my PC.

Luc001 77 Posting Whiz

Hi,

You can find some information about control resizing, here.

Luc001 77 Posting Whiz

Hi,

I think you should do it like this:

Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click  
    If ListView1.SelectedItems.Count > 0 AndAlso MessageBox.Show("Do you want to delete this item?", "Confirm", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then 'make sure there is a selected item to delete  
        ListView1.SelectedItems(0).Remove()  
    End If  
End Sub

I didn't tested it, but should work.

Luc001 77 Posting Whiz

Hi,

If that solved your problem mark your thread as solved.

Luc001 77 Posting Whiz

Hi,

Did you tryed the Serialport.Open method.
You can find some information, here.

Luc001 77 Posting Whiz

Hi,

As you can read in the code example I gave you find this:

Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=E:\VBproject\myDB.mdb")

And that says I've used a Access database. ( myDB.mdb )

Luc001 77 Posting Whiz

Hi,

I think you can find some information, about cursors, here.

He also mentioned that you can create some cursors by yourself with Visual Studio.

Luc001 77 Posting Whiz

Hi,

I think you can find some information, here.

Luc001 77 Posting Whiz

Hi,

It's like adatapost said.
You need the System Security Cryptography class for it.
Look here.

Luc001 77 Posting Whiz

Hi,

To prevent other users from accessing the file when you open the file set the FileShare mode to None. Since you did not post any code I am not sure what method you are using to open and update the file. A sample using the would be:

File.Open("C:\temp\Filename.xml",FileMode.Append,FileAccess.ReadWrite,FileShare.None);

Found only C# code as an example.

Luc001 77 Posting Whiz

Just to let the others know that your problem is solved.

Thanks for the reputation points :)

Luc001 77 Posting Whiz

Hi,

No problem.

If that solution solved your problem then mark your thread as resolved.

Luc001 77 Posting Whiz

Hi,

You can find some information, here or here.

Luc001 77 Posting Whiz

Hi,

You can find some more Time format structures, here.