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




Information About A Form Without Opening The Form


I am trying to get information on a form (width and height) but I can't seem to access that info without the form being open.

Solution B is to create an procedure that will open all necessary forms, read their width and height, and put that into a table that can be read later, then close the forms.

I would prefer to not have to do solution B...any suggestions?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Disabling All Form's Control Or The Form Upon Opening The Form.
Hi There

Here is my Objective (What I want to accomploish).
Upon opening a Form Called “Search”, the Curser gets focused on a ComboBox called “comboTrans”, And the user must select a value form the ComboBox before they are allowed to move to any other Control. (That is all)
Off Course since the form is an Unbound, They should be able to close the Form any time they wish, Even thou, they have not selected any value from the ComboBox “comboTrans” yet.

I tried many different events of The control and the form itself.
The closest that I came to reach the above objective was in Lostfocus Event of the control itself, But It causes problem when the user decides to close the Form before entering any values ‘for any reason”, the Control’s msgBox Keeps Popping Up.

Therefore I decided a different technique;
And that is Upon Opening the Form, Basically disable or Lock all the controls in the above Form or the Form itself, Except the ComboBox. Then setting the focus on the Active ComboBox, and Even if the User moves to other control, with the help of a MsgBox Forcing the user to move back and select a value from the Active ComboBox
And in the AfterUpdate event of the ComboBox make all other controls Enabled or active again.
A note the form has No record Source and the Control itself is unbound and has No Control Source.

Best Regards
Sanan




Edited by - sanan on 1/6/2005 7:25:56 AM

Adding Information From A Text Box On The First Form To A Listbox On The Second Form
I need to know how would I add information from a textbox on the first form to a listbox on the second form?

Display Information On Main Form That Is Gathered On Second Form.
Hello,

I am using a serial barcode reader to scan information into a label on a form that is NOT my main form. I would like to display this information on my main form as well. Actually, I am using the comm event from the scanner to capture the information so even if the second form is not open, I want to display the information on the main form (in a label). So...to hopefully simplify my question....How do I display information from one form to the main form.

Thanks!

How To 'grab' The Information From A Called Form To The Calling Form
I have a question regarding two forms.

1 form is the called form..and 1 form is the calling form.
Example, the called form is a popup form that has a MSHFlexgrid to display all the data in a table from a specific database. It is basically a search used whenever the user forgets a student ID or name, etc. Now usually, I have a double click event on the grid where the user double clicks on the grid and grabs the information and puts it on the form. This works fine if only 'one' form calls this popup form. It's specified. Now, how would I be able to do the same thing with multiple calling forms?
For example, the Student Search popup form will be called from the Enrollment Form and the Student Form. So how would I be able to grab the information from that popup form, onto the specified calling form? In other words, how would I make it so that the popup form knows which form is calling it so that it can put the specific information through the double click event?

Importing Form Information Into Notepad (from The Form)
Hey,

I am trying to code a button which, upon clicking it, copies the information currently in the form into notepad.

So far I have successfully coded a way to put it into an email. I was just wondering if the above solution would look something like this, or would it be completely different

-=============================================-

Private Sub Command235_Click()
Dim strToWhom As String
Dim strMsgBody As String
Dim strSubject As String



strSubject = "Your Subject goes here!"
strToWhom = "support@xxxxx.x"


strMsgBody = "Call No: " & Call_No & Chr(10) & _
"Date: " & Date & Chr(10) & " " & "Customer Name: " & Customer_Name & Chr(10)



DoCmd.SendObject , , , strToWhom, strToCCWhom, , strSubject, strMsgBody, True

End Sub

-=============================================-

So far I have found out how to open notepad:

Private Sub Command244_Click()

Shell ("notepad.exe ")
End Sub

Hooray.

Thanks.

How Do You Transfer Textbox Information From One Form To Another Form?
Ok this is what im trying to do enter information in textboxes on one FORM and then hit a command button and the information from those textboxes will appear in a listbox or textbox on a different FORM in my project. Can this be done? Please help thx.

-Flaw

