Popup while the main program goes on
Popup while the main program goes on
I want to make a popup and the main program have to go on. Is this possible?
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: Popup while the main program goes on
@jj2007: I'm sure Jawade is dancing with glee now. <grin>
@Jawade: There are several ways to do that. The easiest is to start the popup via the SHELL command:
popupmain.bas:
popupchild.bas:
Put both compiled programs into the same directoy and then start popupmain.exe. This simple example is quite useless, but it works. Most of all there is no communication between the two windows.
If you could be a little more specific what you intend to do, I probably could help.
@Jawade: There are several ways to do that. The easiest is to start the popup via the SHELL command:
popupmain.bas:
Code: Select all
ScreenRes 300,200,32
Shell "start " + ExePath + "\popupchild.exe"
Do
Locate 1,1
Print Timer;" "
Loop Until Len(InKey)
Code: Select all
ScreenRes 200,150,32
Do
Locate 1,1
Print Time
Loop Until Len(InKey)
If you could be a little more specific what you intend to do, I probably could help.
Re: Popup while the main program goes on
hello Jawade
have a look in the FreeBASIC/examples/GUI/win32 folder and try fileopen.bas
see if that's the kind of thing you are after
have a look in the FreeBASIC/examples/GUI/win32 folder and try fileopen.bas
see if that's the kind of thing you are after
Re: Popup while the main program goes on
I know. And I will try to help him as soon as he posts a working program with a slot saying <insert popup code here>.grindstone wrote:@jj2007: I'm sure Jawade is dancing with glee now. <grin>
Re: Popup while the main program goes on
Everyone thanks. I coose the example with Shell, it's very simple and the console who in a moment comes up, is not disturbing.
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: Popup while the main program goes on
Compile with "-s gui" to prevent the console window.
Re: Popup while the main program goes on
I compile already with
fbc -b Calendar.bas -s gui versinfo.rc
But the flash stays…..
fbc -b Calendar.bas -s gui versinfo.rc
But the flash stays…..
Re: Popup while the main program goes on
@Jawade
are you running the compiled Calendar from the IDE ?
if so, try launching the program by double-clicking on the Calendar.exe and see if there's a console opening or not.
are you running the compiled Calendar from the IDE ?
if so, try launching the program by double-clicking on the Calendar.exe and see if there's a console opening or not.
Re: Popup while the main program goes on
Jawade wrote:But the flash stays…..
Code: Select all
#define I_hate_consoles 0
#if I_hate_consoles
#include "Windows.bi"
WinExec("MsgBox.exe", SW_RESTORE)
#else
Shell "MsgBox.exe"
#endif
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: Popup while the main program goes on
If you're interested, this bipipe.bi contains all functions you need to open a child window as an own process and communicate via a bi-directional pipe (alas, Windows only)
Re: Popup while the main program goes on
I have this part used, the only thing is a console at starting the main
program.
'hide console window. Windows-only, Win2k or newer.
' DO NOT compile -s gui, compile as console prog.
'
'need this
#include once "windows.bi"
'and this BEFORE you call Screen or ScreenRes
'long method, but you can reveal the console window later if needed
Dim As HWND chwnd=GetConsoleWindow
ShowWindow(chwnd,SW_HIDE)
program.
'hide console window. Windows-only, Win2k or newer.
' DO NOT compile -s gui, compile as console prog.
'
'need this
#include once "windows.bi"
'and this BEFORE you call Screen or ScreenRes
'long method, but you can reveal the console window later if needed
Dim As HWND chwnd=GetConsoleWindow
ShowWindow(chwnd,SW_HIDE)