Can I underline character (shortcut ) on a tab?
Does anybody know how to underline a character on a
tabcontrol's tab name, as in VB6 &Cancel will show a
shortcut underlined "C". Obviously you cannot do this
on .net tab.
What I want is to show shortcut underlined character so
that user will be able to use alt+'key' to switch the tab
pages.
I've created a shortcut by using form event handler. I
need to show some sign on the tab name and let user know
what the shortcut is.
Frank Tag: cannot add a top level control to a control Tag: 64323
TAB does not work on form displayed in new appdomain.
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C3D5FC.8CFDE430
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
Dialog keyboard accelerators (mainly TAB and control accelerator keys) =
do not work when a form is displayed in another appdomain.
Below is how the form is being displayed. The test form itself is very =
trivial - just three textboxes and two buttons dropped on it with no =
other logic or properties changed.
AppDomain appDomain =3D AppDomain.CreateDomain("AppDomain for form.");
Form frm =3D (Form) appDomain.CreateInstanceAndUnwrap("FormLibrary", =
"MyFormLibrary.TestForm");
frm.Show();=20
Anyone with any ideas? Thanks.
Tom
------=_NextPart_000_0008_01C3D5FC.8CFDE430
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Dialog keyboard accelerators (mainly =
TAB and=20
control accelerator keys) do not work when a form is displayed in =
another=20
appdomain.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Below is how the form is being=20
displayed. The test form itself is very trivial - just three =
textboxes and=20
two buttons dropped on it with no other logic or properties=20
changed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier New">AppDomain =
appDomain =3D=20
AppDomain.CreateDomain("AppDomain for form.");<BR>Form frm =3D (Form)=20
appDomain.CreateInstanceAndUnwrap("FormLibrary",=20
"MyFormLibrary.TestForm");<BR>frm.Show();</FONT> <BR></FONT><FONT =
face=3DArial=20
size=3D2></FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=3DArial size=3D2>Anyone with any ideas? =
Thanks.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Tom</FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C3D5FC.8CFDE430-- Tag: cannot add a top level control to a control Tag: 64322
Configuration file problem
Hi,
I have my Winforms client calling a web service by referencing it.
Additionally it has application configuration file setup with database
connection data etc. I have placed this application configuration file under
/bin directory. When I execute the application and run the Winforms client,
a web.configuration file is created and it removes all the application
configuration data. Apparently, this web.config file holds the proxy
information for the web services referenced. Thus, the web services
functionality work where as rest of the functions that use application
configuration does not work. Does anyone has idea about this?
Best Regards
uday Tag: cannot add a top level control to a control Tag: 64321
controlling enablement of controls on winforms
Hi,
anyone who can link to patterns or documentation on controlling the
enablement of controls on winforms ?
(e.g. a specific button on the screen is enabled if current user has
permission to execute the underlying task and also if the form is in edit
mode)
Can this be done in a generic way ?
--
Met vriendelijke groeten Tag: cannot add a top level control to a control Tag: 64320
Re: Application Losing Focus when running from exe
Hi,
I run it by clicking the exe in windows explorer.
It doesn't occur in any other project.
Following is a list of controls used on that particular
form:
a. Labels (3)
b. Pictureboxes (1)
c. WebBrowser control (I have set Enabled = False for
this control. I am hosting a flash movie in this control)
There are no third party components on this form.
Just to reiterate, the form does get focus when I run
from the VS.NET 2003 IDE (Debug->Start option). It
doesn't retain focus when I double click the exe from
Windows Explorer or even from Start->Run->ApplicationPath.
I have put trace statements in the deactivate event of
this form. These don't fire even when running from the
exe directly.
Thanks for the prompt reply Tag: cannot add a top level control to a control Tag: 64319
Help files
How do you open a "help" file? I'm trying to associate it with a menu item.
I've looked at the Help and HelpProvider classes, but neither seems to serve
this purpose.
--
Jon Cosby
Please do not reply to this email address. Tag: cannot add a top level control to a control Tag: 64308
How to share real-time data?
What .NET technology would allow multiple users to share data in
real-time?
For example, an application for an office that lets everyone know who is
in the office and who is out. When someone signs out this is
immediately distributed to everyone running the program.
ASP.NET has no way to push real-time data to a browser, that I know of.
Conferencing applications like NetMeeting come to mind. For this, one
instance of the application must be designated the host, and all others
connect to this one. Is a designated host required for real-time
sharing?
Is distributed sharing possible where there is no host? Could the
connection be made in a P2P fashion, like with Gnutella or Kazaa?
For this type of application I don't even know where to start research.
What's this called? What .NET Framework classes are made for this? Any
links to articles would be appreciated.
Thanks for your help. Tag: cannot add a top level control to a control Tag: 64307
Datagrid and Arrow keys, how to make the arrow move around?
Ok Simple problem.
I have a MS datagrid I made my very own multiline
columnstyle for my datagrid. Right away I had problems.
Yea it was multiline (using a regular textbox that shows
up on focus of the custom columnstyle), the problem was
the fact that if you hit enter it would go to the next row.
Now I would expect tab to be used for moving around, but
it appears someone at MS doesn't like tab and likes using
enter and the arrow keys to move to different Cells.
Ok So I need a way to be able to hit enter and it go to
another line in the textbox. I figured out how to do this,
I built a seperate project with a textbox and different
buttons and I'm sending messages to the wndproc of the
textbox. I got all the operations to work in my sample
probject. Though when I went to add them into my datagrid
I did the following. Note: it might not look good here.
Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As
System.Windows.Forms.Keys) As Boolean
Dim KC As Keys = CType((msg.WParam.ToInt32 And
Keys.KeyCode), Keys)
If (msg.Msg = WM_KEYDOWN Or msg.Msg = WM_KEYUP)
Then
Dim DisableKeys As Boolean
Try
DisableKeys = CType
(Me.GetActiveTableStyle.GridColumnStyles
(Me.CurrentCell.ColumnNumber),
DataGridExt.DataGridExtensions.DataGridMultiLineTextboxColu
mnStyle).IsKeysDisabled
Catch
Return False
End Try
If DisableKeys = True Then
If KC = Keys.Enter Or KC = Keys.Up Or KC =
Keys.Down Then
Dim M As New
System.Windows.Forms.Message
M.HWnd = CType
(Me.GetActiveTableStyle.GridColumnStyles
(Me.CurrentCell.ColumnNumber),
DataGridExt.DataGridExtensions.DataGridMultiLineTextboxColu
mnStyle).Box.Handle
Select Case KC
Case Keys.Enter
M.LParam = IntPtr.Zero
M.Msg = Me.WM_CHAR
M.WParam = IntPtr.op_Explicit
(Keys.Enter)
Case Keys.Up
M.LParam = IntPtr.Zero
M.Msg = Me.WM_KEYDOWN
M.WParam = IntPtr.op_Explicit
(Me.VK_UP)
Case Keys.Down
M.LParam = IntPtr.Zero
M.Msg = Me.WM_KEYDOWN
M.WParam = IntPtr.op_Explicit
(Me.VK_DOWN)
End Select
CType
(Me.GetActiveTableStyle.GridColumnStyles
(Me.CurrentCell.ColumnNumber),
DataGridExt.DataGridExtensions.DataGridMultiLineTextboxColu
mnStyle).Box.SendMessage(M)
Return True
End If
End If
If KC = Keys.Left Or KC = Keys.Right Then
Select Case KC
Case Keys.Left
If CType
(Me.GetActiveTableStyle.GridColumnStyles
(Me.CurrentCell.ColumnNumber),
DataGridExt.DataGridExtensions.DataGridMultiLineTextboxColu
mnStyle).Box.SelectionStart > 0 Then
CType
(Me.GetActiveTableStyle.GridColumnStyles
(Me.CurrentCell.ColumnNumber),
DataGridExt.DataGridExtensions.DataGridMultiLineTextboxColu
mnStyle).Box.SelectionStart -= 1
End If
Case Keys.Right
CType
(Me.GetActiveTableStyle.GridColumnStyles
(Me.CurrentCell.ColumnNumber),
DataGridExt.DataGridExtensions.DataGridMultiLineTextboxColu
mnStyle).Box.SelectionStart += 1
End Select
Return True
End If
End If
Return False
End Function
Ok So you would think everything works huh? well the enter
works and the left and right work fine, but the up and
down do not work inside the textbox, they still cause row
changes (navagation of the rows in the datagrid). What do
you guys think I'm doing wrong?
Now from what I learned doing alot of googleing is that if
the textbox has a parent control it will route the
messages to the parent (which is why I had to do the
override here), now the enter works fine. Though I found
that arrow keys are handled differently. So basiclly I
need to find an answer to my problem which is to keep the
darn arrow keys working within the textbox only.
Waiting for those great answers.
Joe Tag: cannot add a top level control to a control Tag: 64306
tooltip on combobox
Hi,
Anyone know how I can create a tooltip for combobox item if it isn't
completely visible?
Thanks to all.
Paola Tag: cannot add a top level control to a control Tag: 64305
String Formatting
This may be very silly question but I cannot find a way to convert a number
into a string representation which is an 8 digit hex value.
For example I want to convert a number -2147221503 into an 8 digit hex
number. In MFC I would have used the CString class and the format string of
"%08X" would have worked perfectly well. How do i achieve this in C#. I
tried using string ss = s.ToString("%08X"); where s is the number but this
gives me a string as "-%2147221503008X" which is not what I am looking for.
the static String.Format( ) method does not seem to work either.
Any inputs,
TIA,
--Saurabh Tag: cannot add a top level control to a control Tag: 64304
Open outlook attachments to view and fill in form?
I need to write an application in VB.net that basically opens a tiff,
gif, jpg, pdf or word doc for viewing only so no altering just taking
information off the item and filling in a form then saving the item
down. What I would like is upon opening this app it brings up the item
in the left hand window and on the right hand have a form down the
side.
I have got the general idea about getting the information off of the
form and saving etc.......Its just opening the item in a window next
to the form that is the problem. I have thought about using IE because
it opens all the above but how do I get the form next to it.
Has anyone got any ideas, I am under pressure to get this done and
this bit seems real tough.
Thanks in advance.
Regards
John Tag: cannot add a top level control to a control Tag: 64301
Application Freezes
Dear All,
I have upgraded and application I developed on VB6 which uses the
Mscomm1 component and reads from COM1 port data send, then sends these
records to a table in SQL 2000. I upgraded the application to VB.Net windows
form to use the try catch method of trapping errors, the form runs smoothly
but after about 10 minutes the form freezes without raising any error.
Any hints will be useful.
Thanks,
Yahya Tag: cannot add a top level control to a control Tag: 64299
Ctrl-c / Ctrl-v doesn't work on no touch deployment
Hi,
I have a client application that is deployed using the "no touch
deployment".
For some reason, the copy/paste shortcut keys (ctrl-c/v) doesn't work on the
winform running in the IEHost.
Is there a solution that enables the copy/paste shortcuts?
Thanks, Hagay. Tag: cannot add a top level control to a control Tag: 64298
Try to mail, CDO.Message not found
Try to mail from a Windows application (not a web app.) using
System.Web.Mail but I get an exception, somthing like "CDO.Message not
found".
Wat's wrong? Tag: cannot add a top level control to a control Tag: 64297
DataGrid - Sorting Problem
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C3D618.44E3BA00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Dear Frnds
I m using DataGrid Control in my project.=20
On the mouse Up event i get the information from DataGrid row using =
Currencty Manager. code is below=20
private void dgPassengers_MouseUp(object sender, =
System.Windows.Forms.MouseEventArgs e)
{
string tHistoryId;
if (dsInquiry.Tables["QueryHistory"].DefaultView.Count > 0)
{
HistoryId =3D =
((DataRowView)cmQuery.Current).Row["HistoryID"].ToString();
this.HistoryId =3D tHistoryId;
this.DoAction(InquiryActions.EditQuery);
}
}
it is working fine. but when i click on the Column header it sorts the =
Grid and it should also give the information of the row where the Record =
pointer is located. but it gives wrong information.
or we can say it doesn't move the record pointer to the row it was =
pointing before sorting.
please give suggestion=20
thanks and regards=20
Mubashar Ahmad
------=_NextPart_000_0008_01C3D618.44E3BA00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>Dear Frnds</DIV>
<DIV> </DIV>
<DIV>I m using DataGrid Control in my project. </DIV>
<DIV> </DIV>
<DIV>On the mouse Up event i get the information from DataGrid row using =
Currencty Manager. code is below </DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff size=3D2>
<P>private</FONT><FONT size=3D2> </FONT><FONT color=3D#0000ff=20
size=3D2>void</FONT><FONT size=3D2> dgPassengers_MouseUp(</FONT><FONT =
color=3D#0000ff=20
size=3D2>object</FONT><FONT size=3D2> sender, =
System.Windows.Forms.MouseEventArgs=20
e)</P>
<P>{</P>
<P></FONT><FONT color=3D#0000ff size=3D2>string</FONT><FONT size=3D2> =
tHistoryId;</P>
<P></FONT><FONT color=3D#0000ff size=3D2>if</FONT><FONT size=3D2>=20
(dsInquiry.Tables["QueryHistory"].DefaultView.Count > 0)</P>
<P>{</P></FONT><FONT size=3D2>
<P>HistoryId =3D =
((DataRowView)cmQuery.Current).Row["HistoryID"].ToString();</P>
<P></FONT><FONT color=3D#0000ff size=3D2>this</FONT><FONT =
size=3D2>.HistoryId =3D=20
tHistoryId;</P>
<P></FONT><FONT color=3D#0000ff size=3D2>this</FONT><FONT=20
size=3D2>.DoAction(InquiryActions.EditQuery);</P>
<P>}</P></FONT><FONT size=3D2>
<P>}</P>
<P>it is working fine. but when i click on the Column header it sorts =
the Grid=20
and it should also give the information of the row where the Record =
pointer is=20
located. but it gives wrong information.</P>
<P>or we can say it doesn't move the record pointer to the row it was =
pointing=20
before sorting.</P>
<P>please give suggestion </P>
<P>thanks and regards </P>
<P>Mubashar Ahmad</P></FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C3D618.44E3BA00-- Tag: cannot add a top level control to a control Tag: 64296
Simple question on menuitem
I have a menu with menuitem "Delete".
I want to reuse the functionality of the DELETE key on
the keyboard. How can I do this in a menuitem? What does
the VB code look like?
I would like to create menuitems for copy and paste as
well (reuse windows functionality ctrl+C and ctrl+V??),
and have no idea on how to reuse. Please point me in the
right direction.
Regards
Tore Tag: cannot add a top level control to a control Tag: 64291
Creating IE Toolbar in C# (or VB.NET)
Hi All,
I want to create a customized IE Toolbar using either C#
or VB.NET. Is it possible?
I've come across some samples which show how this can be
achieved using Vc++ (and VC.NET). But can this be achieved
using C# (or VB.NET) only.
Thanking you in anticipation. Tag: cannot add a top level control to a control Tag: 64289
Reading Multipage TIFF images
Hi,
We have a requirement of loading a multipage tiff file
into different pictureboxes.
i.e. each page of the .tiff being displayed in each
picture box.
All this using managed c# code.
Any ideas?
Thanks in Advance Tag: cannot add a top level control to a control Tag: 64288
How to make Combobox readonly
Hi,
I'm populating a combobox from a database, but would like to prevent users
to edit in it.
Can't find any readonly property. Anyone know how to do this ? Tag: cannot add a top level control to a control Tag: 64282
BUG: ComboBox.OnSelectedItemChanged
I found the following bug:
When manualy selecting a new item from a ComboBox the OnSelectedItemChanged
is not called. When settings SelectedItem or SelectedIndex from code, it is
correctly called. A small test program to duplicate the bug follows:
using System;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
namespace BugTester
{
public class BugForm : System.Windows.Forms.Form
{
private TestComboBox comboBox1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public BugForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.comboBox1 = new BugTester.TestComboBox();
this.SuspendLayout();
//
// comboBox1
//
this.comboBox1.DropDownStyle =
System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Items.AddRange(new object[] {
"Item 1",
"Item 2",
"Item 3"});
this.comboBox1.Location = new System.Drawing.Point(8, 8);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(280, 21);
this.comboBox1.TabIndex = 0;
//
// BugForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 38);
this.Controls.Add(this.comboBox1);
this.Name = "BugForm";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
protected override void OnLoad( EventArgs e )
{
Debug.WriteLine( "Setting Selected Index" );
comboBox1.SelectedIndex = 1;
Debug.WriteLine( "Setting Selected Item" );
comboBox1.SelectedItem = comboBox1.Items[2];
Debug.WriteLine( "Now selected an item manualy" );
base.OnLoad( e );
}
[STAThread]
static void Main()
{
Application.Run( new BugForm() );
}
}
public class TestComboBox : ComboBox
{
protected override void OnSelectedIndexChanged( EventArgs e )
{
Debug.WriteLine( "OnSelectedIndexChanged called" );
base.OnSelectedIndexChanged( e );
}
// this method is not called when manualy selecting a new item in
the combobox
protected override void OnSelectedItemChanged(EventArgs e)
{
Debug.WriteLine( "OnSelectedItemChanged called" );
base.OnSelectedItemChanged( e );
}
}
} Tag: cannot add a top level control to a control Tag: 64281
PropertyGrid using DefaultValue attribute - MUST IT ??
Is there ANY way you can persuade a property grid control to use something
else for each property's default value, and not the DefaultValue attribute
(attributes as far as I can see are read-only - is this right?).
I want to base a PropertyGrid control on a single class but to have the
default values for each property different for each instance of the class.
CAN THIS BE DONE ?? Tag: cannot add a top level control to a control Tag: 64280
autodoc feature in vb.net?
Hi,
I know there is an autodocument feature in C# which translates in-code
comments and parameterinformation, etc... into xml documentation. Ideal
stuff for documenting a framework.
Does such a tool exist for vb.net as wel?
i'd appreciate all help on this topic!
Bonna Tag: cannot add a top level control to a control Tag: 64274
quick money
To: everyone
Topic: a way to make money quick easy and legally=20
HOW TO TURN $6 into $6,000 !!!!!! Remember: play FAIRLY=20
and HONESTLY and this will really work. I found this on a=20
bulletin board and decided to try it. A little while back,=20
I was browsing through newsgroups, just like you are now,=20
and came across an article similar to this that said you=20
could make thousands of dollars within weeks with only an=20
initial investment of $6.00! So I thought, Yeah right,=20
this must be a scam,but like most of us, I was curious, so=20
I kept reading. Anyway, it said that you send $1.00 to=20
each of the 6 names and address stated in the article. You=20
then place your own name and address in the bottom of the=20
list at #6, and post the article in at least 200=20
newsgroups. (There are thousands) No catch, that was it.=20
So after thinking it over, and talking to a few people=20
first, I thought about trying it. I figured: what have I=20
got to lose except 6 stamps and $6.00, right? Then I=20
invested the measly $6.00. Well GUESS WHAT!!... within 7=20
days, I started getting money in the mail! I was shocked!=20
I figured it would end soon, but the money just kept=20
coming in. In my first week, I made about $25.00. By the=20
end of the second week I had made a total of over=20
$1,000.00! In the third week I had over $10,000.00 and=20
it's still growing. This is now my fourth week and I have=20
made a total of just over $42,000.00 and it's still coming=20
in rapidly. It's certainly worth $6.00, and 6 stamps, I=20
have spent more than that on the lottery!! Let me tell you=20
how this works and most importantly, why it works....Also,=20
make sure you print a copy of this article NOW, so you can=20
get the information off of it as you need it. I promise=20
you that if you follow the directions exactly, that you=20
will start making more money than you thought possible by=20
doing something so easy! Suggestion: Read this entire=20
message carefully! (print it out or download it.) Follow=20
the simple directions and watch the money come in! It's=20
easy. It's legal. And, your investment is only $6.00 (Plus=20
postage) IMPORTANT: This is not a rip-off; it is not=20
indecent; it is not illegal; and it is virtually no risk -=20
it really works!!!! If all of the following instructions=20
are adhered to, you will receive extraordinary dividends.=20
PLEASE NOTE: Please follow these directions EXACTLY, and=20
$50,000 or more can be yours in 20 to 60 days. This=20
program remains successful because of the honesty and=20
integrity of the participants. Please continue its success=20
by carefully adhering to the instructions. You will now=20
become part of the Mail Order business. In this business=20
your product is not solid and tangible, it's a service.=20
You are in the business of developing Mailing Lists. Many=20
large corporations are happy to pay big bucks for quality=20
lists. However, the money made from the mailing lists is=20
secondary to the income which is made from people like you=20
and me asking to be included in that list. Here are the 4=20
easy steps to success: STEP 1: Get 6 separate pieces of=20
paper and write the following on each piece of=20
paper;PLEASE PUT ME ON YOUR MAILING LIST. Now get 6 US=20
$1.00 bills and place ONE inside EACH of the 6 pieces of=20
paper so the bill will not be seen through the envelope=20
(to prevent thievery). Next, place one paper in each of=20
the 6 envelopes and seal them. You should now have 6=20
sealed envelopes, each with a piece of paper stating the=20
above phrase, your name and address, and a $1.00 bill.=20
What you are doing is creating a service. THIS IS=20
ABSOLUTELY LEGAL! You are requesting a legitimate service=20
and you are paying for it! Like most of us I was a little=20
skeptical and a little worried about the legal aspects of=20
it all. So I checked it out with the U.S. Post Office (1-
800-725-2161) and they confirmed that it is indeed legal!=20
Mail the 6 envelopes to the following addresses: #1) Jeff=20
Millan 1113 N. 19 =BD McAllen,TX 78501 #2) simon white 23=20
mason road stroud glostershire eng #3) Wayne Clark 146=20
Poningo St. Port Chester, NY 105 #4) T. brayford dotburn=20
park road stroud glos eng gl5 2jf #5) Alan Meyer 17725 W.=20
Belmont Ave. Kerman, CA 93630 #6) Joshua North 17415 W.=20
Whitesbridge Kerman, CA 93630 STEP 2: Now take the #1 name=20
off the list that you see above, move the other names up=20
(6 becomes 5, 5 becomes 4, etc...) and add YOUR Name as=20
number 6 on the list. STEP 3: Change anything you need to,=20
but try to keep this article as close to original as=20
possible. Now, post your amended article to at least 200=20
newsgroups. (I think there are close to 100,000 groups)=20
All you need is 200, but remember, the more you post, the=20
more money you make! This is perfectly legal! If you have=20
any doubts, refer to Title 18 Sec. 1302 & 1341 of the=20
Postal lottery laws. Keep a copy of these steps for=20
yourself and, whenever you need money, you can use it=20
again, and again. PLEASE REMEMBER that this program=20
remains successful because of the honesty and integrity of=20
the participants and by their carefully adhering to the=20
directions. Look at it this way. If you are of integrity,=20
the program will continue and the money that so many=20
others have received will come your way. NOTE: You may=20
want to retain every name and address sent to you, either=20
on a computer or hard copy and keep the notes people send=20
you. This VERIFIES that you are truly providing a service.=20
(Also, it might be a good idea to wrap the $1 in dark=20
paper to reduce the risk of mail theft.) So, as each post=20
is downloaded and the directions carefully followed, six=20
members will be reimbursed for their participation as a=20
List Developer with one dollar each. Your name will move=20
up the list geometrically so that when your name reaches=20
the #1 position you will be receiving thousands of dollars=20
in CASH!!! What an opportunity for only$6.00 ($1.00 for=20
each of the first six people listed above) Send it now,=20
add your own name to the list and you're in business! ---
DIRECTIONS ----- FOR HOW TO POST TO NEWSGROUPS------------=20
Step 1) You do not need to re-type this entire letter to=20
do your own posting. Simply put your cursor at the=20
beginning of this letter and drag your cursor to the=20
bottom of this document, and select 'copy' from the edit=20
menu. This will copy the entire letter into the computer's=20
memory. Step 2) Open a blank 'notepad' file and place your=20
cursor at the top of the blank page. From the 'edit' menu=20
select 'paste'. This will paste a copy of the letter into=20
notepad so that you can add your name to the list. Step 3)=20
Save your new notepad file as a .txt file. If you want to=20
do your postings in different settings, you'll always have=20
this file to go back to. Step 4) Use Netscape or Internet=20
explorer and try searching for various newsgroups (on-line=20
forums, message boards, chat sites, discussions.) Step 5)=20
Visit these message boards and post this article as a new=20
message by highlighting the text of this letter and=20
selecting paste from the edit menu. Fill in the Subject,=20
this will be the header that everyone sees as they scroll=20
through the list of postings in a particular group, click=20
the post message button. You're done with your first one!=20
Congratulations...THAT'S IT! All you have to do is jump to=20
different newsgroups and post away, after you get the hang=20
of it, it will take about 30 seconds for each newsgroup!=20
**REMEMBER, THE MORE NEWSGROUPS YOU POST IN, THE MORE=20
MONEY YOU WILL MAKE!! BUT YOU HAVE TO POST A MINIMUM OF=20
200** That's it! You will begin receiving money from=20
around the world within days! You may eventually want to=20
rent a P.O.Box due to the large amount of mail you will=20
receive. If you wish to stay anonymous, you can invent a=20
name to use, as long as the postman will deliver it.=20
**JUST MAKE SURE ALL THE ADDRESSES ARE CORRECT.** Now the=20
WHY part: Out of 200 postings, say I receive only 5=20
replies (a very low example). So then I made $5.00 with my=20
name at #6 on the letter. Now, each of the 5 persons who=20
just sent me $1.00 make the MINIMUM 200 postings, each=20
with my name at #5 and only 5 persons respond to each of=20
the original 5, that is another $25.00 for me, now those=20
25 each make 200 MINIMUM posts with my name at #4 and only=20
5 replies each, I will bring in an additional $125.00!=20
Now, those 125 persons turn around and post the MINIMUM=20
200 with my name at #3 and only receive 5 replies each, I=20
will make an additional $626.00! OK, now here is the fun=20
part, each of those 625 persons post a MINIMUM 200 letters=20
with my name at #2 and they each only receive 5 replies,=20
that just made me $3,125.00!!! Those 3,125 persons will=20
all deliver this message to 200 newsgroups with my name at=20
#1 and if still 5 persons per 200 newsgroups react I will=20
receive $15,625,00! With an original investment of only=20
$6.00! AMAZING! When your name is no longer on the list,=20
you just take the latest posting in the newsgroups, and=20
send out another $6.00 to names on the list, putting your=20
name at number 6 again. And start posting again. The thing=20
to remember is: do you realize that thousands of people=20
all over the world are joining the internet and reading=20
these articles everyday?, JUST LIKE YOU are now!! So, can=20
you afford $6.00 and see if it really works?? I think=20
so... People have said, "e;what if the plan is played out=20
and no one sends you the money? So what! What are the=20
chances of that happening when there are tons of new=20
honest users and new honest people who are joining the=20
internet and newsgroups everyday and are willing to give=20
it a try? Estimates are at 20,000 to 50,000 new users,=20
every day, with thousands of those joining the actual=20
internet. Remember: play FAIRLY and HONESTLY and this will=20
really work.=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
BE AN=20
INTERNET MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!! Before=20
you say ''Bull'', please read the following. This is the=20
letter you have been hearing about on the news lately. Due=20
to the popularity of this letter on the Internet, a=20
national weekly news program recently devoted an entire=20
show to the investigation of this program described below,=20
to see if it really can make people money. The show also=20
investigated whether or not the program was legal. Their=20
findings proved once and for all that there=20
are ''absolutely NO Laws prohibiting the participation in=20
the program and if people can "follow the simple=20
instruction" they are bound to make some mega bucks with=20
only $6 out of pocket cost''. DUE TO THE RECENT INCREASE=20
OF POPULARITY & RESPECT THIS PROGRAM HAS ATTAINED, IT IS=20
CURRENTLY WORKING BETTER THAN EVER. This is what one had=20
to say: '' Thanks to this profitable opportunity". I was=20
approached many times before but each time I passed on it.=20
I am so glad I finally joined just to see what one could=20
expect in return for the minimal effort and money=20
required. To my astonishment, I received a total=20
$610,470.00 in 21 weeks, with money still coming in''. Pam=20
Hedland, Fort Lee, New Jersey.=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
Another=20
said: "this program has been around for a long time but I=20
never believed in it. But one day when I received this=20
again in the mail I decided to gamble my $6 on it. I=20
followed the simple instructions and walaa ..... 3 weeks=20
later the money started to come in. First month I only=20
made $240.00 but the next 2 months after that I made a=20
total of $290,000.00. So far, in the past 8 months by re-
entering the program, I have made over $710,000.00 and I=20
am playing it again. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
TESTIMONIALS=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D '' My name is Mitchell.=20
My wife, Jody and I live in Chicago. I am an accountant=20
with a major U.S. Corporation and I make pretty good=20
money. When I received this program I grumbled to Jody=20
about receiving ''junk mail''. I made fun of the whole=20
thing, spouting my knowledge of the population and=20
percentages involved. I ''knew'' it wouldn't work. Jody=20
totally ignored my supposed intelligence and few days=20
later she jumped in with both feet. I made merciless fun=20
of her, and was ready to lay the old ''I told you so'' on=20
her when the thing didn't work. Well, the laugh was on me!=20
Within 3 weeks she had received 50 responses. Within the=20
next 45 days she had received total $ 147,200.00 .........=20
all cash! I was shocked. I have joined Jodyin=20
her ''hobby ''. Mitchell Wolf M.D., Chicago, Illinois=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D '' =
Not=20
being the gambling type, it took me several weeks to make=20
up my mind to participate in this plan. But conservative=20
as I am, I decided that the initial investment was so=20
little that there was just no way that I wouldn't get=20
enough orders to at least get my money back''. '' I was=20
surprised when I found my medium size post office box=20
crammed with orders. I made $319,210.00 in the first 12=20
weeks. The nice thing about this deal is that it does not=20
matter where people live. There simply isn't a better=20
investment with a faster return and so big''. Dan=20
Sondstrom, Alberta, Canada=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =
'' I had=20
received this program before. I deleted it, but later I=20
wondered if I should have given it a try. Of course, I had=20
no idea who to contact to get another copy, so I had to=20
wait until I was e-mailed again by someone else.........11=20
months passed then it luckily came again...... I did not=20
delete this one! I made more than $490,000 on my first try=20
and all the money came within 22 weeks''. Susan De Suza,=20
New York, N.Y.=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =
'' It=20
really is a great opportunity to make relatively easy=20
money with little cost to you. I followed the simple=20
instructions carefully and within 10 days the money=20
started to come in. My first month I made $ 20, 560.00 and=20
by the end of third month my total cash count was $=20
362,840.00. Life is beautiful, Thanx to internet''. Fred=20
Dellaca, Westport, New Zealand=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = Tag: cannot add a top level control to a control Tag: 64271
AsyncCallback + Exception
How can you pass an exception from an endInvoke statement in an
AsyncCallback Function to the Main Application Thread.
e.g.
Sub Main
Dim ar As IAsyncResult
ar = a.BeginSlowExponent(5, 200, New AsyncCallback(AddressOf
Me.OnEndSlowExponent), a)
End Sub
Public Sub OnEndSlowExponent(ByVal ar As IAsyncResult)
Try
Me.Text = a.EndSlowExponent(ar)
Catch ex As Exception
throw ex 'How do you send this to UI thread.
End Try
End Sub
Any Thoughts?
Thanks
MS Tag: cannot add a top level control to a control Tag: 64264
Looking for an equivalent in .NET framework / WindowsForms
Hello,
I come from the Delphi world which has what is called a TActionList.
In a nutshell, an action list is a way to centralize the response to user
commands (actions). Action list components maintain a list of actions that
are available to the client controls in an application. These actions also
hold the images related to the actions.
I place my relavent code in the action and just assign that action to the
action property on the control (button, menu, popup menu, etc.). I can then
control the action which will in turn affect all controls that have that
action assigned to them. For example, I can disable an action and the menu,
toolbar, and popup menu all reflect that disabled state.
Is there anything in WindowsForms or, at a lower level, the .NET frameworld
that works similarly?
Thanks for you input. Tag: cannot add a top level control to a control Tag: 64261
What's the point of Simple Data Binding?
Hello All,
In two different books, Simple Data Binding to a control is explained
with an example of a TextBox where the data is initialized with an
array.
For example a class is defined as such:
public class Vendor
{
private string vendorName;
public string VendorName
{
get
{
return vendorName;
}
set
{
vendorName = value;
}
}
public Vendor(string strVendorName)
{
VendorName = strVendorName;
}
}
}
A TextBox is placed on the main form Form1 with the following code:
public Vendor[] aVendors;
private void Form1_Load(object sender, System.EventArgs e)
{
this.aVendors = new Vendor[3];
aVendors[0] = new Vendor("Microsoft");
aVendors[1] = new Vendor("Praxis");
aVendors[2] = new Vendor("Rational");
txtVendor.DataBindings.Add("Text",aVendors,"VendorName");
}
where txtVendor is the name of the TextBox.
My question now is what else can you do with this? What's the point?
Is there some utilitarian advantage here that I am not seeing?
Neither of the texts expands on this. They both go into Complex Data
Binding which is a different animal. FYI,I am coming from the MFC VC++
world is that means anything.
Thanks,
Joe
I can also be reached at:
filter1_at_digitalchickenDOTnetNOSPAM Tag: cannot add a top level control to a control Tag: 64260
No Touch Deployment Error Question
HI,
I am getting this error when I try to create a new instance of one of my
forms.
--
System.Security.SecurityException: Security error.
--
This error is thrown in the CTOR on the MyBase.New() call.
At this stage I have already created and displayed several other forms right
before this step, so it doesn't make sense why this particular form would
fail it is just a Standard windows form, with Menus/toolbars on it. It
doesn't even tell my what kind of security error
TIA,
--
Paul Tag: cannot add a top level control to a control Tag: 64259
DataGrid DataMember changes
Hello,
I have a DataSet of multiple related tables that I display
in a DataGrid. When the user drills down to a child table,
or when he "drills back up" to the parent table, I want to
populate a ComboBox with the names of the columns in the
currently-displayed table.
I've done some playing around with a currency manager for
the DataMember of the grid, but it doesn't really give me
what I want.
Any suggestions for how to attack this? I'm stumped. The
problem is with finding out when the user has changed the
table he is viewing (and determining what the new table
is). I can handle getting the info into the combobox.
Many thanks,
Fred Noltie Tag: cannot add a top level control to a control Tag: 64254
Can't Shutdown with System Tray Application Running
I have created a System Tray application that works as expected until the
user tries to shutdown. The computer will not shutdown because the System
Tray application is still running.
Can someone please provide an example of how to close the application
automatically if the user chooses to shutdown without the user explicitly
closing the application itself?
Thanks -
Michael Hetrick Tag: cannot add a top level control to a control Tag: 64249
FileSystemWatcher
I am using VB.NET and the FileSystemWatcher monitoring a
network drive. Periodically I will get an error such as
this:
A first chance exception of
type 'System.Net.Sockets.SocketException' occurred in
system.dll
Additional information: An existing connection was
forcibly closed by the remote host
How can I trap this error and re-establish a connection
in order to continue monitoring the directory on the
network? The application I have written must run
continuously, 24..7.
Thanks,
Robert Tag: cannot add a top level control to a control Tag: 64247
Security Issue
The issue I am dealing with has to do with trusting an
assembly (EXE) that physically resides on a network drive
but is being accessed and run locally on a user's
machine. When setting the icon up on each user's
machine, I have to run the Framework 1.1 Wizard that
allows me to browse to the Assembly (EXE) on the network
and set the trust to full trust. I want to be able to
accomplish this in a setup program. Is this possible?
Thanks,
Robert Tag: cannot add a top level control to a control Tag: 64245
SDL Data Adapter and Parameter
All,
What or how should I go about using a data adapter parameter? Here is my
question.
I have a data adapter and some records are filtered with @ContactID.
Sometimes I want to add an additional parameter to this of @ClientID. As
expected, if I add this to the data adapter configuration, I have to supply
a value for it. So, is there a string or character like'*' that will return
all the records.
In essence, I want to be able to do:
With daLead.SelectCommand.Parameters
.Item("@ContactID").Value = 123
.Item("@ClientD").Value = "Every Single integer. Something like *"
End With
OR at other times....
With daLead.SelectCommand.Parameters
.Item("@ContactID").Value = 123
.Item("@ClientD").Value = 567
End With
--
Brian P. Hammer Tag: cannot add a top level control to a control Tag: 64243
Debugging a No Touch Deployment Application
Hi,
I have tried several different methods, but I havn't been able to get Visual
Studio.NET debugger to attach to my application when I launch it from a web
site. I have set up the project properties to launch URL. The URL I launch
is the virtual directory I have set up for the Application. i.e.
http://localhost/MyApp/MyApp.exe , which is the same directory I have the
build set to.
The application launches, but I don't get any debugging.
Does anyone know how to accomplish this.
TIA,
--
Paul Tag: cannot add a top level control to a control Tag: 64242
No Touch Deployment Question
Hi,
Is there anyway to get rid of the annoying 'balloon' caption that shows up
everytime you display a form? The one that says it is running only in a
partially trusted environment.
TIA,
--
Paul Tag: cannot add a top level control to a control Tag: 64239
Custom Control Properties in WinRes
Hopefully someone out there can answer this question. It seems like a basic
problem, but I can't figure out what's wrong.
I have a form with a custom control that I want someone else to localize
with WinRes. When you load the .resx file with WinRes, and the custom
control assembly is in a place that WinRes can find it, it displays all the
controls properly, including the custom control, but not all of the
properties are available for editing in WinRes.
Is there something I'm missing? I have source for the control - do I need
to add something to the control so that WinRes can display the properties of
the control?
Thanks!
Terry Tag: cannot add a top level control to a control Tag: 64238
Avoiding focus
I am trying to create a virtual keypad control for my
client's touch screen application (using Windows XP). I
have created a form, which I call Keypad, and in
CreateParameters have added WS_EX_NOACTIVATE to the
CreateParameter's ExStyle. This is supposed to tell the
form to not take focus. I put a label on the form and
hook into the Click event.
I start my main application form, which has a text box
control on it. I open my Keypad form, then select some
text in the main application's text box. When I click on
the label, the Keypad grabs focus and the selection in my
applications text box loses focus. I've tried several
things, but can't get the Keypad form to avoid grabbing
focus.
Can someone tell me what I am missing here? Tag: cannot add a top level control to a control Tag: 64233
Localization and winres
Hi,
I just ran into the localization utility "winres.exe". This is a pretty
handy little thing for translators, but one thing puzzled me:
Lets say I have a form with a single button on it. Caption is "button1".
Translator translates and I get the new resource file.
So fra so good. Now I decide that my form needs another button for v2 of my
application. Then what? If I send the translator the same default resource
file, he would have to start all over (not that big a deal with two buttons,
but what if there were 27 buttons and just as many labels).
Am I missing something here?
Best regards,
Sebastian Tag: cannot add a top level control to a control Tag: 64231
MouseUp event is raised when I double click my MDI form caption bar
Hi everybody:
I have a MDI application which has MDI forms containing every form a
list view that shows files and folders like Windows Explorer.
I have my own implementation of the context menu, so, I
programatically show it when the mouseUp event is raised over the list
view and the mouse button is the right button (quite obvious).
My problem occurs when I show the context menu, and after I maximize
the MDI form double-clicking the caption bar: My context menu is shown
again because the mouse up of the list view is raised!!!!
I searched in this group and I did not found similar problems and I
have no idea to solve this problem because the MouseEventArgs object
that my OnMouseUp() method receives is valid.
Any help will be very useful. Thanks in advance
Ernesto Tag: cannot add a top level control to a control Tag: 64222
Visible = False on Form_Closing...
Hi,
I have a MDIForm with some MDIChilds. When the user clicks on the "x" in the
upper right corner, I don't want the MDIChild to be closed, but the property
Visible = False.
So far no problem: I do this useing the Form_Closing-event in which I typed:
e.Cancel = True
Me.Visibible = False
But: When I Close the MDIParent, it wont shut down the whole application
because of the fact that those MDIChilds cancel the closing!
I tryed to put work with a boolean which is set to true when MDIParent is
closed, and first evaluated in the MIDChild_Closing-event, but that doesn't
work either, because of the fact that the Closing-event of the MDIChilds are
fired before the Closing Event of the Parent...
Anybody got any idea how to do this? Maybe with the Closed-event? This event
comes after the Closing-event, but I can't find someting in ot to Cancel the
closing of the form.
I guess there must be a 'nicer' way to do this: Maybe by handling the click
on the "x", and when it is clicked not to close etc etc...
Hoping for your help and thanks a lot in advance,
Pieter Tag: cannot add a top level control to a control Tag: 64217
AnchorStyles conversion
For a bitwise type like AnchorStyles the .NET runtime provides an easy way
to convert this to a string (like "Top, Left"), but is there an easy way to
convert it back again ? I've written my own method (see below) to do it but
it strikes me that there may be a much simpler way !
protected static AnchorStyles DeserializeAnchor(string a)
{
AnchorStyles retval = AnchorStyles.None;
if (a != "None")
{
if (a.IndexOf("Top") > -1) retval = retval | AnchorStyles.Top;
if (a.IndexOf("Bottom") > -1) retval = retval | AnchorStyles.Bottom;
if (a.IndexOf("Left") > -1) retval = retval | AnchorStyles.Left;
if (a.IndexOf("Right") > -1) retval = retval | AnchorStyles.Right;
}
return retval;
} Tag: cannot add a top level control to a control Tag: 64215
add item to listbox [what am I doing wrong?]
Ok, here's the deal. I tried to do this and it didn't work:
[Child Form "Form2"]
Event OK (ByVal item as Object)
'I cast it as Object simply because that's the type of a Listbox Item.
Private Sub Button1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Raiseevent OK(Lisbox1.selecteditem)
End Sub
--------------------------------
[Parent Form "Form1"]
Private Sub Form2_OK(ByVal item as Object) Handles Form2.OK
Listbox.Items.add(item)
End Sub
the fresh new item on Form1's Listbox shows "System.Data.DataRowView"
what's going on?!?!?!?!
thanx for all previous replies!
ignacio
----------------------------------------------------------------------------
------
>Hi Ignacio,
> I think it has something to do with not giving valuemember and
displaymember
> values (what values could I give? it's not bound)
You can bind a ListBox (via DataSource) to *any* object that implements the
IList interface. This includes Array or ArrayList. You just need to fill one
of these with suitable objects with a property for the string to display and
another for the data you need and set the DisplayMember and ValueMember
properties of the ListBox.
Cheers
Doug Forster
"Ignacio Martínez" <msnews@puturra.com> wrote in message
news:e3fiPPX0DHA.1708@TK2MSFTNGP12.phx.gbl...
> thanx for the 2nd response
> I had tried casting the [Object] Object from the child form to the parent
> form, but I only got "System.Listbox....something", instead of the text of
> the item I passed.
> I think it has something to do with not giving valuemember and
displaymember
> values (what values could I give? it's not bound)
>
> it's pretty damn hard!
> I wish I only had to show the text for the item, but I really need the ID
to
> continue using that item for other purposes on the parent form.
> anyway, thanx
> I posted this message on other MS groups but I got no reply so far.
> nice weekend!
>
> <anonymous@discussions.microsoft.com> escribió en el mensaje
> news:014b01c3d16e$4acbe4f0$a601280a@phx.gbl...
>
> >-----Original Message-----
> >ok, so basically I can't manually set the valuemember of
> a listbox item
> >(webcontrols are more flexible in this cases...)
> >
> >thanx!!!!!!!!
> >
> >"TB" <tbrown92030@kaxy.NOSPAM.com> escribió en el mensaje
> >news:01a401c3d168$ed142430$a401280a@phx.gbl...
> >
> >>-----Original Message-----
> >>Hey group!
> >>first of all, happy new year to everyone.
> >>
> >>I have a small problem that I haven't worked out yet and
> >it's driving me a
> >>little crazy.
> >>I have two forms with a listbox control on each one.
> >>
> >>the child form passes the selecteditem to the parent
> form.
> >>but I want to pass the whole item (Value Member, Display
> >Member) and I have
> >>no clue on how to do this.
> >>what I could do was to pass just the text as a parameter
> >in an event on the
> >>child form.
> >>but that doesn't suit my needs.
> >>
> >>I can't use databindings, because I need to do this
> >manually.
> >>is there a way to add the whole item????
> >>
> >>thanx in advance!
> >>ignacio martínez
> >>buenos aires, argentina.
> >>
> >
> >Ignacio,
> >
> >Usually when I need to get more data for a selected item
> >in a listbox I will set each item's "Tag" property to an
> >object that contains what I need -- usually an instance of
> >whatever object I am working with. Given a selected item,
> >you just cast it's Tag value to what you expect and you're
> >off!
> >
> >-- TB
>
> Lo siento, Ignacio,
>
> I'm afraid I didn't read your post carefully enough the
> first time around. ListBox controls are different from
> the ListView controls that I'm more used to. The latter
> accept "smarter" items (where each can have a tag). A
> listbox does not.
>
> Ok, so let me see if I am understanding your problem.
> When the user selects an item in your child form's listbox
> you want to pass along both the display member string
> *and* value member string for that selected object up to
> the parent form.
>
> The value data is, of course, the "SelectedValue" for the
> listbox. There is no corresponding "SelectedDisplay", but
> you can use "SelectedItem" to get the object you
> originally added to the listbox, cast it to the right type
> of thing, and then access the property directly. You can
> also get the value member this way.
>
> But you're right -- the ListItem Web object allows the
> text and value members to be specified but the normal
> Forms Listbox just takes untyped Objects for its items and
> applies the same DisplayMember and ValueMember properties
> to all.
>
> -- TB
>
> Tag: cannot add a top level control to a control Tag: 64214
IDesignerSerializationService
Hi,
I'm looking for examples, hints about a class which
implements IDesignerSerializationService (ns:
System.ComponentModel.Design.Serialization).
I'm trying to create a DesignerHost. The Copy and Paste
commands require that a IDesignerSerializationService
object is added to the Services of the ServiceContainer.
Without this it doesn't work. I can find any class which
implements this interface, strange!
Any help is appreciated.
Regards,
Fons Tag: cannot add a top level control to a control Tag: 64212
Treeview Control
Hi,
Does someone know how to print the content of the Treeview
control ?
I'm afraid it's not so simple !
Thanks for your help Tag: cannot add a top level control to a control Tag: 64208
Re: add item to listbox
Ok, here's the deal. I tried to do this and it didn't work:
[Child Form "Form2"]
Event OK (ByVal item as Object)
'I cast it as Object simply because that's the type of a Listbox Item.
Private Sub Button1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Raiseevent OK(Lisbox1.selecteditem)
End Sub
--------------------------------
[Parent Form "Form1"]
Private Sub Form2_OK(ByVal item as Object) Handles Form2.OK
Listbox.Items.add(item)
End Sub
the fresh new item on Form1's Listbox shows "System.Data.DataRowView"
what's going on?!?!?!?!
thanx for all previous replies!
ignacio
----------------------------------------------------------------------------
------
>Hi Ignacio,
> I think it has something to do with not giving valuemember and
displaymember
> values (what values could I give? it's not bound)
You can bind a ListBox (via DataSource) to *any* object that implements the
IList interface. This includes Array or ArrayList. You just need to fill one
of these with suitable objects with a property for the string to display and
another for the data you need and set the DisplayMember and ValueMember
properties of the ListBox.
Cheers
Doug Forster
"Ignacio Martínez" <msnews@puturra.com> wrote in message
news:e3fiPPX0DHA.1708@TK2MSFTNGP12.phx.gbl...
> thanx for the 2nd response
> I had tried casting the [Object] Object from the child form to the parent
> form, but I only got "System.Listbox....something", instead of the text of
> the item I passed.
> I think it has something to do with not giving valuemember and
displaymember
> values (what values could I give? it's not bound)
>
> it's pretty damn hard!
> I wish I only had to show the text for the item, but I really need the ID
to
> continue using that item for other purposes on the parent form.
> anyway, thanx
> I posted this message on other MS groups but I got no reply so far.
> nice weekend!
>
> <anonymous@discussions.microsoft.com> escribió en el mensaje
> news:014b01c3d16e$4acbe4f0$a601280a@phx.gbl...
>
> >-----Original Message-----
> >ok, so basically I can't manually set the valuemember of
> a listbox item
> >(webcontrols are more flexible in this cases...)
> >
> >thanx!!!!!!!!
> >
> >"TB" <tbrown92030@kaxy.NOSPAM.com> escribió en el mensaje
> >news:01a401c3d168$ed142430$a401280a@phx.gbl...
> >
> >>-----Original Message-----
> >>Hey group!
> >>first of all, happy new year to everyone.
> >>
> >>I have a small problem that I haven't worked out yet and
> >it's driving me a
> >>little crazy.
> >>I have two forms with a listbox control on each one.
> >>
> >>the child form passes the selecteditem to the parent
> form.
> >>but I want to pass the whole item (Value Member, Display
> >Member) and I have
> >>no clue on how to do this.
> >>what I could do was to pass just the text as a parameter
> >in an event on the
> >>child form.
> >>but that doesn't suit my needs.
> >>
> >>I can't use databindings, because I need to do this
> >manually.
> >>is there a way to add the whole item????
> >>
> >>thanx in advance!
> >>ignacio martínez
> >>buenos aires, argentina.
> >>
> >
> >Ignacio,
> >
> >Usually when I need to get more data for a selected item
> >in a listbox I will set each item's "Tag" property to an
> >object that contains what I need -- usually an instance of
> >whatever object I am working with. Given a selected item,
> >you just cast it's Tag value to what you expect and you're
> >off!
> >
> >-- TB
>
> Lo siento, Ignacio,
>
> I'm afraid I didn't read your post carefully enough the
> first time around. ListBox controls are different from
> the ListView controls that I'm more used to. The latter
> accept "smarter" items (where each can have a tag). A
> listbox does not.
>
> Ok, so let me see if I am understanding your problem.
> When the user selects an item in your child form's listbox
> you want to pass along both the display member string
> *and* value member string for that selected object up to
> the parent form.
>
> The value data is, of course, the "SelectedValue" for the
> listbox. There is no corresponding "SelectedDisplay", but
> you can use "SelectedItem" to get the object you
> originally added to the listbox, cast it to the right type
> of thing, and then access the property directly. You can
> also get the value member this way.
>
> But you're right -- the ListItem Web object allows the
> text and value members to be specified but the normal
> Forms Listbox just takes untyped Objects for its items and
> applies the same DisplayMember and ValueMember properties
> to all.
>
> -- TB
>
> Tag: cannot add a top level control to a control Tag: 64204
DataGrid - Apply Color on a Perticular Row
Dear Frnds
How can i apply different Back Ground color on the perticualar DataGrid Row.
i want to apply the color not with respect to row no but with respect to
information caried by the dataRow attached with it.
Thanks Regards
Mubashar Ahmad Tag: cannot add a top level control to a control Tag: 64202
HOW: Inherited forms and OnClick
Armin wrote on the 1st of Jan as a reply to Lorne Smith
"The designer creates the default procedure for events. Event procedures are
usually not Public Overridable. IMO, you should not change the signature in
the base class. If you want an overridable sub handling the Click, add an
Overridable OnButtonClick procedure called in the event handler of the base
class. In the derived class, override OnButtonClick".
Question 1:
Can anyone give an example (VB.NET if possible) on how to do that? I can't
find any. Not even the MSDE example for OnClick is about OnClick. I've got a
copule of books on Windows Forms (many of the good) and loads of online
articles, the authors avoid going into inherited forms, which is a pity,
since quite many questions in this discussion group seem to be about just
that.
Question 2:
I'm successfully using override, but now I get confused:
Lorne Smith writes: "when I put code in the sub, it was executed twice when
I ran the form. Now I realised this is because both the base form and the
inherited form are handling the event".
WHY does both the base form and the inherited form execute the event? I
thought override meant that the overriding method executes INSTEAD of the
overridden, not that both are executed. Why would I use the override keyword
if I want both to execute? But clearly Lorne is right in that both are
executed. I've considered that an oddity, but it is by-design then.
Kind Regards,
Kenneth Bohman Tag: cannot add a top level control to a control Tag: 64191
Cannot change ListView first column text alignment
I try to change the text alignment of the first column of a list view, ColumnHeader.TextAlign but seems it doesn't work. The first column is always default to left alignment, which is HorizontalAlignment.Left. I even try to insert the column in design time and set the column alignment to either center or right, but still the text displayed is left-aligned. Is this a known issue or bug?
thanks,
Woon Kiat Tag: cannot add a top level control to a control Tag: 64190
ShowDialog an MDI Child?
Hi,
I would like to know how I could do the above subject without getting any
errors?
Any help is very much appreciated.
Ramil Domingo
Developer Tag: cannot add a top level control to a control Tag: 64189
Using a .dll to display a form
I have developed a .dll to display a form that controls a simple routine.
Oddly, you can't use
messagebox.show
unless you do one of two things:
either use an imports system.windows.forms
or
system.windows.forms.messagebox.show etc
Now this is strange, because the form inherits as below:
Inherits System.Windows.Forms.Form
Why is this and what other problems may I expect to encounter?
Thanks for any advice.
Bernie Yaeger Tag: cannot add a top level control to a control Tag: 64187
Im getting this error when Im trying to set a owner for a form, Im not sure
what is wrong because I get this error only with one form. Enybody knows?
Re: cannot add a top level control to a control by jg
jg
Thu Jan 08 16:42:02 CST 2004
I just figured out, it works if I use AddOwnedForm instead of Owner
"jg" <ph-enom@obmocje51.net> wrote in message
news:%23gag1aj1DHA.832@TK2MSFTNGP09.phx.gbl...
> Im getting this error when Im trying to set a owner for a form, Im not
sure
> what is wrong because I get this error only with one form. Enybody knows?
>
>