I Need Help With Sending Information From A Text Box On One Form To Another Form
ok, i am trying to build an html editor for a senior project at school, the problem is that i have form where you enter the location of where a pic is or background image is, but the problem is, i can not get it to send the info from one form to another, here is the code



Private Sub Command1_Click()
frmBody.Show 1
If BgType = 1 Then
If Background_Type$ = "Color" Then
Text1.Text = Text1.Text + vbNewLine & "<BODY BGCOLOR=""" & Background_Color$ & """ > """
Else
Text1.Text = Text1.Text + "<BODY BACKGROUND="""
End If
BgType = 0
Else
BgType = 0
End If
End Sub






Private Sub Combo1_Change()
If Combo1.Enabled = True Then
Background_Type$ = "Color"
If Combo1.ItemData = 1 Then Background_Color$ = "Red"
End If
If Combo1.ItemData = 2 Then Background_Color$ = "Orange"
End If
If Combo1.ItemData = 3 Then Background_Color$ = "Yellow"
End If
If Combo1.ItemData = 4 Then Background_Color$ = "Green"
End If
If Combo1.ItemData = 5 Then Background_Color$ = "Blue"
End If
If Combo1.ItemData = 6 Then Background_Color$ = "Purple"
End If
If Combo1.ItemData = 7 Then Background_Color$ = "Black"
End If
If Combo1.ItemData = 8 Then Background_Color$ = "Brown"
End If
If Combo1.ItemData = 9 Then Background_Color$ = "White"
End If
End If
End Sub

Private Sub Command1_Click()
BgType = 1
Unload frmBody
End Sub

Private Sub Command2_Click()
BgType = 0
Unload frmBody
End Sub

Private Sub Option1_Click()
Combo1.Enabled = False
Text1.Enabled = True
End Sub

Private Sub Option2_Click()
Text1.Enabled = False
Combo1.Enabled = True
End Sub





Public BgType As Integer
Public Background_Image_Source$
Public Background_Type$
Public Background_Color$






Please help me, this is driveing me insane!!!!!

Load Form To Display Information/more Records To Read/write New Information...
After the file has been read, what code would have to be done if the user wanted to edit another entry file from the mnu_file edit cmd?
is there anything else i'm missing here ?

<vb> Dim strLName As String, strFName As String, strAddress As String, intApartment As String, strCity As String, strProvince As String, strPostal As String, strMemo As String
Const conprompt As String = "Enter the Contact's Last Name"
Const contitle As String = "Contact's Last Name"
Dim strInput As String
strInput = InputBox(contitle, conprompt)
Dim strfilename As String
strfilename = App.Path & "contact.dat"
Open App.Path & "contact.dat" For Input As #1 'open sequential file
Do While Not EOF(1)
Input #1, strLName, strFName, strAddress, intApartment, strCity, strProvince, strPostal, strMemo 'read in from file
If strLName = strInput Then
gstrLName = strLName
gstrFName = strFName
gstrAddress = strAddress
gstrCity = strCity
gstrApartment = strProvince
gstrPostal = strPostal
gstrMemo = strMemo

End If

Loop

Close #1 'close the file </vb>


thanks!

Opening A Form Within A MIDI Form An Infanate Amount Of Times
Hello,
I am stumped right here at this point since this is my first time using a MIDI form setup.

My question is: How would I open the same form within a MIDI form an infanate amount of times, and on each new opening the form caption would change accordingly (ie.) Untitled 1, Untitled 2, Untitled 3.

Thank you for who answers


------------------
- M e n S h e n
Canabatech Programmer

Homepage http://influx.virtualave.net
Email essex@seedesigns.com
ICQ 17527422

Control Stays With The Parent Form Even After Opening The New Form
Hi,

I am facing a problem in my VB application.

Here is the issue:

I have one form "frmResult" which has the third party Thumbnail control and another form "frmImage" which displays the image. Here both the forms are MDIChild.

Now, whenever user clicks on the Thumbnail in "frmResult" form, "SelChange" event of the thumbnail Control in "frmResult" gets fired and it creates the new instance of the "frmImage" and displays image in it.

Though it seem that "frmImage" form has focus, but clicking on the "frmImage" form (keeping the opened "frmImage" form to it's default position) selects the thumbnail beneath the "frmImage" form and fires the "SelChange" event for the selected thumbnail control of "frmResult" and opens new "frmImage" form for the selected thumbnail.

What i have seen when i debug this issue is, "Deactivate Event" of the "frmImage" gets executed immediately and the control stays with the "frmResult" form.

What i want is once the "frmImage" form opened by clicking on the thumbnail that form should have the control.

Opening A Form/project From Another Form
is there anyway to open a form from another form. i don't mean show it. i mean as if the form was not running then you open it.

also can you do this with a project. can you open a project from a form.

thanks a lot

Opening 2nd Form From 1rst Form
i'd like to open a second form but keep getting unhandled exception

this is what i do
dim form2 as form
form2.show()

then i get the following message unhandled exception type system.nullreferenceexception

what is wrong??

please help

thank you

Problem In Opening One Form From Another Form
Hello All
I'm using VB 6.0,Windows 2000 and MsAccess.

I've following two forms:

1)Form1
in this form there is a button called Open.
2)Form 2
in this form i have used the Tab dialog control.There are 3 different tabs
Tab0,Tab1,Tab2
and each tab contains one frame,one grid,command buttons.

I've to do the following operation:

When user clicks the button "Open" in form1
form2 should be opened in the following format:
3rd Tab should be highlighted and
3rd tab frame should be visible and enable
3rd tab Btn1 and Btn2 should be visible.

I've the following problem:

Form2 is opened in the desired format but frame is disabled eventhough enable is set to true.
I've observed the following issues by putting the break points:

but when mouse is takes over the code:
1)me.frame.visible=true
it shows me.frame.visible=false
2)me.frame.enable=true
it shows me.frame.enable=true

but in runtime frame is disabled.


Kindly help me to solve this problem

Thanks in advance

Regards.

Opening Form Using Data From Another Form
I posted this in the wrong forum:
OK
I'll try to explain this correctly.
When I click on a certain line in my DBgrid from a certain form it must open this data in another form.
Ummmmm
Well it's claer when you know what I want.
Hope my question is clear enough as it is now.

Opening A Form But Not Give It The Focus (or Quick Tell Me Wich Form Has The Focus)
Opening a form but not give it the focus (or quick tell me wich form has the focus). Is this possible??

Getting Information From A Form
Hi,

I've never made an application with multiple forms before, so I'm having quite a lot of trouble at the moment! I'm using a Sub Main procedure when the application starts, which shows a splash screen while other events take place. One of the events I want to happen is to read the contents of a text box on one of the other forms, but I don't want this form to be visible.

This is probably very simple but I haven't a clue how to start.

Thanks.

Getting Information From Another Form
Is there a way to gather information from another form of that project?

Information Form/box
In VB6:

I have a form that takes a bit of time to prepare for display. I wish to display a message asking the user to be patient while the data is prepared.

I've tried a msgbox but that requires a button push which is not what I want. I created a simple form with a label asking the user to be patient, but when I show the form initially when the main form is being populated, the simple form remains see-through so no message can be read so that isn't the way to go either.

How can this be done?

Thanks,
Ken

Getting Information From A Form
Hi,

I've never made an application with multiple forms before, so I'm having quite a lot of trouble at the moment! I'm using a Sub Main procedure when the application starts, which shows a splash screen while other events take place. One of the events I want to happen is to read the contents of a text box on one of the other forms, but I don't want this form to be visible.

This is probably very simple but I haven't a clue how to start.

Thanks.



Edited by - lvfrenchflair on 9/16/2004 1:17:44 AM

Sending Form Information?
i have a form named FormSomething and i wish to reference to it in a few subprograms. but instead of having to hardcode the name of this form into each time i use it i want to use a generic name for it. let's say, FormStore.
so i would do this.

set formstore as new formsomething

