Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Disabling A Window While Another Is Open


i was wondering how do u make it so if i open a form called 'open' from a form called 'menu', until the 'open' form is closed the 'menu' form will be disabled completely (inc clicking on it, like in programs such as notepad when you open the about dialog


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Disabling The Window Resize Ability
For my application, I would like to set the resize to false. How is this done?
I checked the form properties but didn't see a "resize" property.

Disabling A Window Button In Word
I'm completely lost on this one so any help would be greatly appreciated.

I need to be able to disable a particular button in a particular window/screen in msword when it starts up. I can get the menus and such disabled, just can't figure out how to get into the options from there.

The buttom I need to disable is under Tools > Options... > File Locations

I need to disable that 'Modify..." button, but I just can't figure out how to get in there.

again, any help would be appreciated. Thanks.

Disabling Menu From An Active Window
Hi everybody,
        i have a template in Excel in which I had make a button used to save the file under a name taked from a specific cell in the worksheet.

What I want to do now, is when the template is opening, I want that all saving icons or menus (Save icon, save as... menu and save menu) will be disabled. I want that only my button will be enable for saving to prevent anybody saves the file under a wrong name.

Is it possible to take action on the menu of an application window like I want to do?


Disabling The 'double Click' Window Size Change
Hey all

This is a difficult problem to explain. i'll do my best
I am creating a program that works maximized. however i need to have a menu. (project thing, i'm a student) The problem lies when the user double clicks the bar at the top of the window, it makes the form a seperate window instead of being maximized. If anybody can tell me how to disable this action i would greatly appreciate it.

p.s if there is any way to have a menu without having the bar at the top that would solve many probs.


Disabling Multiple Selection Of Files In Window Explorer
    I created following registry key and sets its default value like following,

    HKEY_CLASSES_ROOTjpegfileshellUpload to MyProjectcommand

    Default = C:Program FilesMyProjectprjMyProject.exe %1

    This results in, when i right click on any jpeg file in explorer, it gives in context menu 'Upload to MyProject'. If i select one file and right click on it then it is passing full path of the file name in '%1'. so that i can take it as command line argument to my application and display that file in application.
    But the problem is when i selects more than one jpeg file in explorer then it creates multiple instances of my application and opens each file in each instance. I want to disable multiple selections of files in explorer Or how can i get that user selected multiple files in explorer.
    I want, when user selects multiple file then my application should not get start. (not a single instance).
    I am using VB6.



Disabling Close Option In Command Window While Executing Batch File
Hi Friens,

I m new to VB and new member of this forum.

I am executing a batch file using the following command in VB
rc = shell(App.Path & "deletepdf.bat " & fname).
It works fine.

For executing the batch file, command window opens. I want to disable the close option(right upper corner) in the command window bcos I dont want the user to terminate batch job manually.

Could anyone please help regarding this.
Is there any option in the shell command itself to disable the close option of command window. Let me know.


Disabling Close Mark In Command Window While Executing Batch File
Hi Friens,

I m new to VB and new member of this forum.

I am executing a batch file using the following command in VB
rc = shell(App.Path & "deletepdf.bat " & fname).
It works fine.

For executing the batch file, command window opens. I want to disable the close option(right upper corner) in the command window bcos I dont want the user to terminate batch job manually.

Could anyone please help regarding this.
Is there any option in the shell command itself to disable the close option of command window. Let me know.


Obtaining The Window Size ( Xxxx) Using WebBrowser
When programming in Visual Basic 6 and using the webbrowser control, does any one know how to trap the window size the link is calling for? I would like to be able to pass this information onto my form and display the form properly.

An example would be:'view_pop.htm','','width=520,height=428,left=0,top=0');

How do you detect the size in to size your Visual Basic form to the Width, Height, Left and Top positions?

Open A New Web Browser Form When User Clicks Open New Window Link
As the title suggests I would like to be able to open a new window of my own each time a user clicks a "Open in New Window" link on a website.
Is this possible? It of course would mean a user would have to be able to open multiple instances of the same form that are different from one another.
At the moment when a user clicks a open new window link it results of Internet Explorer getting opened over the top of my app, rather than my own form dedicated for separate windows

Also if it's not too much to ask, does anyone have any idea how to quite simply print a webpage? With nothing extra, just a YesNo box i intend to do with when the user presses Yes the currently displayed webpage will print.
Thanks for any help in advance

Get Contents Of Open IE Window By IE Window Title
I would like to be able to get the HTML content of an open IE window by the window title. How would ono go about doing this?


Keeping DOS Window Open After Using SHELL To Open It
Currently, I have made a program with an about box made in QBASIC (DOS) as an executable, and have linked it to a command button in my VB project.

Private Sub Command1_Click ()
Shell "Aboutme.exe /k", 1
End Sub

The DOS program runs correctly, but is it possible to keep the DOS command window open after the program execution? I would like to do this because all the credits are displayed after the execution of the program. And for everyone who is wondering why I don't use VB to do the the About box, it's because I can't do the animation required in VB. Also, I am using Windows XP. Thanks for anyone that can help.

About Window ::: When Open Document How To Manage It Show Which Document Open Now?
did u see windows menu in vb ? how we know what open and can add or remove it ? which command ?

How To Open New Window's Window?
when i press a button how can i open a window of windows 98 or any other version? API code?

Get URL From Open IE 6 Window
I am writing a program that opens certain webpages in a predefined order. Some of the pages require a login to gain further access.
I currently have it coded to open and close web pages based on their title. I'll have a Do/Loop with a DoEvents that will check to see when the user has entered their login information and the page changes.
However, once I started into the project I realized that some of the secure webpages don't change their window title name. This makes it difficult to close the right windows.
What I would like to do is find each open window by the known title name using FindWindow, then retrieve the current URL from the address bar so that I can use the URL to check on which window to close or leave open.
I believe I may be able to get the URL using PostMessage API, but I have no idea how the coding would look.

Thanks for any tips!

How Open A Window ...
How can I to open a window for to ask a question ? For example a window with "Do you want to delete this file ? " and I can choose between YES or NO.

Best Regards


Open URL In Same Window
what is the coding that can view the URL in the same window that i opened previously?

Open Ie Window

How can i open a ie window (without adressbar, menubar, etc) from visual.
In javascript is:'index.html','','width=770,height=580,left=0, right=0, top=0, bottom=0, resizable=No, scrollbars=No,MenuBar=No,toolbar=No,titlebar=yes')

