-
Mar 23rd, 2010, 05:58 PM
#1
Thread Starter
Member
Panel updating with the Dialog box Text
Hi, Can someone please help me.
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.
Thanks
-
Mar 23rd, 2010, 07:03 PM
#2
Re: Panel updating with the Dialog box Text
can you post your dialog form code?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Mar 24th, 2010, 03:42 AM
#3
Thread Starter
Member
Re: Panel updating with the Dialog box Text
Here is my dialog box code:
Imports System.Windows.Forms
Public Class TextDialog
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
Me.DialogResult = System.Windows.Forms.DialogResult.OK
Me.Close()
End Sub
Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.Close()
End Sub
End Class
-
Mar 24th, 2010, 05:27 AM
#4
Frenzied Member
Re: Panel updating with the Dialog box Text
before disposing the dialogform in your mainform you can get the text of the textbox as below
vb Code:
Dim dlgfrm As New DialogForm if dlgfrm.ShowDialog= System.Windows.Forms.DialogResult.OK Me.Panel1.Text = dlgfrm.TextBox1.Text Elseif dlgfrm.ShowDialog= System.Windows.Forms.DialogResult.Cancel ''Your code if any End If dlgfrm.Dispose()
Last edited by aashish_9601; Mar 24th, 2010 at 05:33 AM.
-
Mar 24th, 2010, 07:09 AM
#5
Thread Starter
Member
Re: Panel updating with the Dialog box Text
Thanks, and appreciate for the quick response I will follow your advise and let you know how i progress..In addition
I also have a dialogbox that I have created to open a picture file to load into the card panel and display it. How can i use the folloiwng methods to display the picture file on the panel.
Thanks
Private Function findPictureRectangle(ByVal pageSize As RectangleF, ByVal pic As Bitmap) As RectangleF
Public Sub setText(ByVal someText As String)
Public Sub setTextFont(ByVal aFont As Font, ByVal col As Color)
Public Sub setPicture(ByVal fileName As String)
Public Sub createDisplay()
Private Sub drawCard(ByVal g As Graphics, ByVal rect As RectangleF, ByVal curFont As Font, ByVal textX As Single, ByVal textY As Single)
Public Sub printCard(ByVal e As PrintPageEventArgs)
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
|