so now formstore should be the same as formsomething, correct?

but here's the problem.
if i have a label control on formsomething called lblsomething it is not referenceable in formstore. none of my controls are. ? ? ? ?

Anyone For Saving Form Information?
I am using the CommonDialog control to save data of all controls from inside a Form. Which I already know about that. But the fact of the matter is that I need to save the information about if either Form2 or Form4 is visible and then record the information into the file using the Print statement.

Then when the time to open the file using the Open statement, the file will tell the program to jump to that form with all of the information in the right place.

Inserting Information Into Web Form From Vb App
hey guys/girls does anyone know of a way that you can insert information into a form on the web by a click of the button on a vb app. something like the autofill feature of the google toolbar for IE. also after you would insert the information be able to click the submit button. please let me know.

Accessing Information From One Form To The Other
I have two forms. One text box on each form. One command button on the second form. When I click the command button, how do I get the information that is in the textbox on the first form, to the second?

Processing Information From Web Form
I have a Form maked in HTML, how i can make a program in VB that take the informacion on that form and store it on a database?

thanks

Printing Information From A Form
Hi everyone,
I have a form that I need to print the information that it contains.
I have put a command button on the form. I need it to print when it is clicked. Does anyone have any ideas.
Thanks in advance for your help.

How Do U Save The Information From A Form...
I am creating a very simple program. It consists of text boxes. I just want to be able to save the information typed into the different boxes. I want to be able to save the information to the forms and then start over and save different info from the same form.

Once the information is saved, I want to be able to print the different saved information but this is my second priority. Right now I just want to know how to save the forms info and save different info (without loosing the original information). I am new to VB so please try to make the explantation as simple as possible. Thanks.

"I repeat: This is not a drill. This is the apocalypse. Please exit the hospital in an orderly fashion. Thank you."
-----------------------------------------------------------------------------------------------------------------------------

Saving Form Information
I have created a form that contains text and check boxes. I can't figure out how to save the information that is entered in the fields to a file for later use. I want to save the entire form layout and the text entered in the fields. The user should then be able to open the saved file and the form will pop up with the text fields filled in. Any help would be great.
thanks

Reading Information From A Form.
Hello all,
I was wondering if anyone knows of a way to read the information of a form the moment an ActiveX control is placed on it. For instance, getting the "Name" of the form so it can be added to a list of objects.

Any advice/help is greatly appreciated,
Thanx
ziggy2004
Cheers

Printing Form Information To Word
Hey,

I am currently making a program which prints an invoice to Microsoft Word with the details that are on the form.

There are options on the form to have various parts in bold etc...

I am using the Print command to take the details and put them into word, everytime I do this it seems to convert the .rtf file into Plain Text Format and therefore the formatting doesn't work.

Can anyone help me with this, been looking for days for a solution but nothing around but how to print to a normal .txt file.

I am working in Visual Basic 6 and not VB through Word, I am aware of the Macros you can use through Word.

Help plz

How Do I Load Information Form A Spreadsheet Into VB?
I am trying to create a game like who wants to be a Millionaire using VB. I want to be able to store the questions and answers in a spreadsheet so that the questions will be randomly picked from there cells and put into the appropriate option box.

If anybody has any idea how to help me please reply.

Cant Populate Information To Webite Form
Hello,

I am trying to learn how control IE from VBA. I looked throught the forums here and coppied code. I loaded the "microsoft internet controls" and the HTML object library to my refrences. I keep getting the runtime error that the "Method 'Document' of object 'IWebBrowser2' failed."

Two things stand out to me

1) what is "IWebBrowser2?"
2) Why is this message the only place that document is capatilized?

Any help is appreciated

Getting Form Information From An ActiveX Control
Hi,
I have a MDI ActiveX Control that I need to pass 2 items of information to, tab name and tab color.

The ActiveX Control uses subclassing to know when a MDI child window is created. It then uses the GetWindowText API to get the child caption. It then displays the child caption as the tab name.

I tried amending the color of the tab to the caption like so:

childForm.Caption = "My Tab | 1345453"