Thanks on advance

Alexandre Almeida

Open In My Window
hi, is there a way to open an exe INSIDE a picture box on my form. ive tried the shellEX thingy but it just opens the exe as normal.

also, is there something i can put in the exe or this project to make it so they can talk to each other?

Open A New Window
hey ppl. can someone tell me how to open a new window using visual basic. here is the situation:
i have a form and a button on it. when i click the button i want to display a particular website, how do i do that?
(open website in a NEW window)


Open IE WIndow
Ok, I opened a new IE window using ShellExecute... Now, I want to fillout two forms on that web page using textboxes 1 and 2... How would this be done?
EDIT:Just so you know I already tried with a webcomponent, and what I want done doesnt work, so this needs to be done in a new window..

Open In New Window!
I am displaying the History of the various URLs the user has navigated to in a Frame on the WebBrowser control. When any of the URLs is clicked in the History Frame, a menu comes up wherein Open in New Window is one of the menu items. How do I ensure that the selected URL opens in a new browser window when the URL is right-clicked & Open in New Window is selected? I tried this but it doesn't work:
VB Code:
[color=blue]Private Sub [b]wWeb_NewWindow2(ppDisp As Object, Cancel As Boolean)[/b]    Dim frm As frmWebBrowser    Cancel = IsPopupWindow    If (Cancel = False) Then        Set frm = New frmWebBrowser        Set ppDisp = frm.wWeb.Object        frm.Show    End IfEnd SubPrivate Function [b]IsPopupWindow()[/b] As Boolean    On Error Resume Next    If (wWeb.Document.activeElement.tagName = "BODY" Or wWeb.Document.activeElement.tagName = "IFRAME") Then        IsPopupWindow = True    Else        IsPopupWindow = False    End IfEnd FunctionPrivate Sub [b]mnuHistoryNewWin_Click()[/b]    Call wWeb_NewWindow2(wWeb, False)End Sub[/color]



Open.window ?
I have got the following:


Sub AddLink(Url, Info)
dim finalstring
dim id
id = mid(url,48)
finalstring=("" + id + "&action=deletethread") finalstring
end sub

Now this works fine, but always opens a new full-sized window with toolbar ect.

What I want:

