473,608 Members | 2,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Textbox in a from that is loaded into a Panlel Mouse select on txtbox not working

Hi I am using vb.net 2005 this is a windows application

I am using this functionality in another project I have created this
simple project to show the problem
Basically I have two forms:
Form1 - contains a panel (System.Windows .Forms.Panel)
Form2 - contains two textboxes with some sample text in them
If the Form2 is executed on its own the textboxes work fine you can
use your mouse to select a portion of the text and copy paste it
However if I run the Form2 in a panel in Form1 the functionality of
the textboxes is gone you can no longer use the mouse to select parts
of the text you can only souble click to select the whole contents of
the textbox.
this is the code I am using:
Code:
Public Class Form1
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim frmToDisplay As New Form2
frmToDisplay.To pLevel = False
Panel1.Controls .Clear()
Panel1.Controls .Add(frmToDispl ay)
frmToDisplay.Sh ow()
frmToDisplay.Ac tivate()
End Sub
End Class
Does anyone know id this is a bug with VB 2005 or am I doing
something
wrong?
THANKS

Feb 15 '07 #1
12 2143
Brano wrote:
Hi I am using vb.net 2005 this is a windows application

I am using this functionality in another project I have created this
simple project to show the problem
Basically I have two forms:
Form1 - contains a panel (System.Windows .Forms.Panel)
Form2 - contains two textboxes with some sample text in them
If the Form2 is executed on its own the textboxes work fine you can
use your mouse to select a portion of the text and copy paste it
However if I run the Form2 in a panel in Form1 the functionality of
the textboxes is gone you can no longer use the mouse to select parts
of the text you can only souble click to select the whole contents of
the textbox.
this is the code I am using:
Code:
Public Class Form1
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim frmToDisplay As New Form2
frmToDisplay.To pLevel = False
Panel1.Controls .Clear()
Panel1.Controls .Add(frmToDispl ay)
frmToDisplay.Sh ow()
frmToDisplay.Ac tivate()
End Sub
End Class
Does anyone know id this is a bug with VB 2005 or am I doing
something
wrong?
THANKS
I just tried this and it works for me. I have SP1 installed, do you?
Feb 15 '07 #2
Hi thanks Yeah I do and it doesnt work could you try my project?

here is the link

http://www.motounlock.net/BigJohn/PanelTestWinForms.zip
But can you go to the textbox and select a part of the text using
mouse?

THX
On 15 Feb, 17:18, CodeMonkey <spamm...@suck. comwrote:
Brano wrote:
Hi I am using vb.net 2005 this is a windows application
I am using this functionality in another project I have created this
simple project to show the problem
Basically I have two forms:
Form1 - contains a panel (System.Windows .Forms.Panel)
Form2 - contains two textboxes with some sample text in them
If the Form2 is executed on its own the textboxes work fine you can
use your mouse to select a portion of the text and copy paste it
However if I run the Form2 in a panel in Form1 the functionality of
the textboxes is gone you can no longer use the mouse to select parts
of the text you can only souble click to select the whole contents of
the textbox.
this is the code I am using:
Code:
Public Class Form1
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim frmToDisplay As New Form2
frmToDisplay.To pLevel = False
Panel1.Controls .Clear()
Panel1.Controls .Add(frmToDispl ay)
frmToDisplay.Sh ow()
frmToDisplay.Ac tivate()
End Sub
End Class
Does anyone know id this is a bug with VB 2005 or am I doing
something
wrong?
THANKS

I just tried this and it works for me. I have SP1 installed, do you?- Hide quoted text -

- Show quoted text -

Feb 15 '07 #3
Brano wrote:
Hi thanks Yeah I do and it doesnt work could you try my project?

here is the link

http://www.motounlock.net/BigJohn/PanelTestWinForms.zip
But can you go to the textbox and select a part of the text using
mouse?

THX

I downloaded your project and it does exactly what you say it does. I
cannot select text. I opened my project back up and verified it does
work correctly, however my project isn't like yours... I mistakingly
used all of our custom components. We use components from Developer's
Express... It's interesting, though. I took out one line of code to
enable form based skins, and it doesn't work right. If I put that line
of code back in, the mouse works correctly, even with the default
context menu.

I'm not sure what to tell you. Hopefully someone else will chime in with
some advice.
Feb 15 '07 #4
"Brano" <bp****@gmail.c omschrieb
Hi I am using vb.net 2005 this is a windows application

I am using this functionality in another project I have created this
simple project to show the problem
Basically I have two forms:
Form1 - contains a panel (System.Windows .Forms.Panel)
Form2 - contains two textboxes with some sample text in them
If the Form2 is executed on its own the textboxes work fine you can
use your mouse to select a portion of the text and copy paste it
However if I run the Form2 in a panel in Form1 the functionality of
the textboxes is gone you can no longer use the mouse to select parts
of the text you can only souble click to select the whole contents of
the textbox.
this is the code I am using:
Code:
Public Class Form1
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim frmToDisplay As New Form2
frmToDisplay.To pLevel = False
Panel1.Controls .Clear()
Panel1.Controls .Add(frmToDispl ay)
frmToDisplay.Sh ow()
frmToDisplay.Ac tivate()
End Sub
End Class
Does anyone know id this is a bug with VB 2005 or am I doing
something
wrong?
Form's inside other Forms is not supported, unless it's an MDI
application. Use Usercontrols instead.
Armin