From this I can split the string and get both the caption name and color value. Problem is in the taskbar it displays as:

My Program - [My Tab | 1345453]

----------------------------------------------------------------

I need a way to either get the taskbar to display only "My Program" all the time, or find another way to pass the color information.

I can't simply change the child caption to "" because the color information is needed for redrawing.

If anyone can suggest anything, it would be greatly appreciated.

Codes To Printing Information In A Form
I would like to send all the information in a form for printing. The informations are all displayed by LABEL. How do I print all information in all the LABEL?

Can anybody help me out?

How To Save Form Information Not In A File?
I wish to save information like "Text1.Text" from inside the program and not in a file. But when you click on default settings then those settings will be lost.

Populate The Most Recent Information In A Form.
I need help. I am trying to populate the last entered data in my form.

The functionality has to work in the following order

As soon as the user enters the ID for a form, all the information last entered must be populated in the designated text boxes. This information must be grayed. Then it should allow the user to re-write on the information populated and update the form when the user clicks update.

Can some one please help?

Thanks
Namita

Printing Out Information In Textbox On A Form ? ?
I have a form using VB 6. On the form are textboxes that the user
has entered information in. I want to allow the user to press a print button
on the screen and this information printed to a printer.

How do I do that? Is it possible?

Thanks for any and all help.

Pulling Information From One Table Into Another Form
does anyone know how I can automatically populate a text in a form with information from another table.

I have a database where on my main form there is a textbox call 'procurement'. When a vendor is entered on the form...(afterupdate) the textbox 'procurement' will populate with a atatus (such as parnter or nonpartner). this info resides in another table on the same database. It will work if I used this info as a subform. but i just want one text box to from the whole table.

can anyone help?
Thanks

Problem Posting Information To A Web Form
This is my first post, so please be gentle.

I've been having trouble creating an app. that will allow people at my university to automatically log people in to our school's network authentication system. They school's system logs people off the internet every so often at random intervals, disabling all connections w/ the outside world. I have gotten the program to work successfully in all aspects but one: I can't get the data to properly post to the form (that's the clincher!). Below is a watered down version of what I'm trying to do (but it still gets the same error):
------------------------
Function Logout(resnet)
On Error GoTo ErrorMsgbox:

strHTML = "<form name=logout action='https://ip-nexus-" & resnet & ".uark.edu/login' method=POST>" & _
"<input type=hidden name=log value=no>" & _
"<input type=text name=name value=-logout>" & _
"<input type=password name=pass value=none>" & _
"<input type=submit value=logout>" & _
"<SCRIPT>logout.submit()</SCRIPT>" & _
"</form>"
 
WebBrowser1.Document.write strHTML

Do
   DoEvents
Loop Until WebBrowser1.Busy = False

ErrorMsgbox:
MsgBox ("Error " & Err.Number & ": " & Err.Description)
Resume Next

End Function
--------------------------------

The above function is called from a timer and is passed the resnet parameter. strHTML is derived direcly from the HTML on the website where we are logged out. Whenever it gets to WebBrowser1.Document.write strHTML it causes an error. The error message says: "Error -2147467260: Operation Aborted". The Resume Next makes it go to the do/while loop, which then gets an error that says "Error 0". Any idea why I am getting this error? If I just put "On Error Resume Next", it still causes an error which gets ignored and the form never gets posted either. Any ideas about this would be greatly appreciated.

Thank you.

Printing Information From Looping Form
Hello,
I am trying to Print some data from a form that loops. It does wonderfully the first time through (as expected) but when it repeats, I get an error.
My code for all entries reads now as:
If i = 1 Then
Print #1, text & " " & "text"
Load frm
frm.Show
Else
Print #1, text & " " & " other text"
End If
Print #1, " "
Close #1

I have the document As Append so I'm not sure what I'm doing wrong.
Please help! This is for a Master's degree and a trip to Vienna (for me).
Thank you!

Opening A Form Within A Form
This is my first post and I'm a beginning programmer. In one of my programs that I am doing in my Adv. Apps Class is to make a logon screen and then have 3 hints. I have the hints setup in the Drop-down menus at the top and would like to know how if the user clicked that hint menu, I would open up another window with that in there. (I don't want a message or input box)