The new window should open with a smaller size, without Toolsbar ect. and a new Window-Name.

How can I realise that ?

Thanks in advance,

Open New Window From CGI

I have an ActiveX project running in a browser and I want to make a popup window when an error occurs.
I use some javascript to open help windows in other parts of the project

Function openNew(url),"help","height=600,width=650,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no")
end function

I cant use this for my error windows though as an event needs to fire to get it going. (The errors will occur server side.)

Anyone know what I should put to open a new window?


Open Window
Well this could be a stupid question, but who cares.
I would like to make a kind of browse window, like you have for example in the internet explorer file menu and the option open.
I know there is a site somewhere where I could download the sample code, but I don't know which one it is anymore.
The second problem is that I don't know how to call this 'open file window' in english, so that makes searching very difficult.
So if someone knows a site where I could download this sample code or how I could search this in english, I would be gratefull.

Open In New Window
Why is that my open new window command in ie doesn't work? Did i accendentally hit disable key?

please advice thanks!

Open In A New Window
I know how to open an html with Shellexecute, but it's being opened in the current explorer window. Is there any way to force the opening of a new explorer before retrieving the html?

Seeing If Window Is Open
HELP is need, i have been trying for hours and hours on how to see if the run window is open and i cant get it to work , if any one can help me on this please do so, the thing that is hard is that the parent doesnt have a handel, or atleast i dont think it does

Open In Same Window
Im writing a small application to take the job of IE as the primary Jpeg Viewer. My problem is i don't want it to open up a new program when i click on another picture how can i do that?

Open URL In Window
I'm new to VB so this might seem like a simple question. Someone on my site enters a URL in a form box, all i want it to do is open that URL in a new browser window.

<img src="" width=432 height=81>

So far i have no command functions.


Private Sub Command1_Click()
End Sub

Private Sub Text1_Change()
End Sub

Can someone help me with this please?


Open In New Window
I just can seem to be able to get the URL being navigated to when openign in the new window.

I am using a tabbed webbrower in Express.

I add my handler with the code:

AddHandler wbTabExplorer.NewWindow, AddressOf wbTabExplorer_NewWindow

and my NewWindow code is:

    Private Sub wbTabExplorer_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
        Dim wb As WebBrowser = DirectCast(sender, WebBrowser)
        txtAddress.Text = wb.Url.ToString
        e.Cancel = True
    End Sub

but how do i get the URL for the new window?

How To Open Ie Window In Vb
could anyone please help me out. i am somewhat new to vb and i am trying to figure out how to open a default browser window. any help would be appreciated.

Open New Window
I'm beginner of vc and i wish to know how to create new windows. Suppose i have the following codes:

void CMdispMFCView::OnGrabStart()
// TODO: Add your command handler code here

// MIL: Write code that will be executed on a grab start

// If there is a grab in a view, halt the grab before starting a new one
((CMdispMFCApp*)AfxGetApp())-&gt;GrabInViewPtr-&gt;SendMessage(WM_COMMAND, ID_GRAB_STOP, 0);

// Start a continuous grab in this view
MdigGrabContinuous(((CMdispMFCApp*)AfxGetApp())-&gt;MilDigitizer, ((CMdispMFCDoc*)GetDocument())-&gt;MilImage);

// Update the variable GrabIsStarted
((CMdispMFCApp*)AfxGetApp())-&gt;GrabIsStarted = TRUE;

// GrabInViewPtr is now a pointer to this view
((CMdispMFCApp*)AfxGetApp())-&gt;GrabInViewPtr = this;

// Document has been modified

// MIL: Write code that will be executed on a grab start


void CMdispMFCView::OnUpdateGrabStart(CCmdUI* pCmdUI)
// TODO: Add your command update UI handler code here
CView *GrabOwnerViewPtr = ((CMdispMFCApp*)AfxGetApp())-&gt;GrabInViewPtr;