Feb 16 '07 #5
Hi it is an MDI application the isMDIContainer property of the parent
form is set to true and I have even tried this

frmToDisplay.Pa rent = Me

Is there something I am missing to make it an MDI application?

Feb 19 '07 #6
Hi it is an MDI application the isMDIContainer property of the parent
form is set to true and I have even tried this

frmToDisplay.Pa rent = Me

Is there something I am missing to make it an MDI application?200 5
this is a windows application

Feb 19 '07 #7
"Brano" <bp****@gmail.c omschrieb
Hi it is an MDI application the isMDIContainer property of the
parent form is set to true and I have even tried this

frmToDisplay.Pa rent = Me

Is there something I am missing to make it an MDI application?200 5
this is a windows application
Replace by:
frmToDisplay.Md iParent = Me

No need to change TopLevel property.
Armin

Feb 19 '07 #8
Yes if I do that there is no need to change the TopLevel property but
it still doesn't work you still cant select the contents of the
textbox by mouse.
On 19 Feb, 10:48, "Armin Zingler" <az.nos...@free net.dewrote:
"Brano" <bpa...@gmail.c omschrieb
Hi it is an MDI application the isMDIContainer property of the
parent form is set to true and I have even tried this
frmToDisplay.Pa rent = Me
Is there something I am missing to make it an MDI application?200 5
this is a windows application

Replace by:
frmToDisplay.Md iParent = Me

No need to change TopLevel property.

Armin

Feb 22 '07 #9
"Brano" <bp****@gmail.c omschrieb
Yes if I do that there is no need to change the TopLevel property
but it still doesn't work you still cant select the contents of the
textbox by mouse.
Because you wrote "frmToDisplay.p arent = me" I assumed that you do not
execute "Panel1.Control s.Add(frmToDisp lay)" anymore, because both at one
time doesn't make sense. But I guess you still try to put it into a panel in
the MDI container. You mustn't do this. The MDI Form must be put in the MDI
containers client area (by setting the MDIparent property).
Armin

Feb 22 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
16859
by: David Gray | last post by:
Greetings all, I'm working on a program that allows a user to enter notes in a multiline textbox. I would like to be able to read the contents of the textbox (as records - one per line) and store in an array then a file. Perhaps this is the wrong control to use as there seems no way of referencing each line of the text box.
7
4351
by: joey.powell | last post by:
I have a home page with username and password textboxes and a login button for purposes of users being able to log in (forms authentication) directly on the site home page. I also have a dedicated "Login.aspx" page, but I don't want users redirected there unless absolutely necessary. I have registered a javascript block via "Page.RegisterStartupScript" that sets focus to the "txtUserName" textbox control on Page Load. It works great...
0
368
by: Eric Diana | last post by:
Hello, Im trying to create a dynamic array of textboxes from an array returned by a web service. THe web service returns a list of fields that I need to place on a dynamically created web page. The problem I am having is when the button event is clicked, the text typed in the textbox doesn't get saved with the textbox. I might be way off base with even trying this. If anyone could give me some idea on what is going wrong or another...
3
12730
by: Joey | last post by:
I have a javascript piece that sets focus to a textbox on one of my webforms. The script works fine for IE: it sets the cursor blinking in the textbox. In Firefox, however, it doesn't work at all. Below are two snippets from the page source as pulled directly out of Firefox after viewing the page: I. HTML CODE BLOCK FOR TEXTBOX
2
2180
by: Paul | last post by:
Hello: I create a textbox control programatically something like this: Dim td As New TableCell() Dim txtbox As New TextBox() txtbox.ID = "my_textbox" td.Controls.Add(txtbox) Now I want to programatically associate a "OnTextChanged" event to this
9
15355
by: davidr | last post by:
Hi, I've researched this a lot and have a well understanding but still can't get the darn textbox in the javascript. I have a textbox that is set to runat="server" and I have a client function for a comboBox when selectitemindexchanged happens it will trigger. I know it goes into that because I did a alert("test"). Now in there I want to take the item in the comboBox and put it in the textbox that is runat="server". I know I have...
8
5067
by: Filipe Marcelino | last post by:
Hi, I'm trying to create a textbox inheriting from the standard textbox. I would like to: 1. repaint the textbox border; 2. define a color for that border; Till now I made this:
6
1027
by: Morten Snedker | last post by:
Im trying to set value of a textbox, but it fails. txtBox.Text = obj.Effekt does nothing on the page, but the last one does. Fieldname is positively correct. What am I doing wrong? Dim listNr As String = Right(ListName, 1)
2
2689
by: mylog | last post by:
Hi all, I am having a small problem on getting the values of the dynamically generated textboxes in C# windows application. I have successfully read an xml file and put its key and value fields as Label and TextBox respectively. Now what I need is the user changes the values in one of the textBox and I need to get that value. The problem is I cannot get the values from the textbox i.e. I don't know how to get the particular textbox value. Can...
0
8050
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7987
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8464
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3954
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4015
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2464
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.