Opening A Form Within A Form
Hello,

How do I open a form within a form? I have a form called "frmHelp.frm" and when a user clicks on the "Help" button, I want the "frmHelp.frm" to load up within the main form.

Thanks

Opening A Form From Another Form
Having just started VB, I get easily confused by all the big words, so to anyone answering: please make it simple! (I'm only 17yo, if that helps)

OK: I really, really can't be bothered using MDIs/child things, etc, is there another way to open another form separately (using Private Sub Command_Click() )?

If you need more detail, I've made an animal survey, and I want a button to lead to another survey that I've made.

Please help, or else I'll give up and go and cry in a corner.

Putting Information In TextBox On User Form
I am pulling information from a spreadsheet into two separate textbox controls on my form. After the user enters the month, an afterupdate procedure runs. The procedure opens the workbook, searches for the matching date, assigns two cells to different variables, and then repaints the form.

It all works correctly, except that the numbers are being rounded. On the spreadsheet, the numbers have up to six decimal places, but when the macro sets them to the variable, it rounds to only four decimal places. This causes a variance later on, so I was wondering what I need to do to fix this.

Thanks!

Accessing Form Information In Embedded Browsers
I want a button that is in my app to access the embedded browser window and click on a button according to its value, name or combination of those values. I am having trouble accessing the browser window with browser.document... commands.

By the way, I already know how to do it with focus and sendkeys, it's just that I need the app to be able to send it even when minimized.

I found some relevant code:


webBrowser1.Document.GetElementById("NAME").SetAttribute("Value", "username")
webBrowser1.Document.GetElementById("PASSWORD").SetAttribute("Value", "password")
webBrowser1.Document.Forms[0].InvokeMember("Submit")

The top two lines work, but the bottom one does not.

Okay, figured it out. Now, how do I check if the button exists on the page before pushing it? That way, I avoid crashes.

VBS Coders!,need To Input And Save Information To Form?
hi iv been searching the internet and cannot find VBS tutorial or code that will allow me to have 2 text boxes and a submit button. Once the submit button is clicked the information is stored on the page for all to see (preferably each entry will be listed alphabetically) so the end result you would have


<first text box displayed> : <second text box displayed>

(alphabetically if possible)

Adding And Retrieving Information Form Zip Files
I have a zip file that is password protected with information that my program will use, my problem is that I don't know how to add and retrieve information from a zip file. I'm using a zip file with a renamed extension (.2k, still a zip file) to prevent the users from messing with files that are assonated with the program. Can someone help me?

The Adodc1 Delete My Information Form The Database ??
peace be with you

i make small project using ( adodc1 - combo1 - 2 text )

i make a connect between ( adodc1 & combo1 ) after "run" all the data in the database delete and be empty !!
i use this code for showing :

Code:
Private Sub Form_Load()
Do
Combo1.AddItem Adodc1.Recordset("name")
Adodc1.Recordset.MoveNext
Loop Until Adodc1.Recordset.EOF = True
End Sub

how i can make the ( adodc1 & combo1 ) show the data and not delete

thanks

Simple Order Form And Way To Store The Information
I understand how to create a database in MS Access and use VB6 to create an interface for a user.  However, I am interested in developing a VB6 order form User Interface and connect it to simple spreadsheet to hold the order information.  Can I connect my user interface to flexgrid?  I do not want to use SQL, foxpro, or filemaker Pro.  Thank you.

Data Connection Newbie - Querying Information On A Form
I am new to data connections, but fairly proficient with Access.

For examples sake, I have a database with a table listing departments, and another table listing employees within a company.

basically, I want to be able to select a department from a drop down, and have a list box display the employees associated with that department.

I have a funny feeling I am missing something very basic in doing this.

Any help would be appreciated.

Steve

Copyright © 2005-08 www.BigResource.com, All rights reserved