pCmdUI-&gt;Enable(!(GrabOwnerViewPtr &&
(GetDocument() == GrabOwnerViewPtr-&gt;GetDocument()) &&
(((CMdispMFCApp*)AfxGetApp())-&gt;GrabIsStarted == TRUE) &&

int MilGraNx1(LPVOID pParam1, LPVOID& pParam2);
int MilGraNx2(MIL_ID& MilDigitizer, MIL_ID& MilImage);
int MilGraNx3(MIL_ID& MilImage, char* & pParam);

This function is to capture realtime image. But can i know how to open a new window each time i enter this function? Thanks Alot!


Open Dos Window
How do I open a dos window,
give two dos commands one after the other,
then close that dos window.

Thank You,
Shivakumar G.M.

Open New Window
I am trying to open a new IE window using VBScript but I want the window that is opened to be centered on the screen. How can I do this? Thanks.

Disabling Subform Without Disabling The Scrollers
Hi Eveyone,

I have a subform and i want to disable it so user can't change the values in it. However, I want the user to be able to scroll it since the subform is in Datasheet view and it has quite a lot of fields.

I tried locking it, but the user is still able to see the other options in the combo box and i don't want that to happen.

Is it possible to just disable the data entering or changing in a form directly (i want to be able to change the data through my main form)?

Disabling A TextBox Without Disabling Its Scrollbars.
I have a very simple objective. Disallowing the user input into a TextBox. Its a multi-line one who's text I fill from code. If I set .Enabled to False, that also disables the scrollbars, which is something I don't want. What to do?

Thanks in advance for your help,

Find out what you like doing best and get someone to pay you for doing it.

Open Image In New Window
Currently i can display images using the image tool, however the image enlarges or is shrunk to fit inside the image window.

Is it possible to click the image which then opens it up in another window in it's original size/form?

What makes it more difficult is that im using A DriveListBox, DirListBox and FileListBox to get to the image file. I tried copying the location from these into a new image placeholder inside the new window myself but to no avail.

I'm using VB6

Open A New Window From A Button
Hey, ive been making a browser through VB 6..Im kinda new though...

I was wondering how i can open up Ex: an About section (frmAbout) from the browser by clicking the 'About' Tab?

Property Window Cannot Open
when i run my any program few times then i am unable to open the property window. not even by pressing f4 whereas all other windows are accessible. please help

Open Link In New Window

Is there anybody here, who can tell me how to open an URL in the default browser, but in a new window...not in the old one (if exist). I need a simple code... I didnt find anything with google and with the search engine in the forum...

Respectfully yours

Save As/Open Window
hi! i just have the same problem with john_john so i wonder how do you actually use the common dialog box?

Save As/Open Window

How can I made my application pop up a Open or Save As windows like in any other windows program, and retrieve the name of the file to use it in my program?

Thank you guys


Open Image In New Window
I have made an image program in which the user is able to open up to 5 images for viewing at thumbnail size.

What I want to do now is alow the user to open a full size version of each image in a new window by double clicking whichever image they want

I'm stuck like a monkey in the muck, any ideas?

Open IE In Minimized Window
Okay this has been asked alot but never solved...

i want to be able to open IE in a minimized window....

BUT, i want it to open in one window (say i click a button, it opens one IE, then i click the next, i want it to direct the first IE window to the new URL)

but ShellExecute wont work

and shell makes multiple instances of IE appear...

i dont want to end up killing Iexplore.exe every time i open a page, kinda a waste of computer resources... there has to be a better way....

Keeping A Window Open
im am just starting to learn BASIC.
after writing this program and compiling it

10 print "Table of Squares"
20 print
30 print "How many values would you like?"
40 input num
50 for i=1 to num
60 print i, i*i
70 next i
80 end

it works but shuts the dos window before I have a chance to see the results. How can I make the window stay open?

Get Handel Of Last Window Open
How can I get the handel of the last window that is open by windows. e.g. I open Internet explorer then I click a button on my form and msgbox show's up with the handel of the internet explorer that I just opened, becuase it was the last program I opened.

Thanx in advance.

Open IE In Minimized Window
Can anyone tell me how to open IE with given URL in minimized window. My code looks like this, but it opens IE and sets it to focus:

Private Declare Function ShellExecute Lib _
"shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
iret = ShellExecute(Me.hwnd, vbNullString, _
"", vbNullString, _
End Sub

How Can I Open A Web-Browser Window?
Hi all!

I want to open a window with the Windows-standard-webbrowser (i.e. IE, FireFox, etc). The upcoming Browser-Window should open a specified www-adress.
I want this to do from a VB 6-MainForm, which should work on, independend from the opened browserwindow.

The browser-form, which is included in VB 6, is NOT the one i want to use. Instead, the users´ standard browser should be used!!

How can i do this in VB 6??

Many Thanks for your help!!


Copyright © 2005-08, All rights reserved