i want to specially designed form for my vb.net application.
i am designed one form. it is border less form.
now i want use it use as form template instead default windows form.
can it use as user control.
sorry my poor English
Related
I want to include another form in my code instead of constantly contacting the other form and making the form move with each other, which takes a lot of time to code in each form. And now I need something that takes less time and is much easier to do, like putting one windows form inside another windows form
EDIT: Unclear Question
I want to display a windows form inside another windows form,
just the same functionality as an Iframe in HTML, but instead
of including a web page I want it to include a form
MDI interface would be best, but if you really want to do this then look at this : (formFrame is the form that is shown inside formHost)
formFrame.TopLevel = false;
formHost.Controls.Add(formFrame);
formFrame.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
formFrame.Dock = DockStyle.Fill; // can be different for you needs
formFrame.Show();
I have a set of controls which are added dynamically to a panel. The number of controls depends on which tab a user selects from TabPage control, which is embedded in a form.
At the moment, the controls don't appear in Designer, but appear during execution.
I managed to display controls for other forms which are not dynamic by moving the non-design code to the vb file, but how can I display the other ones?
The only answer that I know of is to add your code in the .Designer.vb file of the Form.
BUT! I strongly advise you to avoid that if you are not sure how it works! Custom code in the .Designer. files can break your form design and project with possible random crashes.
Also, your code can be changed and removed by the Visual Studio designer:
Custom code in designer.vb file goes away when making edits in design mode
Instead, you can make the panels into custom user controls and add those to the tabs.
I am trying to create a user control and custom designer. The perfect example of what I am trying to achieve in design time is how the menuStrip allows you to enter the text of the item being added.
This tells me it is possible, but I do not know if they are just drawing a box/cursor and just handling the key events individually or if they are using a textBox control in the designer somehow.
Is there a way to use controls in the designer during design time?
Question:
In .NET do you have any criteria that qualifies a certain form to be the startup form?
Example:
For example, if I have a basic calculator program and it has 3 forms
namely frmConfig, frmCalculator and frmProfile.
frmConfig - The settings page, includes whether I should automatically round off or out put the whole decimals, etc.
frmCalculator - The main page, the calculator itself where you can do all the calculations that you want.
frmProfile - The login page, you can see the history of your calculations here.
Notes:
From that 3 different kinds of forms how do I properly choose the
startup form?
Does it mean that the startup form should always be the first form to see
when the application is running?
Because for example I can make the frmConfig as the startup form then on OnLoad event of it it will hide itself then open the frmCalculator because frmCalculator depends on frmConfig's default setting.
To make this question not broad I am looking for the most common way of setting up the startup form, maybe there is a standard way?
You can set your startup form by accessing the My Project from the Solution Explorer, then going to the Application page
Image: Choosing startup form
I want to show a MessageBox in a VB.NET application that has special markup for its text. More specifically, I want to display an unordered list. I tried doing it by wrapping the text in HTML tags (which Java Swing supports for example, if I'm not mistaken) and working with <ul> and <li>. This did not work. I can't find anything on the net about it either...
The textbox is used in a normal Windows forms application.
Does anyone know how to do it without creating a completely custom messagebox class?
As Hans Passant says, this is not possible with the default MessageBox in VB.NET.