Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 15th, 2007, 01:54 PM
Registered User
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Form Staying Ontop Of All Apps

I have a simple form with one button i want this form to remain on top of all applications how do i do it can somebody show me?

Madaxe

Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim MyCATIA 'As Object


        'Get CATIA or Launch it if necessary.
        On Error Resume Next
        MyCATIA = GetObject(, "CATIA.Application")

        If Err.Number <> 0 Then

            MyCATIA = CreateObject("CATIA.Application")
            MyCATIA.Visible = True

        End If

        On Error GoTo 0

    End Sub

End Class

 
Old September 15th, 2007, 06:18 PM
Registered User
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK I found this code that creates a form that stays on top how do i integrate the line topmost = true into my code

madaxe
{code}
        Dim topMostForm As New Form()
        ' Set the size of the form larger than the default size.
        topMostForm.Size = New Size(300, 300)
        ' Set the position of the top most form to center of screen.
        topMostForm.StartPosition = FormStartPosition.CenterScreen
        ' Display the form as top most form.
        topMostForm.TopMost = True
        topMostForm.Show()

[/code]






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Deploy Apps? mistry_bhavin ASP.NET 3.5 Basics 1 March 8th, 2008 05:48 AM
Setting Up Sample Apps mh1hep BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 6 March 7th, 2007 06:52 PM
Licensing in Windows Apps ashu_from_india General .NET 0 January 29th, 2006 08:00 AM
Launching Apps from VB?? PeteS Beginning VB 6 2 June 20th, 2003 01:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.