Click here to Skip to main content
15,911,306 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Progress bar help Pin
jzonthemtn1-Jul-08 7:52
jzonthemtn1-Jul-08 7:52 
QuestionHow to Set Security? Pin
Trupti Mehta1-Jul-08 4:21
Trupti Mehta1-Jul-08 4:21 
QuestionHow to maximize third party app [modified] Pin
JLTBDY1-Jul-08 2:47
JLTBDY1-Jul-08 2:47 
AnswerRe: How to maximize third party app Pin
jzonthemtn1-Jul-08 4:54
jzonthemtn1-Jul-08 4:54 
GeneralRe: How to maximize third party app Pin
JLTBDY1-Jul-08 5:19
JLTBDY1-Jul-08 5:19 
GeneralRe: How to maximize third party app Pin
jzonthemtn1-Jul-08 5:34
jzonthemtn1-Jul-08 5:34 
GeneralRe: How to maximize third party app Pin
JLTBDY7-Jul-08 7:28
JLTBDY7-Jul-08 7:28 
GeneralRe: How to maximize third party app Pin
jzonthemtn7-Jul-08 8:11
jzonthemtn7-Jul-08 8:11 
Try this one:

Imports System.Runtime.InteropServices

Public Class Form1

    <Runtime.InteropServices.DllImport("user32.dll")> _
        Private Shared Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As Int32) As Boolean
    End Function

    <DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
    Private Shared Function FindWindow( _
         ByVal lpClassName As String, _
         ByVal lpWindowName As String) As IntPtr
    End Function

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

        Dim NotepadHwnd As System.IntPtr = FindWindow(Nothing, "Untitled - Notepad")
        MsgBox(NotepadHwnd.ToString)

        ShowWindow(NotepadHwnd, 3)

    End Sub

End Class


FindWindowEx is probably overkill, and I should have mentioned FindWindow instead. The window title "Untitled - Notepad" has to match exactly. If you don't know what the window title will be, you can enumerate all desktop windows and then call GetWindowText for each one until you find the window that you want to maximize.
GeneralRe: How to maximize third party app Pin
JLTBDY8-Jul-08 12:00
JLTBDY8-Jul-08 12:00 
GeneralRe: How to maximize third party app Pin
jzonthemtn8-Jul-08 12:19
jzonthemtn8-Jul-08 12:19 
AnswerRe: How to maximize third party app Pin
JLTBDY9-Jul-08 6:07
JLTBDY9-Jul-08 6:07 
GeneralRe: How to maximize third party app Pin
jzonthemtn10-Jul-08 3:17
jzonthemtn10-Jul-08 3:17 
Questionsql datareader Pin
Ebube1-Jul-08 2:45
Ebube1-Jul-08 2:45 
AnswerRe: sql datareader Pin
paas1-Jul-08 3:26
paas1-Jul-08 3:26 
GeneralRe: sql datareader Pin
Ebube1-Jul-08 5:05
Ebube1-Jul-08 5:05 
GeneralRe: sql datareader Pin
paas1-Jul-08 5:18
paas1-Jul-08 5:18 
GeneralRe: sql datareader Pin
Ebube1-Jul-08 5:33
Ebube1-Jul-08 5:33 
GeneralRe: sql datareader Pin
Ebube1-Jul-08 6:04
Ebube1-Jul-08 6:04 
GeneralRe: sql datareader Pin
paas1-Jul-08 7:03
paas1-Jul-08 7:03 
GeneralRe: sql datareader Pin
Ebube1-Jul-08 16:09
Ebube1-Jul-08 16:09 
QuestionInsert text at the end of the current mail in outlook Reply mail window using vb.net Pin
~Khatri Mitesh~1-Jul-08 2:42
~Khatri Mitesh~1-Jul-08 2:42 
Questionchecking image in a picturebox Pin
Ahamed Azeem1-Jul-08 2:33
Ahamed Azeem1-Jul-08 2:33 
AnswerRe: checking image in a picturebox Pin
Tom Deketelaere1-Jul-08 4:19
professionalTom Deketelaere1-Jul-08 4:19 
AnswerRe: checking image in a picturebox Pin
Kenny McKee1-Jul-08 7:31
Kenny McKee1-Jul-08 7:31 
AnswerRe: checking image in a picturebox Pin
Thomas Stockwell2-Jul-08 2:49
professionalThomas Stockwell2-Jul-08 2:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.