Activate A Hidden Form From Aanother Program
Ive written 2 programs.....one hides itself......Is it possible for the second program to activate (show) the first program when its been hidden. Appactivate("Form1") work great if the form is behind another window but if its been hidden, it gives a runtime error 5
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Menu Bar Hidden When Child Form Activate ???
Hi everyone!
I have a mdi form with 2 children form. I put a menu bar in my mdi form. One of the 2 children form (always the second form) when clicked hide the menu bar and reappear when the first child form is clicked. Why???
Thanks in advance!
"Activate" A Hidden Worksheet
I have an Excel Application w/ many worksheets and many VBA Forms. I want to hide one of the worksheets.
But when I hide the worksheet in Excel, then run the VBA forms, the VBA code can't find the hidden sheet -
even though it is in the Sheet list in VBA.
Is there VBA code that I can add to the appropriate form that will "un-hide" the worksheet, use the info, then
"re-hide" the worksheet ?
The Worksheets.Activate command that points to the worksheet doesn't work.
Thanks in advance,
Gary
Find Out If Program Is Running, And If It Is Not, Activate The Program
Okay, i have searched for over 5 hours, and cant find out how to make with an visual basic program how to:
find out if a pragram is running. and if it isn't running, activate the program.
i want to do this with a timer
so i can leave my computer and the program cheks every minute if the program is running and if not, it activates the program
Auto Activate Program
Does anybody out there know how to let a program auto start after reboot. similar to norton program. i need to to run as a background process. Thanx
Activate Program From Website?
Hi,
I am the owner of a checkers website http://checkerscentral.hypermart.net and I would really like to add a 'checker game animator' to the features of my site. It would help beginners to see the various games/problems that are posted there.
My question is this, what do I have to do to be able to activate a program from a website? If I can get the users to download a program I would want the program to automatically load up every time a 'game' or 'problem' link is clicked and then allow the user to go through the moves as they wish.
Could the program be a standalone application? Or does it have to be active x? Please let me know, and if possible an explanation why.
Thanx in advance.
Trying To Get A Userform Program To Activate Immediately
I am have designed a simple "userform" program. The only way I can get it to open is by putting a button in the Sheet 1 section of the excel project.
If possible I would like a user to be able to just double click the xls file, and then the "userform" would automatically launch.
Any Ideas???
Activate My Program And Bring To Foreground While In Another App.
I've written an application in Visual Basic 6 that is essentially an add-on program to another application (Autodesk Inventor to be specific, which is a 3D Modeling program). Essentially, what I have done is integrated a timer into my application that checks to see if a certain command in Autodesk Inventor is active. Therefore, the user is working in Autodesk Inventor creating their 3d models; once they start a specific command I want to bring my program to the foreground (it will already be running and displayed in the taskbar). I have no problem checking to see if the appropriate command is active but I'm having trouble making the program visible on the screen since my code to activate the program simply causes it to flash on the taskbar and not become visible on the screen.
Here is the code from my timer event (executed every second):
Set objInvApp = GetObject(, "Inventor.Application")
If objInvApp.CommandManager.ActiveCommand = kCreateHoleCommand Then
Me.Show ' Have also tried AppActivate Statement
End If
Can someone assist?
Thanks,
Ryan Small
Using The ShellExecute Command To Activate A Program
Heres my situation. I have a csv file that I want to read and put into a SQL Server 6.5/7 database. I already have a VB app running and I was going to make this function part of the existing program. My question is how exactly would I do this? Code examples would be great as I have no idea where to start. Some other things that might be important: I want to use the BCP utility that comes with SQL Server because this program is supposed to take care of reading the file and putting into the database. The problem I have is writing code to get to that point. (i.e. Opening connection..activating shell command for BCP,..closing connection.) This means I need some code from beginning to end. If anyone has even a remote idea on how to do this, I would greatly appreciate any sugggestions. Also, I have searched alot of VB code sites and can't seem to find any for this example. If you know of one that does, let me know.
Thanks,
Greg
How To Make Form Activate By Clicking On TitleBar Of Form?
Hello Everyone....
In MDI Application, I have want to make child form activate by clicking on it's title Bar.
Also,
Want tot make MDI appliction activate by clicking on it's titlebar when switch from another app. such as MS Excel to my App.
HOw????
Thanks.
HDave
Form Initialize Vs. Form Load Vs Form Activate
I'm sure this is one of the most basic of questions in terms of VB, but I've been working with VB for 4 months now, and have yet to realize the differences between form initialize and form load and form activate.
Can some please clairify, thanks.
Activate Event Called Only When Program Is Compiled.
Greetings all!
I ran into a really weird problem that took me about one day of work to fix. Byt the thing is, I still don't understand why I got this weird behavior!?!?!?!?!? So I tought that maybe some of you could provide me with another plausible explaination than my computer is posessed!
I work with MDIforms. When I click a button, it is supposed to open a form. So, what I do is loading an MDIchild into a collection. After doing that, I call a my custom function "LoadData()" from the MDIchild to load some datas (duh! that really sounded like a bad help file I read once...).
Now, here is the funcky part: when I run from the .exe file, the sub "Form_Activate()" is called right after my function "LoadData()". BUT, if I run the program from the VB developpment (I call it debug mode...) environment, "Form_Activate()" is NOT called!!!!
If anybody could tell me why the behavior is different between compiled version of the app and the debug mode, that would be great!!! Or, at least, if someone have seen something like that, just tell me cuz I really think about calling a priest so he can exorcit my computer!!!!
Thanks!
)
Make Specific Links Activate Your Program.
Ok I am trying to make it so if a link says something along the lines of jdh://...
open my program. Like mIRC does with irc://. I looked through the registry and saw how other programs did it and I don't feel like doing extreme testing to the registry, because if I don't know what I am doing I tend to mess up. So does anyone know the appropriate registry keys to add to make my program to do as I wish.
Activate Program In System Tray With Mouse
Hi guys
I have a program that resides in the system tray.
I want to activate that program by pressing both left & right mouse buttons. When that action takes place the program should be activated, popup and be ready to use.
I do not know a lot about API's, but I guess that the answer would be found there.
Anybody that can help me with code / examples for something like this?
Thanks!
dwsteyl
Why Would A Program Be Hidden?
(I'm sorry, I posted this in ASP, but haven't gotten any responses)
I've created a DLL that runs on our web server. The only code is:
Code:
Option Explicit
Public Sub LaunchIENow()
Dim pid&
pid = Shell("C:Program FilesInternet Exploreriexplore.exe http://www.amazon.com", vbNormalFocus)
End Sub
which is in a class module. It's supposed to launch Internet Explorer on the server from an .ASP page I made. I don't get any errors or anything, and it actually creates a process that I can see in the "Processes" tab from the Windows Task Manager, but the program (Internet Explorer) is not visible - has no window/form. I need it to be visible. What am I doing wrong?
thanks.
Hidden Program
hi,
I need to create a program that runs every 15 mins on a computer but I want it to run in the background with a little Icon on the task bar. I can easily write the code that i need running, i just don't know where to start.
Has anyone got any code that does somthing similar, that i can reference?
Thanks.
Get Hidden Program
I was kinda scared to ask this, because its probably been asked before. I did a search but all I could get was getting the attention from a program on the Task Bar. So here is some background on what part of the prog does:
1. I load the program (in this case it is from a seperate program using the Shell command) and using the "Send Keys" command, send the right keys and start the program.
2. Once it is started, the program is not veiwable in the TaskBar, nor in the Task List using Ctrl+Alt+Del.
3. The program needs to get the attention again (Bringing it up from it hiding), and more Keys sent.
All I really need is part 3 getting the program to come back up. I did a search, and all I found was a command that brought it up from the name it had on the Task Bar. In this case, its not there. So how do I call it up?
Activate Form
hi people...
i'm with a problem here...
ok, let's start...
my app is already showing on the systray, (that's nice), that's ok...
when i "close" the app clicking on the X on the window, it just hides the window, so i can show it again clicking on the SysTray...
if u try to open the EXE again... my "Sub Main" detects that my app is already loaded, and stops the proccess...
that's alright, but, i wanted that when people try to open the EXE again (if the app is already in the systray) it just shows my form (frmMain) again...
understood ? is there anyway to do it ?
i tried this:
Code:
Sub Main()
If App.PrevInstance = True Then
Dim lRet As Long
lRet = FindWindow("ThunderFormDC", "My Main Form")
'Here it's ok, it finds the window...
SendMessage lRet, WM_SHOWWINDOW, 0, 0
'But don't show =(
'Now END this proccess and let the other still open...
End
End If
'If didn´t find any proccess, so load frmMain...
frmMain.Show
End Sub
Activate Form
I want to show a form on every other apps after 15 mins to attention user. How to do it
Activate Form
Hello;
I'm working with Mdiform, but there are also independent forms under my project. Regarding to my problem , i can open new independent form from MdiChildform meanwhile i have some code under mdiChildform activate event. When user close to independent form, i want to work code which on mdichildform activate event.
I tried to refresh MdiChildForm but it doesn't work
How can i do this?
Thanks
Form Activate
is there code where you can find out which form is activated or not....also how do you get all your forms from starting up when played
Form Activate
One for the guru's i think:
I have this:
Dim index As Integer
If loadedcheck = False Then
For index = 0 To 5
If index <> 0 Then
Load CheckGDW(index)
CheckGDW(index).Top = CheckGDW(index).Height * index + CheckGDW(index).Top
End If
CheckGDW(index).Visible = True
CheckGDW(index).Caption = "Check box number " & index
Next index
loadedcheck = True
End If
...you experts will note that this creates check boxes to the amount specified, what i would like to do is read a mdb file and create the amount of check boxes to the specific text from the mdb file for instance:
loop until eof
txtCustomerID = "" & rs!CustomerID
end
Many thanks in advance
Hidden Program From Tasklist
When you start you're own program in windows you can see this at the tasklist(CTRL-ALT-DEL). So is it possible that you're program in invissible there ??
How Do I Activate Sheet While In A Form?
Asking again for help opn my first attempts to use forms ...
Is it possible to have a form visible and still allowing user interact with the sheet?
Code:
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim r As Range
If TextBox2.Text <> "" Then
Set r = Range("B:B").Find(TextBox2.Text)
If Not r Is Nothing Then
If r.Row Mod 2 = 0 Then
r.Offset(0, 1).Select
Else
Range(r.Offset(0, 1), r.Offset(-1, 1)).Select
r.Offset(0, 1).Activate
End If
End If
End If
End Sub
After text is entered, I would my users to be able to enter text on the selected cell and interacting with excell without closing the form. The same behaviour as a standard Find/Replace form.
The form is activated through a UserForm1.Show statement. Should I use any modal value? vbModal/vbModeless does not seem to make any difference .
Thanks in advance.
Form Activate And Initialize
What is the difference between Form initialize and form Activate? When I say form Form1.Show() which of the events trigger?
Here is the problem I have. When ever I say Form.Show() I want the program to do some stuff. Right now I have all that code in Form_Activate. I also have a modal form that I open on and off on top of the other form. But every time I close the modal form Form_Active triggers. So I want to put the code that’s in Form_Activate some where else so whenever I say Form.Show() it will run that code. I already tried form load and it doesn’t work.
Form Activate Problem
Hello - sorry to post on a Friday afternoon!
I have placed a breakpoint within a form_activate sub. However, when the the form is loaded and interacted with, I cannot get the breakpoint to work. Surely when the form is loaded, triggered, used in any way this sub should be activated? Or am I missing something obvious here?
It is as if this section of code is not even processed(?)
Form Activate Event
I don't get Form Activate events (or Deactivate, Got/lost Focus events) when I swap to/from my VB6 app from another app. I should, shouldn't I!
Put a long, multiline label and a command button on a form
Put this in the form's code
Private Sub Form_Load()
Label1 = "Load"
End Sub
Private Sub Form_Initialize()
Label1 = Label1 & vbCrLf & "Initialize"
End Sub
Private Sub Form_Activate()
Label1 = Label1 & vbCrLf & "Activate"
End Sub
Private Sub Form_GotFocus()
Label1 = Label1 & vbCrLf & "Got Focus"
End Sub
Private Sub Form_Deactivate()
Label1 = Label1 & vbCrLf & "Deactivate"
End Sub
Private Sub Form_LostFocus()
Label1 = Label1 & vbCrLf & "Lost Focus"
End Sub
Private Sub Command1_Click()
Label1 = Label1 & vbCrLf & "Click"
End Sub
Run and click some other app and then back to the form..
Form Activate Event
Hi,
I have a form where I store data to access db. After that I close the first form and open a second form (with vbmodal), where I try to read the data with data controller. But the data just isn't there. The problem is this (at least my guess is this) When the second form opens and the data controller tries to read from access db, the access table is not saved yet. I have also tried to refresh the data controller in form activate event, but it's not the solution because this form was in modal mode and the form activate event does not occur.
Can anyone tell how to solve this problem?
Activate Form **Resolved
In my app I have set the form to be (1) on top at all time, (2) and transparent as well. Now I have a question.
How can I get the form to react if the mouse is passed over it?
TIA,
Activate Form By HWnd
I am writing an app where I have multiple instances of the same form.
When a new form is activated I save the hWnd value of the form and later in the program I need to send data to the form.
since there are multiple forms I check (for example for) the name. when I find the name then I search for the appropriate hWnd value. once that is found I need to activate the form with that hWnd value and parse the data to it.
How can I activate a form with its hWnd value ?
thanks
Form Activate And Load Sub
Have you tried putting a Stop at the top of your procedure, and using F8, walk through your code to see exactly what is happening?
Help Activate A Module From A Form.
Hey,
This is the situation, I have an app that sits in the systray. When the user left clicks on the icon I want a module to be activated. How do I do it?
(I already have all of the code for my app! All I need is to know the syntax for activating the module. I keep getting an error saying, "expected variable or procedure not module.")
Can anyone help me?
------------------
Thanks,
MiDaWe
Help Activate A Module From A Form.
Hey,
This is the situation, I have an app that sits in the systray. When the user left clicks on the icon I want a module to be activated. How do I do it?
(I already have all of the code for my app! All I need is to know the syntax for activating the module. I keep getting an error saying, "expected variable or procedure not module.")
Can anyone help me?
------------------
Thanks,
MiDaWe
Activate A Form From One Application To The Other
i have a form1 in one application1 (Active exe) and form2 in
another application2. i am refereing application1 from
application2. Now my problem is, one button is there
in form2 and iam clicking the button and it will call the form1
in application1. but the form1 is opening behind the form2. i
need to bring front (this part i did). but if i bring the form1
in front its not active, still form2 only active. I want to make
form1 active.
Form Activate Event
I have a code which pastes a large amount of information cell by cell from one excel sheet to another which takes a lot of time .I want to hide the process going on by putting a form in front with an animated gif in it.Please help.I tried with a form with lot of control on it and put my code in the form activate event but while processing the code,the form appears white and no control i diplayed.I don't know why .May be because the multitasking has been too much for my PC.Anyway I have deleted all control from the form and is planning to put animated gif.
Calling A Hidden Program Using A Keypress
I'm trying to call a hidden program that I hid using frm.hide and its running in the backround.But I want to call it back and someone told me to use this code..but when I put it in this whole line turns red and itwont let me do it.....does anyone no how to call back the program with certain a key press.
Private Declare Function GetAsyncKeyState Lib "user32" _ (ByVal vKey As Long) As Integer
This Is So Annoying (Form Load/Activate)
Is it just me or is VB missing a critical event: One that triggers when the form loads and appears, but not each time it gets the focus back like the Activate event.
To get around this I always put a 1 ms timer on each form where I need this sort of event that executes code and disables itself immediately.
I can't beleive there isnt a better way of doing this, I could use the Activate event with a boolean to see if its the first activate since the load but thats not much better.
Why isnt there an event for this built in?!?!
Timer Activate When I Load Form
So i made a cheat for my game, when i press I + L + M then i get more score but then i cant win the game, but my problem is when i open form then a msgbox will come saying that i cheat(i made it when i press I + L + M) but i didnt press I + L + M yet
How To Trigger Activate Event Of A Form?
I have 2 exe programs.
prg1.exe = calling program
prg2.exe = program to be called
prg1 code to call prg2:
VB Code:
' Specifying vbNormalFocus as the second argument opens the application in ' normal size and gives it the focus.Dim RetValRetVal = Shell("C:WINDOWSprg.EXE 0001", vbNormalFocus) ' Run prg2.
prg2 code to unload, back to prg1:
VB Code:
'there is some others code before Unload Me'Function WriteInfoToINIFile()Unload Me
Requirements:
After prg2 Unload, the prg1 back its previous state and need to change some data depends on the written data from INI File by the prg2 upon the prg1 activate the program.
Problem:
The Activate event of prg1 is not triggered upon activation.
Conclusion:
The Activate event occurs when an object becomes the active window. But moving the focus to or from an object in another application doesn't trigger either event.
Favors to the group:
1) Please give a hints on how to trigger activate event switching between 2 applications.
2) If you have other way to meet the requirements, much better. Please teach me.
3) Also upon calling the prg2, the user should not able access prg1. Its like with calling other form using Show method with vbModal. But it is within the application.. How about between two applications. (maybe Hiding the prg1 first before calling the prg2 then show it again after prg2 unload.
Thank you very much.
Form Activate/Load/GotFocus
I'm trying to have a function run IMMEDIATELY after a form is opened. Generally, I'd put a "CALL" to the function into the FORM_LOAD event, but my problem is that the form isn't being displayed and the function is already being called.
I've tried adding the "sleep" function, and even moving my function into the activate or got focus events, but they all do the same thing.
Essentially, I need the user to see the text on this form, PRIOR to have the function running... BUT i need the function to start soon after the text is displayed, say, 2 seconds later?
Does this make sense?
Toolbar Disappears After Form Activate
I added a toolbar to my app at the very end of development. Here's what happens: when the form is activated and while the form loads a listbox the toolbar and all buttons are visible, but as soon as the listbox is fully populated the buttons go invisible. I can click on where the buttons are on the form then they become visible, OR when I step through the program at the end of stepping the buttons remain visible, but when the program runs normally they turn invisible. I have checked all properties on the toolbar and buttons and they are all enabled and visible. The toolbar iteslf does not turn invisble, only the buttons.
I have tried forcing the buttons visible as the last line of code but it still doesn't work.
Can anyone point me in the right direction to solve this?
Form Activate Event Not Firing
Well I'm facing a very peculiar problem with my MDI app. When the application starts the first time and I invoke any MDI child, the activate event of that MDI child does not fire. However, if I again reopen that MDI child or any other MDI child, the respective activate event starts firing. Can anyone explain this problem?
Form Activate Vs Form Form Load?
Hi all,
sorry to trouble u again with my problem. well as the subject header this thread stated. i would like to know what is the different between Form_Activate and Form_Load in VB .. or in fact i am using eVB now. well, i guess it shouldnt make much of a different for this problem. appreciate your kind comment and help.
longwar
Problem With Form Load/Activate Events
Follow up to a post i made last week and desperately need help with (as it gos to the customer tomorrow for testing!):
When i step through line by line in debug environment my form.load event is processed but not my form.activate. When i run it straight off, the other way round happens.
so how can i ensure that the form.load event has taken place before the form.activate event kicks off? just use a flag and test?
all suggestions greatfully appreciated!
Kester
|