VS 2008 Mimicking A Dialog Form Using A Panel?

Aug 6, 2010

I'm developing an application that should run on a 'kind of' mobile device. It's not exactly a mobile device (hence I'm not developing in the mobile framework, just winforms), but I can't use various Forms either.

Right now I am working on a proof of concept, and I simulated the mobile device simply with a UserControl that has a fixed size. Everything needs to happen on that UserControl, and I cannot display any other forms.

However, I now need a 'Dialog Form' to let the user enter some data (mainly text but it doesn't really matter). What I'm doing now is simply showing a Panel with a TextBox, OK button and Cancel button. I bring that panel to the front, hiding the rest of the application, when required. The different Panels (there's also one for a CheckBox, ComboBox, and the main application is also on a Panel) are all on a 'PanelContainer' UserControl I made, and I can switch panels simply by specifying their 'key' (a string such as "TEXT", "CHECK", "COMBO" etc). So I can display the textbox panel by simply doing

panelContainer1.SelectedKey = "TEXT" That brings the textbox panel to the front.

What I want now is that I can 'show' the panel as if it were a Dialog form. That means that the code 'waits' until the user has entered his text and either clicked OK or Cancel. Then I could use it like this

' Show the panel here
Dim result As DialogResult = panelContainer1.Panels("TEXT").ShowDialog()
' and immediately use the result (the code won't come here until the user has selected ok or cancel)

[Code]....

View 14 Replies


ADVERTISEMENT

Panel Updating With The Dialog Box Text?

Mar 23, 2010

I have a dialogue texttbox to enter new texts, what code shall i use in my MainForm so that the panel control- systems.windows.form.panel (which I have on the mainform) gets updated with the text which i entrred in the dialogue box text field.

View 4 Replies

Passing Information Between Forms/dialogs (Form -> Dialog -> Dialog)?

Dec 22, 2009

I often use the process of displaying a dialog from a form, with the dialog user input then used to update the main form without any problem. In a new scenerio I launch the main application screen, I then show a login dialog ontop of the main app screen and can launch another dialog from the login if a new user is required. The plan is to update the login dialog (updating a combobox to reflect the addition of a new user) from the new user dialog.

See code below :-

'Update login forms user list as new user added successfully
frmRoomBookingLogin.cboLogin.DataSource = Nothing
frmRoomBookingLogin.txtPassword.Text = "Updating password from dialog"
MessageBox.Show("The password text is " & frmRoomBookingLogin.txtPassword.Text)

[code]....

The messagebox implies the dialog has been updated yet the text does not change. Is it possible to update the dialog when using a setup such as Form -> dialog -> dialog? I'm intrigued as why the dialog does not reflect changes. I have never refreshed/repainted the dialog as never required to in my other examples when updating a form from a dialog and never encountered a problem when using a two tier form setup.

View 2 Replies

VS 2008 Open A Form In A Form Panel?

Nov 20, 2009

Is there a way that I can open up a new form in Panel2 of my main form?

View 1 Replies

Mimicking Does A Simple Calculation Where It Takes Key And Plain Text Characters

Jan 31, 2011

I am trying to mimic an encryption application. The application I am mimicking does a simple calculation where it takes the key and the plain text characters 7 bit ascii code and xor's them together. If the two spots in the code are = then it returns a 0 if it is ~ then it returns a 1. I have tried several code snippets for xor and none of them produce the results I want. I have only taken a couple programming classes so I get lost easy. This is what I have so far. My goal is to decrypt something encrypted by the program I am replicating using a password generator to come up with the key.I already have the binary for the encrypted text from the program I am copying. So I need to convert the key into the matching binary format. I used this snippet for that. [code] When I run this as is I get a much longer result than I should. If I use an "a" as my key and "00000000" as my cipher bi the result is "0011000000110000001100000011000000110000001100000011000000110000" when it should be "01100001".

View 14 Replies

VS 2008 MDI Child And A Dialog Form?

Jan 19, 2010

I'm having trouble with MDI child and a dialog form. The problem details are listed below:

1. One MDI Parent form (Form1) with a button on it (Button1).

2. One Child form of Form1 (name = Form2) with a button (Button2) and a textbox (text_box1).

3. Another form in the project (not child of Form1 and not MDI Parent) with name Form3. This form has also a button on it (Button3).

The application behaviour is as follows: the application starts with Form1. Clicking the Button1 will show Form2. Form2 correctly opened as a MDI child. Clicking the Button2 on the Form2 will show Form3 as dialog (Form3.ShowDialog() ). Clicking the Button3 on the Form3 need to do the magical thing - to set/change the text in the Form2's text_box1.

Tried various examples from this forum. Also followed a lot of examples from net. Nothing works. Tried to create a writable property in the Form2 class but calling it from the Form3 does nothing.

I tried to access the MDIchildren(ss) while ss loops in MDIchildrens array but I don't know how to access the label control inside the Form2 using this technique. Successfully changed the Form2 caption but no controls are available in VB intellisense - practically correct because VB don't know which form from array I'm referring to.

View 7 Replies

VS 2008 : Show Dialog In Splash Form?

Apr 6, 2011

i have form1 and form splash..i used the splash as processing indicator i place gif in the splash form...and in form1 i call the splash in separate thread..

like this..

Dim splashthread As Thread = New Thread(New ThreadStart(AddressOf SplashScreen.ShowSplashScreen))
splashthread.IsBackground = True
splashthread.Start()

[code]....

now,my problem is when form1 is loaded and click button process in it..the splash form will not display modally...is it because i called the splash in separate thread?..

View 4 Replies

VS 2008 Way To Create FolderBrowserDialog IN Form Not A Pop-up Dialog

Jun 29, 2009

I was wondering if there is any way to create a FolderBrowserDialog IN the form, not a pop-up dialog.I was looking around and I found that I can do this by the extension provider.I can inherit the FolderBrowserDialog since it's not a control.[code]

View 5 Replies

VS 2008 Panel & Datagrid Sizing According To The Form?

Apr 23, 2009

I am wonderring if there is a way the panels and the datagrid would get bigger according to the form? I need the panel to fill up the form. Because I got the form sat to whatever the users resolution is to a full screen, controls should follow accordingly

View 2 Replies

VS 2008 Save The Default Color That The User Changes Via The Dialog Box On A Form?

Feb 16, 2011

I am trying to save the default color that the user changes via the dialog box on a form.

I have started the code as I thought below.

Private Sub btnColour_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnColour.Click
If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then

[Code].....

View 2 Replies

VS 2008 Make Main Form Inaccessible Until User Closes Dialog Box?

Apr 11, 2010

A program I'm developing launches dialog boxes to get information from the user. Right now, the user can still click on and manipulate the main form while the dialog box is open. How can I make the main form inaccessible until the user closes the dialog box?

View 2 Replies

2 Panels On The Form - Panel One To Slide Height And Panel 2 To Slide Width

Oct 24, 2009

Im using this code

Private Sub Form1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter
For i As Integer = 38 To 2 Step -1
Panel1.Height = i
Next

[CODE]...

I have 2 panels on the form butttt for panel one i want to slide height and panel 2 i want it to slide width.

View 4 Replies

Panel Alignment - Center The Red Panel In The Middle Of The Dark Grey Panel ?

Jun 6, 2009

I need to center the red panel in the middle of the dark grey panel, when you resize the form the red panel should be in the middle, and the red panel can't be resize, anyone have a code or property to do this?

View 2 Replies

VS 2008 SplitContainer - Display Another Form Inside The Other Part Of The SplitContainer Which Is Panel

Nov 10, 2009

I am having a problem figuring out one thing with my program. It's about SplitContainer. To elaborate, I put a SplitContainer on a form. It divided my form into two parts, which I wanted. On the left side panel there are buttons, and when I click on a button I would want to display another form inside the other part of the SplitContainer which is Panel2.

View 17 Replies

Calling Showdialog() On A Form - From The Main Form's OnLoad Event Makes The Modal Dialog Go Away After A Few Seconds?

Aug 7, 2009

I'm having an interesting issue that I can't reproduce on a different project, but can consistently on this one. I have no clue what might be causing it, but am hoping that someone may have seen it before.

I have a main form, from which I run a series of checks. On this form, I have a listview control. Because of some issues with the refreshing of this listview control, I had to create my own messagebox. It's just a form that displays some text ( it also happens to look nicer than MsgBox; in my opinion, anyways ). It's been working great for months, until recently.

My problem is that on my main form's load event, I run this check, which returns an error within a try/catch block. I then call my custom messagebox with a message. It in turns calls it's ShowDialog() function.

In any other situation ( after the main form has been loaded ), I have no problems. The messagebox goes on the screen and behaves appropriately ( ie: waits for my input and acts as a modal dialog ( stops execution of my main form's thread ) ). However, on this onload event, my messagebox comes up and goes away almost immediately afterwards.

I've traced it all the way to the showdialog() call. For no explicable reason, it appears to skip right over this call, without me doing anything on the form.

Here's what the inner trace looks like ( when I put a breakpoint on the onclosing event for this messagebox form ):

CODE:

View 10 Replies

Find When Dialog / Modal Form Is Shown For My Main Form?

Feb 3, 2010

I want to be able to check if there is currently a dialog or modal form shown for my form so that I can close it.
Is there a way to do this?

View 1 Replies

Allow User To Move A Top Form Within The Boundary Of A Bottom Panel Or Form?

Jun 30, 2009

I have one form lays on the top of a form or a panel. I would like be able to drag the top form within the boundary of the bottom form or panel. How can I do that?

View 4 Replies

Mdi Form And Show Form - Error "Form That Is Already Visible Cannot Be Displayed As A Modal Dialog Box"

Jan 26, 2010

I'm new in .Net and I have an application with windows form "LOGIN" When users enter the user and password and click "ok", then if user passes validation then I have the code Show(MDIMainMenu) (I'm trying to open an mdi form), but I receive the following error: "Form that is already visible cannot be displayed as a modal dialog box. Set the form's visible property to false before calling Show. Error Number 5"

[Code]...

View 2 Replies

[2005] How To Use Bindingsources From Main Form On Dialog Form?

Mar 2, 2009

My project has a single dataset with about 6 datatables. Each of those datatables has a TableAdapater and a Bindingsource on the main form (due to various databound controls).

Now, I want to have a second form for adding a new record. If I bind the controls to the datasource it creates new TableAdapaters and new Bindingsources on that form. I was wondering if it's possible to simply use the ones from the main form instead like this

[code...]

View 3 Replies

Place A Form In Panel With Operations Performed On Form?

Mar 4, 2012

I have been trying to place a form inside a panel. This has been achieved by[code]...

In the IterationForm, I have values being calculated and displayed as and when an operation is being performed.

In the panel it shows only the blank form. I need to have those values displayed as well.

I have tried using MDI parent with my menustrip1, same thing, that is the form being displayed without the values.

View 3 Replies

Add A MDI Parent Form To A Panel On A Base Form

Jul 13, 2009

I want to add a MDI parent form to a panel on a base form, the problem is that i must set the toplevel = false when add the parent form to the base form, but if i set its toplevel to false i can't set isMDIParent parameter to true. how can i fix this conflict?

View 1 Replies

Use Panel Of One Form In Another?

Oct 12, 2010

I am having two forms say form a and formb and having two panels in formb and i want to show this panels from forma based on some condition and the code which i am using is[code]...

View 7 Replies

Create A Form Dialog?

Aug 4, 2009

How can i create a form dialog. I mean when that form show, then i click to other form, form dialog still show and behave like a dialog.( when lost focus , dialog alway focus).

View 2 Replies

Keep Focus On A Dialog/form?

Apr 2, 2010

Whenever you have a messagebox, it grabs attention from your main window and doesn't let you click back into your form until you hit okay.I want to make a form that does kind of the same thing. I have this for that shows download progress and I don't want the user to be able to click back into the main form until the download form is finished.

View 4 Replies

Use A Form To Dispaly As A Dialog Box?

Feb 1, 2009

Public Class frmStudentScores
Private Sub btnAddStudent_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAddStudent.Click

[code]....

The Form that I'm trying to get to Display as a Dialog box is AddNewStudent1 but I keep getting an error that says AddNewStudent1 is not defined.

View 3 Replies

Use A Form To Dispaly As Dialog Box?

Apr 22, 2009

[code]...

The Form that I'm trying to get to Display as a Dialog box is AddNewStudent1 but I keep getting an error that says AddNewStudent1 is not defined.

View 12 Replies

Anchor A Form In Panel?

Sep 18, 2011

I am trying to Anchor a Form (Top, Bottom, Left & Right) in a panel.

I have tried:

frmFnct.Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Bottom Or AnchorStyles.Right

This doesn't error but as the parent Form is re-sized, the panel re-sizes but the Form that is loaded in the Panel does not re-size.

I guess I can use the Parent Forms Resize Event and size the form to the panel dimensions but just wondering if there is a way to use built in functionality?

View 17 Replies

Form Moving Using Panel

Mar 26, 2011

Taking the following code into the account: [code] This makes my entire form client area act like a cpation bar and i can darg it using any any part of it! Becuase i had a borderless form that is why i used this code (which is definitely not mine - no offense) . This works perfect in windows 7 but in lower OS versions it acts weired like even if user makes little dragging on the form occasionally this triggers and takes the form out of the bound of screen! I was wondering can i alter the above code somewhat like instead of intercepting the form area as caption bar it detects a panel (docked at the top giving illusion of a caption bar) and make that my form move. I know you brothers will make me say that using the mouse down mouse move and mouse up events of panel i can attain this, definitely i can but thought of some more professional approach. url...

View 4 Replies

Open All Form In Panel?

May 16, 2012

how to add all windows form on the same panel in vb .net?

View 7 Replies

Picturebox Over The Form Or Panel

Jul 22, 2009

My name is DN and I'm creating a strategy game. I have created a panel and I have put a PictureBox on it. Now, the problem is here: The PictureBox is bigger than the panel. I know that we can solve the problem with putting to the panel two scrollbars, but as in a good game scrollbars should not exist in the main picture (map). I want for the people to control the map with keys (up,down,left,right) and the scrollbars should not be visible.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved