Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
mainform
- Page 1
Error: 'document.mainform.unknownHw' is null or not an object
Programming
Web Development
15 Years Ago
by albertkao
…' is null or not an object? function setUnknownHw(unknownHw) { document.
mainform
.unknownHw.checked = unknownHw; } <div class="special">…; <form name="
mainform
" id="
mainform
" action="display.htm" method="…
Re: Error: 'document.mainform.unknownHw' is null or not an object
Programming
Web Development
15 Years Ago
by almostbob
… class="special"> <form name="
mainform
" id="
mainform
" action="display.htm" method="…
Call a method in the mainform when a global hotkey is pressed
Programming
Software Development
15 Years Ago
by sourcez
Hi all, What's the best way to either 1) Hide and then show the
mainform
or 2) Call a method(?) in the
mainform
using a global hotkey? I've currently got it working such that a hotkey in program.cs will simply create a new instance of
mainform
but this is not what I want. Thanks!
How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by SoftwareGuy
…has a reference to ProjectB. ProjectA has a file called
MainForm
.cs, which contains a textbox and the main UI. ProjectB…do is catch that text and set a textbox in
MainForm
.cs to that text. Is there a way we … like to do something like this: [CODE]( Shape1.Parent as
MainForm
).TextBox1.Text = Shape1.Name;[/CODE] , assuming the user types …
Re: How to pass a value from dialog to mainform?
Programming
Software Development
17 Years Ago
by Ramy Mahrous
… button which open this dialog which exists in
MainForm
initialize new dialogForm object then get its string … has the value of the texrbox
MainForm
has global object from DialogForm [code=c#] class…
MainForm
: Form { DialogForm dialogForm; On MainFormButtonClick { dialogForm = new …
Re: Error: 'document.mainform.unknownHw' is null or not an object
Programming
Web Development
15 Years Ago
by Airshow
Albert, It works fine in IE6, FF and Opera. I can only guess that [ICODE]document.
mainform
.unknownHw[/ICODE] doesn't exist or is not in scope at the point where you call [ICODE]setUnknownHw[/ICODE]. [B]Airshow[/B]
How to pass a value from dialog to mainform?
Programming
Software Development
17 Years Ago
by yonderboy
… that is not very explanative and simple. I have a
mainform
(form1) and a custom made dialog (form2). Form1 has a… into Textbox1 and want it to pass it to the
mainform
to Label1.Text The problem as I understand it, is…
Re: How to pass a value from dialog to mainform?
Programming
Software Development
17 Years Ago
by yonderboy
… realize some things. When I push the button in the
mainform
that causes the dialog to show up, I am creating… main form and asign it to a label on the
mainform
. Tha also indicats that the dialog instance does not cease…
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by SoftwareGuy
Thanks for the advice, but it won't let me select the file. The Browse for files only filters files of type: "Component Files (*.dll; *.tlb; *.olb; *.ocx; *.exe; *.manifest)." Am I supposed to look for
MainForm
.cs?
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by SoftwareGuy
…]--------------------------- Microsoft Visual Studio --------------------------- A reference to 'D:\Projects\Diagrams\Diagrams\
MainForm
.cs' could not be added. Please make sure that the…
Prevent user from saving the mainform without filling the subform
Programming
Databases
15 Years Ago
by asha3010
Greetings, I am creating a data entry form with a subform. Currently I am able to save the
mainform
without filling out the subform. What needs to be done to stop the user from saving the main form with the subform blank? Thanks in advance Asha
Re: Call a method in the mainform when a global hotkey is pressed
Programming
Software Development
15 Years Ago
by Diamonddrake
you need to override the WndProc method of your form, and be sure to register your hotkey using that form's handle. then you check for the hotkey id in the wndproc and call any method you want to there.
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by Mitja Bonca
You have to add a reference of the project you want to access to (right click on References in solution explorer, then select Add Reference, then select Browse tab and look for appropriate file in the project you want to access). Then Add this reference on the top on the class you want to access from (using YourProjectname). Then you should see the…
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by Mitja Bonca
vshost file (in program/bin/debug)
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by Mitja Bonca
This is what you have to do exactly: 1. The first step is to make P2 reference P1 by doing the following: Right Click on the project and select "Add Reference"; Go to the Projects Tab (or Browse Tab); Look for P1, Select it and hit OK; 2. Next you'll need to make sure that the classes in P1 are accessible to P2. The easiest way is to …
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by SoftwareGuy
Thank you for the clear steps. Makes sense, but VS won't let me, since P1 (the start-up project) already references P2. It says, [CODE]--------------------------- Microsoft Visual Studio --------------------------- A reference to 'Diagrams' could not be added. Adding this project as a reference would cause a circular dependency. …
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by Mitja Bonca
You can only reference in one way otherwise you get the error like you said. Just do this: delete the reference from your DAL to your BL and make a new one from your BL to your DAL!
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by SoftwareGuy
I'm sorry I'm still a beginner at this. What are "DAL" and "BL?"
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by Mitja Bonca
[QUOTE=SoftwareGuy;1780794]I'm sorry I'm still a beginner at this. What are "DAL" and "BL?"[/QUOTE] never mind, do it this way: [CODE]//assembly 1: namespace Mar14_Part1 { class Program { static void Main(string[] args) { } } public class MyClass { public string…
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by SoftwareGuy
I got this example. I think I should be able to apply it to my app. Thanks for your help.
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by kplcjl
OK, you found a solution, but nobody suggested a delagate. I tried to build a puzzle solving code and display intermediate results and display them on my WinApp form. Didn't do a thing. Turns out, the form thread has to be idle to display changes and I wanted intermediate results not the final ones. Now the puzzle solving app (PA) is completely …
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by SoftwareGuy
Thanks for the input, kplcjl. My boss did not agree that I do it the first way and had me do it with EventHandlers. Inside the main sub-class event he had me call this: [CODE] public event EventHandler ShapeValueChanged; if (ShapeValueChanged != null) ShapeValueChanged(this, new EventArgs()); [/CODE] and then in the main form: [CODE]…
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by kplcjl
EventHandlers are one form of a delegate. ShapeValueChanged is the delegate. The following is the subscription of the delegate to the Form1_ShapeValueChanged method: ShapeValueChanged += new EventHandler(Form1_ShapeValueChanged); The forms detects an event change and calls the event handler ShapeValueChanged which calls all the …
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by SoftwareGuy
Awesome. Thanks a lot for the clarification. I really appreciate you spending the time giving further information.
Re: How can I access the MainForm from within a class in a separate project?
Programming
Software Development
13 Years Ago
by kplcjl
Actually, I misread what you had. Your second class IS the event handler, your form subscribes to the event delegate and at the same time makes it not null in your class so it can pass the event back to the form.
Re: How to pass a value from dialog to mainform?
Programming
Software Development
17 Years Ago
by Narue
>when I close the dialog, the instance of that Form2 form does not exists anymore Not quite. Here's a common idiom that I see and use for dialogs: [code=csharp] MyDialog dlg = new MyDialog(); if ( dlg.ShowDialog() == DialogResult.OK ) { // Filling a text box, for this example this.textBox1.Text = dlg.ResultText; } [/code] ResultText would …
Re: How to pass a value from dialog to mainform?
Programming
Software Development
17 Years Ago
by Narue
>Please correct me if my understanding is not correct It sounds good to me.
Web Form Issue
Digital Media
UI / UX Design
14 Years Ago
by worldoflefty
…gt; </li> <li class="
mainForm
" id="fieldBox_2"> <label …gt;</li> <li class="
mainForm
" id="fieldBox_15"> <label…()) { collapseElem('mainForm_1'); expandElem('mainForm_2');}" class="
mainForm
" value="Go to page 2"/>…
Applet / Array help
Programming
Software Development
19 Years Ago
by dmgs11
…(Color.blue); setForeground(Color.yellow); JPanel
MainForm
=new JPanel();
MainForm
.setLayout(new GridLayout(0,3)); JLabel label1…new JLabel(" Principle ",SwingConstants.RIGHT);
MainForm
.add(label2);
MainForm
.add(appPrincipal); JLabel label3=new JLabel(" Interest…
Re: Applet / Array help
Programming
Software Development
19 Years Ago
by dmgs11
…(Color.blue); setForeground(Color.yellow); JPanel
MainForm
=new JPanel();
MainForm
.setLayout(new GridLayout(0,3)); JLabel label1…new JLabel(" Principle ",SwingConstants.RIGHT);
MainForm
.add(label2);
MainForm
.add(appPrincipal); JLabel label3=new JLabel(" Interest…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC