|
-
Jul 2nd, 2002, 02:28 AM
#1
Thread Starter
Lively Member
One Main Form
I got more than 3 forms in my app.I want to make the main form disabled when form2loads and keep it like that untill the the form2 unloads what i am trying to say is how can you make a form a sub form
Here is the problem
when I load form1 from the main form I see two forms in taskbar Main and form1. I wand form1 in Main Form Like a Sub Form
-
Jul 2nd, 2002, 02:29 AM
#2
Then use an MDI form instead.
-
Jul 2nd, 2002, 02:30 AM
#3
... because you can have several sub forms within the MDI form, and the taskbar only shows one window.
-
Jul 2nd, 2002, 02:34 AM
#4
PowerPoster
Just set the ShowInTaskBar property of the 2nd and 3rd for to false, then when you show the form, do something like this:
Form2.Show vbModal, Form1
That will make the main form disabled until you close the Form2.
-
Jul 2nd, 2002, 07:38 AM
#5
Thread Starter
Lively Member
Form2.Show vbModal, Form1 <------ this is the thing I was looking
-
Jul 3rd, 2002, 03:10 PM
#6
Thread Starter
Lively Member
you can open a text file in Notepad by using this command in RUN
notepad "c:\vb.txt"
can I make my app to open a file by useing this
-
Jul 3rd, 2002, 03:49 PM
#7
PowerPoster
You want to open the file in notepad? Just use the shell command:
VB Code:
Shell "C:\Windows\Notepad.exe C:\vb.txt"
-
Jul 4th, 2002, 11:07 AM
#8
Thread Starter
Lively Member
Originally posted by MidgetsBro
You want to open the file in notepad? Just use the shell command:
VB Code:
Shell "C:\Windows\Notepad.exe C:\vb.txt"
No I want to open a text file in my app
something Like this
Shell "C:\myapp.exe c:\vb.dat
-
Jul 4th, 2002, 04:20 PM
#9
The picture isn't missing
Well...
assuming you want to open it in a textbox called text1:
VB Code:
Private Sub Form_Load()
Open Command for Input As #1
Text1.Text = Input$(LOF(1), 1)
Close #1
End sub
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jul 6th, 2002, 07:58 AM
#10
Thread Starter
Lively Member
Can I share variables in Different "compiled" projects .One more thing is it possible to open a form more than 2 times in a project
-
Jul 6th, 2002, 11:38 AM
#11
Thread Starter
Lively Member
ANY ONE
-
Jul 6th, 2002, 01:02 PM
#12
PowerPoster
Originally posted by internet_wiz
Can I share variables in Different "compiled" projects .One more thing is it possible to open a form more than 2 times in a project
Not unless you create an activex exe that both programs can access, or if you save the variable data to a registry key, then have the other program read it, then delete it. Or you could do the same thing with a text file or ini or anything.
VB Code:
Private Sub Command1_Click()
Dim blah As New Form1
Load blah
blah.Visible = True
End Sub
That will load as many form1s as you can fit in memory.
-
Jul 7th, 2002, 03:23 AM
#13
Thread Starter
Lively Member
uhh...
Originally posted by MidgetsBro
Not unless you create an activex exe that both programs can access, or if you save the variable data to a registry key, then have the other program read it, then delete it. Or you could do the same thing with a text file or ini or anything.
VB Code:
Private Sub Command1_Click()
Dim blah As New Form1
Load blah
blah.Visible = True
End Sub
That will load as many form1s as you can fit in memory.
that worked but I still have tiny problem.I have three forms
Main
Receiver
Reader
this is my code
In Main
Receive.show vbmodal , Main
in Receive
dim nReader As New Reader
Load nReder
nreader.Visible = True
when I do this I get an error "Cant show non modal form when a modal form is displayed
-
Jul 7th, 2002, 03:35 AM
#14
PowerPoster
So you will have to open the Receiver window as non modal, or open the reader window as modal to the receiver window.
-
Jul 7th, 2002, 03:47 AM
#15
Thread Starter
Lively Member
Did you read my other post??
Originally posted by MidgetsBro
So you will have to open the Receiver window as non modal, or open the reader window as modal to the receiver window.
The thing is I want to open receiver window as a modal and reader window as non modal I tried diffirent ways but no success
Can i DO THAT
-
Jul 7th, 2002, 04:11 AM
#16
Hyperactive Member
Again, the use MDI-forms would help in this case.
When you have a modal form open, all other forms in the project are non-interactive to the user until that form is closed, so there is really no need to open a non-modal form from a modal form since the user cant interact with it anyway. Try disabling main instead and opening both Reader and Receiver as non-modal.
Main.Enabled = False
This efficiently disables the user from interacting with Main until you chose so (Main.Enabled = True) without making it modal.
Last edited by Rodik; Jul 7th, 2002 at 04:17 AM.
Signed, Rodik ([email protected])
Programmer,usesVB6ED
===========================
Copyright©RodikCo,2002.
Dont mind this signature ;] Its old
-
Jul 7th, 2002, 04:16 AM
#17
Hyperactive Member
You could the same way make Reader(x).Enabled = False to disabled the user from messing with it...
Signed, Rodik ([email protected])
Programmer,usesVB6ED
===========================
Copyright©RodikCo,2002.
Dont mind this signature ;] Its old
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|