Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB.NET

Posted on 2011-02-24
4
Medium Priority
?
1,368 Views
Last Modified: 2013-11-26
Hi experts, I've a very hard problem to submit you.
I developed a VB.NET application which starts the AttachMate Extra program and I need to hide any Extra form. I was able to hide the form's session Mainframe but I tried to hide also the Extra splash screen during the program start using process hiding property; I tried to hide the splash form using the minimized property, the on Top my form, but the splash screen always appears. Ther'is a way to hide the any form when a program starts using also API functions?
0
Comment
Question by:riccomondo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 16

Expert Comment

by:13598
ID: 34974099
You can't hide the Splashscreen if you have it defined as your application's splash screen. You would need to do something like this to make the splash screen 'hideable':
http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_2.0/Q_24499627.htmll
0
 

Author Comment

by:riccomondo
ID: 34974630
Attachmate Extra is a COM application; a called Splash screen the screen which appears when the application starts, but is not a Splash screen as used in NET application
0
 
LVL 7

Expert Comment

by:vbigham
ID: 35071783
I am not sure but I would also try using the FindWindow, ShowWindow functions in windows.  Here are the definitions in vb.net:
 
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function FindWindow( _
     ByVal lpClassName As String, _
     ByVal lpWindowName As String) As IntPtr
End Function

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

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




<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As ShowWindowCommands) As Boolean
End Function

Open in new window


(NOTE: These definitions assume that you have referenced and imported:  System.Runtime.InteropServices)

Once you find the handle of the window(if that splash screen is a window maybe you can observe it a little using spy++ ?) you would hide it by calling:
ShowWindow(hWnd, ShowWindowCommand.Hide)

where ShowWindowCommand.Hide is really just 0(zero) per the definition at: http://www.pinvoke.net/default.aspx/Enums/ShowWindowCommand.html

I think it might work (and save some code) to instead declare it with an integer parameter like this (but no guarantees):
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As Integer) As Boolean
End Function

Open in new window


Just a suggestion..  If you need more help with windows functions, I usually go to:
http://www.pinvoke.net

Good luck,
Vaughn
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 2000 total points
ID: 35089446
One thing to add to what vbigham said:
In order to hide that window, you will need to poll for it...  Use whatever command you normally use to start the application, but add to your program a Window Timer and have it repeatedly check for the window.  As soon as it appears, hide it then stop the timer.

That's an imperfect soluton becasue some users may see a momentary flash, but it might work well enough.
==============
What functions do you use to start AttachMate Extra?
For Reflection X, there is a command-line option
   -nm
that casues the program to skip the spalsh screen.  There mioght be a similar option for Extra.
See: http://support.attachmate.com/techdocs/1530.html
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question