How to implement an notification window like "MSN messenger friends online notification"
Hi,
I'm developing a notification application using winform.
It is shown as a tray icon when running, and when a message arrive (such as
new mail alert), it should pop up a notification window in the right-bottom
of the desktop, just like msn messenger's friends online notification.
Anybody can tell me how to implement this?
Some sample code or reference document will be much appreciated!
Regards,
William Li Tag: c# listbox onselect Tag: 83139
Embedded WinForm Control in IE crashes...
Hello,
I have a WinForm control embedded in IE that crashes everytime I close
my browser. If i click on a link in IE when the control is loaded and
brings me to another page, IE also crashes. I don't get any debug
errors from IE itself (via IEDebug). Does anyone have any idea why
this would happen? As a standalone App, my control works fine. Is IE
treating my control any differently?
Thank you in advance,
Marco Tag: c# listbox onselect Tag: 83138
Intercepting text a RichEdit/Textbox control in another application?
Hi,
Anyone know how to intercept the messages/text to a textbox control in
another application using .Net? I know that Spy++ can do this, how is
this accomplished?
Been trying to avoid using global hooks to do this, but i don't know of
any other way.
As a workaround, I've been able to use the SendMessage with WM_GETTEXT
to poll the control on a timer to retrieve the text, but ideally I'd
like to intercept the messages to the textbox instead, if at all
possible.
Any advice?
Thanks,
kc Tag: c# listbox onselect Tag: 83137
User Control binding
Hi, i´ve created a user control that contains a TextBox and a Label, lets
call this control CText.
CText has properties like Value and Text, where Text is used to display
formatted Value.
Well, i´m trying to create a new databind using:
cText1.DataBindings.Add("Value", wDataTable ,"TableField1" );
_CM = (CurrencyManager) this.BindingContext[wDataTable ];
_CM.AddNew() ;
Then, when submitting the form (winform), i call
_CM.EndCurrentEdit();
...where it is supposed that the bindingcontext datasource should be
updated..., but this is not working as expected.
-> Tried the same with a TextBox and it works....
-> MSDN : You can simple-bind to any object that derives from the
System.Windows.Forms.Control class...., and UserControl does, so what´s the
problem??
any suggestion?
ErickG Tag: c# listbox onselect Tag: 83135
Wheres system.windows.forms?
Hi All... I'm trying to us a control that requires using
system.windows.forms. I'm getting a compile error tho - it doesnt understand
system.windows.forms. I installed VS .Net 2003 pro. What am I missing? Do
I need to download somethign else? Thanks for the help. Tag: c# listbox onselect Tag: 83129
Hiding non-databound hyperlinks in a DataGrid
I am brand new to ASP.NET and am now required to take over maintenance of a
.NET/C# web application. On one of the pages I'm working on there is a
DataGrid which has multiple columns. One of the columns is not databound and
instead has up to three hyperlinks in it (Edit, Award, and Cancel). A couple
of the hyperlinks should not be shown in certain cases. Now, mind you, I
don't know if it's being done in the way that's best to do it. It looks like
there is a "panel" being created to contain the hyperlinks that may not be
visible. I don't know why though (i.e. why not just set hyperlink's Visible
property and be done with it without a panel?). That being said, I want to
change the page so that one of the hyperlinks does not show (i.e. Visible =
False) based on a certain value for a session cookie. It's the Award link in
the code shown below from the .aspx file in question.
--- CODE BEGINS ---
<asp:TemplateColumn HeaderText="Actions">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:HyperLink id="hlEdit" runat="server" NavigateUrl='<%#
"Edit.aspx?id=" + DataBinder.Eval(Container, "DataItem.PersonID") %>'
CssClass="link-text"> <!--onMouseOver='<%# "javascript:toolTip(\"" +
DataBinder.Eval(Container, "DataItem.PersonToolTip") + "\");" %>'
onMouseOut="javascript:toolTip();">-->
Edit
</asp:HyperLink>
<asp:Panel ID="Panel1" Runat="server" Visible='<%#
Convert.ToBoolean(Convert.ToInt32(Request.Cookies["core"]["sl"]) <= 9)%>'>
<asp:HyperLink id=hlBids runat="server" Visible='<%#
Convert.ToBoolean(Convert.ToInt32(Request.Cookies["core"]["sl"]) <= 9)%>'
NavigateUrl='<%# "Award.aspx?id=" + DataBinder.Eval(Container,
"DataItem.PersonID") %>' CssClass="link-text">
Award
</asp:HyperLink>
</asp:Panel>
<asp:Panel ID="panAction" Runat="server" Visible='<%#
Convert.ToBoolean(DataBinder.Eval(Container,
"DataItem.PersonStatusCancel"))%>'>
<asp:HyperLink id="hlCancel" runat="server" NavigateUrl='<%#
"Cancel.aspx?id=" + DataBinder.Eval(Container, "DataItem.PersonID") +
"&op=cancel" %>' Visible='<%# Convert.ToBoolean(DataBinder.Eval(Container,
"DataItem.PersonStatusCancel"))%>' CssClass="link-text" >
Cancel
</asp:HyperLink>
</asp:Panel>
</ItemTemplate>
</asp:TemplateColumn>
--- CODE ENDS ---
Now, the value of the cookie, when I bring up this page, is 1, which
satisfies the condition...yet, the link still shows. I guess my question is
two-part:
1) What is the best way to accomplish something like this? Do I have to use
a DataList instead or can it be done using a DataGrid?
2) If this is best way to do it, then what's wrong with code above? Tag: c# listbox onselect Tag: 83128
Using Usercontrol on form
I created a usercontrol in one project. I want to place the same usercontrol
on more than one form in the same project. How do I do this?
--
Thanks for your help.
Harshad Rathod Tag: c# listbox onselect Tag: 83127
Send a user defined message/event to form controls
HI,
it's possible to "send" a custom message/event to a form, so the
controls that "implements" an handler to this event process it?
As an example,
I definied a custom list view, that after an item select raise a custom event
"UpdateText"
In a form i have
- custom button control
- custom label control
- custom textbox control
that should update their text, with the one selected in LIstView.
Thanks in advance
Best Regards
Massimo Tag: c# listbox onselect Tag: 83122
File.CreateText fails
I am developing a Windows application. The source is stored on a
network share, probably 6 directories deep.
When I say:
File.CreateText("G:\temp\" & _dataSourceInfo.Csv_filename)
the file is created OK on the local disk G in directory temp. However,
when I say:
File.CreateText("%temp%\" & _dataSourceInfo.Csv_filename)
it fails with a Directory not found, and is trying to create:
\\networkShare\...\Application\bin\%temp%\CSV_Filename
Why is this happening? Something to do with security?
TIA Lars Tag: c# listbox onselect Tag: 83120
problem with Timer (WinForm)
I have a Winform running and a timer (winform) firing each 3 min to make a
transmition of data..I'm ok about the UI stoping for a while, the problems is
that the timer fires two times in every interval, even if I use Timer.Stop.
It seems that the stop instruction is not stoping the timer associated counter
Private Sub TimerTransmite_Tick(....)
TimerTrans.Stop()
Transfer()
TimerTrans.Start()
End
Any Sug?
--
Kenny M. Tag: c# listbox onselect Tag: 83118
setting the parent property from MDI child form in c#
How can I enable/disable Main Menu Item on MDI Parent Form
when a Child form is loaded?
Is it possible?
In one child form i the code below on the button click event.
The first line of code has error. I also dunno why may be it is not possible
to instantiate the parent form while it is active?
frmParent mdiParent=new frmParent();
mdiParent.mnuFileNew.Enabled=false;
Thanks. Tag: c# listbox onselect Tag: 83117
Warning: The event 'Application.SAMPLETableAdapter.RowUpdated' is never used
In my applicaton I attend the RowUpdated event for retrieving the
autonumber IDENTITY from Access Database (no stored procedure support) of
new inserted row from one of my tables (SAMPLE). I did accordantly to the
microsoft's tutorial:
1) I declare:
public event OleDbRowUpdatedEventHandler RowUpdated;
in the body of definition SAMPLETABLEAdapter (object of this class is the
gSampleTableAdapter for SAMPLE table, in which RowUpdated event I want to
detect, when I insert new row)
2) I Placed this line of code:
gSampleTableAdapter.RowUpdated += new
OleDbRowUpdatedEventHandler(OnRowUpdated);
and below mentioned line i placed the code which can invoke this event:
gSampleTableAdapter.Update(dataSetSample.SAMPLE);
3) and finally I define OnRowUpdated function:
protected static void OnRowUpdated(object sender, OleDbRowUpdatedEventArgs
args)
{
OleDbCommand command = new OleDbCommand("SELECT @@IDENTITY",
oleDbConnectionDlaID);
if (args.StatementType == StatementType.Update)
{
IDnewAddedRow = (int)command.ExecuteScalar();
MessageBox.Show("Database retrieve ID:" + IDnewAddedRow);
args.Row["ID_SAMPLE"] = IDnewAddedRow;
}
}
Everything compliles OK, except this one Warning:
Warning: The event 'Application.SAMPLETableAdapter.RowUpdated' is never used
what it's mean ???
When I checked the sample table in the access, I see, that the new rows are
propery added, but is something wrong with this mechenism...
Where is the case !! Please help me, because i'm starting to get nuts..... Tag: c# listbox onselect Tag: 83112
Validating of control data on Windows Forms
My question is there any way to trigger controls validation from the
code?
I have a form where user can enter some query parameters and execute
the query. Each control (TextBox, DateTimePicker etc.) has Validating,
Validated handlers. If the user edits query parameters manually
validation code is executed upon leaving control which is just edited.
The application can also read default data from config file/command
line. Such data is used to populate form controls upon form
creation/loading but it does not trigger validation process.
Is there any standard way to cause the Form to perform validation for
all controls on the form? For all controls on particular panel? Tag: c# listbox onselect Tag: 83106
Embedded Control in IE keeps crasking...
I have an embedded control that works find when its in a standalone
application (executable) but when it is embedded in IE it crashes
everytime i close IE with it loaded or click on a link to another
page.
Any ideas?
Thanks in advance,
Marco Tag: c# listbox onselect Tag: 83105
Windows XP ComboBox bug when using "Windows Classic Style"
I found a very odd bug while developing a Forms app with Visual Studio
2003. If you have a ComboBox with no items in it, when you click the
arrow, an empty drop down list is displayed which is the height of 1
item. In Windows XP, this all works fine if you have your "Windows and
Buttons" Display Setting to "Windows XP Style". However, if you change
it to "Windows Classic Style", when you click the arrow in your
combobox, it does not show the empty drop down list. Worse yet, the
system "thinks" it is displayed so the UI is "locked" (just like when a
drop down list is displayed) and your next click on the app will do
nothing, because this is what would normally close the drop down list.
A couple things to note:
-If the combo box is not empty, it always properly displays the drop
down list
-It is not limited to .NET, I built a C++ app with Visual Studio 6.0
and get the same behavior
-There are rare circumstances where it does work correctly in "Windows
Classic View." Sometimes an empty combobox DOES display the empty drop
down list, but it seems to be very rare. I can not explain why
sometimes it does and sometimes it doesnt. I have not been able to come
up with a scenario where I can consistanly get the empty drop down list
to display in "Windows Classic View", in fact, I have only gotten it to
happen a couple times.
Here are the steps to reproduce (Must be running Windows XP):
-Set your style to "Windows Classic Style" by right-clicking empty
space on your desktop, select Properties, click the Appearance tab and
select the "Windows Classic Style" in the "Windows and buttons" drop
down list
-Open Visual Studio and create a simple Windows App. Drag a ComboBox
onto the Form. Press Ctrl + F5 to build and run the app.
-You *should* see that when you click the arrow in the ComboBox, it
does not display the drop down list.
-Change your style to "Windows XP Style"
-Now when you run the app you will see the drop down list DOES appear. Tag: c# listbox onselect Tag: 83104
Set 'RunAs' property programmatically for WinForms VB.Net applicat
Hi,
in a .Net 1.1 WinForms application I have a dialog that lets the user set
new network credentials.
Question: How can I assign the new credentials - say nc, defined by
Dim nc = New System.Net.NetworkCredential(M_User, M_Password, M_Domain)
- to the running (VB.Net -) application, so that the application behaves
like being started in 'RunAs' dialog?
Thanks for help in advance!
--
Best regards
Henry Tag: c# listbox onselect Tag: 83102
print top 1/3 of A4 paper in C# winform application
Hi,
In my application, I need to print bank checks. The height of check is
about 1/3 of the A4 paper and I use dot matrix printer for printing. Since
my printable bank checks are in a roll, I need to stop printing when one
check is printed, i.e. the printing job must stop in the middle of paper.
I'm using a hidden web browser control for presenting the bank check to
print. How can I do this?
Thanks.
Sung. Tag: c# listbox onselect Tag: 83100
Datagrid calculations
I have a windowsform datagrid with a tablestyle and a columnstyle. I need
to calculate a value from two of the columns and place it a third column.
This needs to happen as leave the column this the last value needed to make
the calculation or when I leave the row. How can I do this using VB?
JD Tag: c# listbox onselect Tag: 83097
font color in child window applicaiton
Hi,
Recently I took a test in .NET windows application. I had to create a window
application in C#. The application has a dropbox with four items (people's
names)
The next question that I couldn't do figure out is:
pick up a name in the drop box list then hit control + L. I should open a
window applcation (form) with that name in the textbox with the assigned font
color...It means I must open four window forms with four different names in
its unique font color for example: dave (red), Jenna (blue), Bob(green),
Ginny (purple).
Please help,
Thanks,
david c. Tag: c# listbox onselect Tag: 83096
ColumnHeadersVisible property failing
I''ve got a datagrid on a windows form that I'm formatting using a custom
table style. Within the code that sets the style up I have
tsName.ColumnHeadersVisible=false.. but they are still displaying. Any
ideas why that might be?
Thanks Tag: c# listbox onselect Tag: 83095
Anyone know how to emulate this behavior
I have been asked to create and application that basically
visually emulates the relationship builder in Access and Sqlserver.
Are there any examples out there that show how to do this?
Thanks
Nick Tag: c# listbox onselect Tag: 83094
BUG: Nested groupbox in .NET 1.1 SP1 shows corrupted caption in themed
Hello,
.NET 1.1 SP1 contains a nasty bug (.NET 2.0 beta as well) which makes
nested groupbox controls to show a corrupted caption text (in bold,
which is chopped off) if the windows forms application is run on a
themed XP system (i.e.: with windows themes turned on) and flatstyle is
set to System (to enable visual styles).
This affects all applications written for .NET and which use windows
forms and nested groupbox controls, applications which used to work
perfectly on .NET 1.1 but are now showing corrupted caption.
See for a screenshot:
http://weblogs.asp.net/fbouma/archive/2005/01/20/357210.aspx
See for a repro case:
http://weblogs.asp.net/fbouma/archive/2005/01/21/358006.aspx
As the bug is pretty severe, and requires ISV's to change their
applications to make them work on .NET 1.1 SP1 while there is nothing
wrong with their code, I'd like to ask Microsoft to fix this a.s.a.p.
I tried to contact PSS / online support but apparently I have to pay (!)
for sending this information to MS, so I try to get your attention
through the newsgroups.
Please fix. Thanks.
Frans.
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------ Tag: c# listbox onselect Tag: 83089
Scrolling Problems in a Form
Hi everybody,
I have a little problem, no two. First my english is not quiet good so
please try to understand what I want and help me, please ;) And second:
I habe a Form. In this form is a ScrollableControl (modified, so it could
raise scroll events), containing another Control painting an image. Okay,
everything works fine, but if I deactivate the Form (it's a mdi child form)
and activates another Form and than go back, the scrollbars are reseted to
the default settings, very top and very left! I will get the same behavior,
when I deactivate the hole application an than activate it again. If the
mdi-child Forms are deactivate, there are showing the right scrollbar
positions and the correct clipping of the image. Only when I activate the
form, the form resets the scrollbarpositions :(
Me first solution is, receiving the activate Event raised by the form and
than set the scrollbar positions. This dosn't work! Than I try the receive
all window messages to get the WM_ACTIVATE, WM_MDIACTIVE, WM_NCACTIVATE,
WM_SETFOCUS and the WM_IME_SETCONTEXT messages. If I acted on these messages
I got a really funny behavior of me application. I have deactive (by
clicking to no application on taskbar) and than have activate (by clicking
the taskbar icon), than the scrollbar shows again the wrong position, but
when I moved the mouse of the form, the scrollbar reposition them self and
show the correct positions.
Now I react on every message posted throu the WNDPROC function and set the
scrollbar positions. This works, BUT if I do a large/small de/in-crement
scroll with one mouseclick the scrollbar do the de/increment and immediately
set them back to the previous position. This isn't good :(
Maybe some of you know the correct window message, so I can set me
scrollbars I the form will activate by clicking the nonclient or client
area, or the application and so on.
Have many, many thanks
Robert Groß Tag: c# listbox onselect Tag: 83082
Datagrid with colored columns pausing during setup
I have a windows form that contains a datagrid with columns given coloured
backgrounds via the DataGridColoredTextBoxColumn class. Data is loaded, and
the table style set up, during the load event of the form. At present, the
form half displays, then pauses, then completes. Is there any way of
telling it to complete the set up _before_ displaying anything?
Thanks. Tag: c# listbox onselect Tag: 83081
2 Simple Questions
Hi everyone,
I have what I think are 2 pretty simple questions. I know I have done it
before, but can't remember how I did it.
#1: I have a windows form with a textbox. The textbox is getting filled
from within a function. I need to have the scroll buttons on the text box
accessable at all times, not just when the loop that fills it gets back
around to the application.doevents line. I'm pretty sure there is an easy
way to do this with threading.
#2: This one is really dumb, but I'm having a slow day. How can I get the
text box to autoscroll to the bottom everytime & add text dynamically to it?
Thanks all in advance,
Matt Tag: c# listbox onselect Tag: 83073
ListBox: How to only fire SelectedIndexChanged if the an item is directly selected.
I would like to only fire SelectedIndexChanged if the an item is
directly selected.
example:
I have a listbox with a few items in it. These items only half fill the
listbox. If I click in the listbox, but not directly on an item (that
is in the bottom half of the listbox), the bottom item is selected.
Any ideas?
Thanks!
Felix Tag: c# listbox onselect Tag: 83072
Creating a Form From A Non-UI Thread
I have a non-UI assembly that contains a Form similar to the MSN Messenger
pop-up that appears when a user comes online. I have a Timer in this assembly
that on regular intervals goes and looks for new information and if it finds
any, displays the Form to the user right above the System Tray.
My problem is that the Form comes up alright, but it seems to not be getting
any Windows events like Paint and Click. Also, when I put my mouse over the
Form an hour-glass displays. I am assuming that there is a problem with the
Form being called from the Timer thread and have been trying to figure out a
solution with no luck. One note, Iâ??m trying to design this assembly to be
called from a normal WinForms application and an application that starts in
the System Tray so it might or might not have a Form running. Any help would
be greatly appreciated! Iâ??m done with this project except for this one
â??majorâ?? problem.
Thanks,
David
=====================
David McCarter
www.vsdntips.com Tag: c# listbox onselect Tag: 83070
FileSystemWatcher fails
I have an app (that should really be a service, but I haven't got round to
it yet) that just monitors a network folder via a filesystemwatcher for new
files and then does its thing. Generally, it works fine, but it fails about
once a month - which is about one every 2-3 hundred files. No error message
or exceptions... it just fails to notice that the file has appeared. After
that, any other new files are also ignored.
I'm thinking of switching to a dir function running every ten seconds or
so....but was wondering if anyone had any ideas about the situation. Tag: c# listbox onselect Tag: 83068
Colour schemes
Has anyone done any research (or even just any ideas) on the best colour
scheme to use for forms? I don't like the default grey background.... but
is it the best?
Thoughts? Tag: c# listbox onselect Tag: 83067
ComboBox DroppedDown property bug. If set in constructor, WndProc messages are missing
I believe I have found a bug in the System.Windows.Forms.ComboBox
object. Quick background, there is a ComboBox event for when the drop
down list is shown, but not one when it is closed. This is because the
ComboBox does not receive any messages when it's drop down list is
being closed. It's parent is what receives the CBN_CLOSEUP event
notification (from the WM_COMMAND message). I wanted to know when a
ComboBox was closing its drop down list so I created a UserControl with
one ComboBox in it. I then overrode the UserControl's WndProc, looked
for WM_COMMAND message and so on.
Now for the bug...
When I use this UserControl on a form, all worked fine. But to get the
UserControl to act more like a ComboBox, I have to expose all the
ComboBox properties by declaring them through the UserControl as
properties. The first one I did was the DroppedDown property. Here is
where the bug comes in. In the constructor (New subroutine) of the
MainForm for the windows app, set the DroppedDown property of the
UserControl to False. Now when you run the app the WM_COMMAND message
is never sent to the UserControl. Uncomment out the DroppedDown = False
in the Main Form constructor and the WM_COMMAND messages are now
getting sent again. The steps to reproduce are below. I am not sure
what is all effects, but I am running VS 2003. I believe it occurs in
both C# and VB.NET along with Debug and Release mode.
Steps to reproduce...
-Open VS and create a new VB Windows Application (named MyTestApp)
-Once it is open, right click on the project in the Solution Explorer,
and select Add User Control (named UserControl1)
-In the user control, add one combo box (named ComboBox1)
-In the code for the user control, override the WndProc function (copy
and paste) (Note that &H111 is WM_COMMAND)
Protected Overrides Sub WndProc(ByRef msg As Message)
MyBase.WndProc(msg)
If (msg.Msg = &H111) Then
Dim x As String = ""
End If
End Sub
-Also in the code for the user control, expose the ComboBox's
DroppedDown property (copy and paste) (Make sure to include the
DefaultValue property)
<System.ComponentModel.DefaultValue(False)> _
Public Property DroppedDown() As Boolean
Get
Return ComboBox1.DroppedDown
End Get
Set(ByVal Value As Boolean)
ComboBox1.DroppedDown = Value
End Set
End Property
-You are done with the UserControl, now go to the designer for the Main
Form (Form1)
-Drag a ComboBox from the "Windows Forms" tab in the toolbox anywhere
on the form
-Go in the code for the Main Form and change the two occurances of
"System.Windows.Forms.ComboBox" to "MyTestApp.UserControl1"
-In the UserControl code, put a breakpoint on the Dim x As String = ""
line and press F5 to run the application.
-You should see the breakpoint hit before the app even fully loads
because the UserControl will have focus, which CBN_SETFOCUS is on of
the WM_COMMANDs that is sent
-Once you verify that the breakpoint is hit, press Shift+F5 to stop
debugging
-Now go into the Main Form's code and find the New() sub (it will be in
the "Windows Form Designer generated code" region)
-Right after the InitializeComponent() call, set the DroppedDown
property of the UserControl to false (copy and paste)
ComboBox1.DroppedDown = False
-Make sure your breakpoint is still set on the same line and press F5
to run the app again.
This time you will notice that by setting the DroppedDown property in
the constructor, the UserControl now does not receive any WM_COMMAND
messages. Comment out the line and you will see that once again it
receives the messages.
I cant figure out why this is. It seems to be a bug, but I would
imagine it does not come up that often. Here is a similar topic I found
but I am not sure if it is the same behavior. It references a HotFix
from Microsoft but that does not sound like the same behavior I am
getting.
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.windowsforms.designtime/browse_thread/thread/2bf345185534b268/b02fad6f3c9afc85 Tag: c# listbox onselect Tag: 83062
HowTo:Change disabled control font color?
When a textbox/text area/dropdownlist is disabled, the font is grayed out.
Can I change the default color of disabled control to black?
I tried to override Disable/Enable property of textbox and set 'ReadyOnly'
instead of diabling the control. It works for textbox only because dropdown
list doesn't have 'READYONLY' property.
Any suggestion? I am thinking change system font settings from inside the
application. Anybody had the luck doing this?
strout Tag: c# listbox onselect Tag: 83059
Problem with a timer
I have a Winform running and a timer (winform) firing each 3 min to make a
transmition of data..I'm ok about the UI stoping for a while, the problems is
that the timer fires two times in every interval, even if I use time.Stop.
It seems that the stop instruction is not stoping the timer associated counter
Private Sub TimerTransmite_Tick(....)
TimerTrans.Stop()
Transfer()
TimerTrans.Start()
End
Any Sug? Tag: c# listbox onselect Tag: 83053
Pre Load a form
Is there any way to preload a form in VB.NET of how can I avoid seeing when
a form is loading, how it is painting all the controls it contains?
I think in VB6 I could use Load(frmTest) and after it is loaded, show it.
Thanks Tag: c# listbox onselect Tag: 83049
Full Row Selection In DataGrid
Hi,
I need to implement the full row selection on the datagrid, just as it works
on the list view, You know if you press control, or shift, and then click on
a row, well, select rows just as windows explorer does.
I have done somthing like catching the mouse_down event, get the row
clicked, and select it, but I have problems when you need to drag this rows,
because I dont
want them to deselect, and they deselect.
I another thing, if I put the same logic on the mouse_up event, it does not
work,
I dont know why, the grid doesn't render after the mouse_up event.
Any Ideas?
Or if you have already done this, please share it... =) Tag: c# listbox onselect Tag: 83041
How to launch a no-touch deploy windows form application from Brow
I have the need to kick off a no-touch deploy windows form application from a
browser. I have successfully launched simple applications but this
application is using remoting and serialization and has the need of a
configuration file. Our situation is that we are moving towards having an
internet portal which will serve as a launching pad for all of our interanal
applications. At the same time we're also hoping to move towards more thick
client business apps. Is there a way to seemlessly launch an application
which requires remoting, serialization, and a configuration file? Tag: c# listbox onselect Tag: 83039
DateTimePicker default value
I am working on an application created by another person. And I am
confused with the default value of the dateTimePicker.
One dateTimePicker always set the value to the current date/time in
property window. (actually no value is set by look at the generated
code)
But another one had the value set to a past date and I just CANNOT
remove it from property window. I can easily set the value in code but
anyone know how to remove the value.
TIA.
John Tag: c# listbox onselect Tag: 83038
Dynamically Added Textbox (no KeyDown, KeyUp, KeyPress events fire)
I am having a strange problem with a textbox that I am dynamically
adding to a form.
What I am currently doing
-------------------------
I have a set of questions defined in a database. Each question can have
a variable number of possible responses and can be laid out
differently.
I have an answer factory class that gets the correct answer control
(RadioButton, TextBox, CheckBox) and provides it to a question control.
The question control then adds the answer to one of its panels. All
this seems to work a designed...I can add any number of questions and
answers to a question list control in a variety of different layouts.
The Problem I am Encountering
-------------------------
The problem occurs with textbox controls. They display correctly,
however, the KeyDown, KeyUp, and KeyPress events are not firing for the
textboxes (in other words, I can't type anything into the textbox).
However, if I have 2 textbox controls in the same container (panel), I
can always get the KeyUp, KeyPress, and KeyDown events to fire by
tabbing from the first textbox to the second. Once I do this, I can
then start typing into both textboxes without problem.
I am completely stumped.
Thanks for your help,
Doug Tag: c# listbox onselect Tag: 83034
Bug in Windows.Forms ?
Hi!
I'm getting the attached Exception.
The Exception was thrown when I was just moving the Mousepointer over a
Form.
The Exception is thrown only sometimes and I'm not able the reproduce the
Problem.
Can some give me a pointer please?
Thank you very much,
Christian
System.NullReferenceException: Der Objektverweis wurde nicht auf eine
Objektinstanz festgelegt.
at System.Windows.Forms.ListViewItemCollection.get_Item(Int32
displayIndex)
at System.Windows.Forms.ListViewItemCollection.CopyTo(Array dest, Int32
index)
at System.Windows.Forms.ListView.OnHandleDestroyed(EventArgs e)
at System.Windows.Forms.Control.WmDestroy(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmClose(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at client.clientMDI.Main(String[] args) in ..........\clientmdi.cs:line
506 Tag: c# listbox onselect Tag: 83032
Deploy Crystal Report without modify HKEY_LOCAL_MACHINE
Hello!
We developped a .NET Application, which includes some Reports. We created a
Setup Projects, including the CR merge modules, specifing there our CR
licence key.
Now we have the problem that we need to deploy this application on computers
where the users do not have the right to modify the keys under the
LOCAL_MACHINE registry path.
Is there a possibility to save the entry HKEY_LOCAL_MACHINE\SOFTWARE\Crystal
Decisions\Crystal Reports\VSNET\Keycodes\CR9 NET under the HKEY_CURRENT_USER
path or inside a file?
Thanks a lot for your help.
Best regards,
Patrick Tag: c# listbox onselect Tag: 83031
DataGrid Control Selected Index
Hello,
I am using a DataGrid control to populate an all customers list. I would
like the users to be able to scroll up or down the list press Enter and the
customer record populate on another form. I am able to accomplish this only
with the Click Event, and it only works if you Click the Row Indicator on the
far left side of the DataGrid.
The problem seems to be realed to the cells of the DataGrid having focus at
the time when the Enter key is pressed. I've tried using the
CurrentCellChanged event and still cannot get the KeyUp Event to fire.
Is there anyway to accomplish this? I would rather cell browsing not be
available to the users and the DataGrid's RowIndicator to all ways have focus.
Any Help is appreciated.
Thank you Tag: c# listbox onselect Tag: 83027
DATA GRID and CTRL C
C# - Windows application.
Datagrid class... Data grid is populated with records. (see the code below)
Select one of the entire row from the grid (selected gfrom outside left
boundary).
The row gets highlighted...
Press CTRL C to mimic copy functionality.
boom!!! unhandled exception---
Please help my application is on production......!!!!!!!!!!!!!!!
NO do not suggest me to go to some thirdy party controls.....
Waiting positively for response TODAY
Following is the code just in case if at all really some one is going to read
Cursor.Current = Cursors.WaitCursor;
DataSet DSCycleHistory =new DataSet();
m_FiscalYear = cmbFiscalYear.Text;
sSql ="SELECT * FROM " + Global.TABLE_CYCLE_COUNT_HISTORY + " where
trim(to_char(execution_date,'YYYY')) = '"+m_FiscalYear + "' ORDER BY
COUNT_ID" ;
DSCycleHistory=OracleHelper.ExecuteDataset(Global.sConnStr,CommandType.Text,sSql);
//dgErrors.DataBindings =DSError;
//dgErrors.TableStyles[0].AlternatingBackColor = Color.Gray;
dgHistory.DataSource = null;
dgHistory.Enabled = false;
dgHistory.SetDataBinding(DSCycleHistory,"Table");
dgHistory.TableStyles[0].AlternatingBackColor = Color.LightGray;
dgHistory.Enabled = true;
dgHistory.PerformLayout();
dgHistory.Refresh(); Tag: c# listbox onselect Tag: 83025
How to attend click button even on to in order to don't close form called by ShowDialog?
I have my own windows form with some contrlos to set a few parameters.
I show this form by frm.ShowDialog(). How I have to proram the button which
sometimes should close form but in another time, the buuton should give a
messagebox (with warning message: "Some parameters are incorect") and not to
close form, but continue form's focus to correct thiese parameters?
I tried to set the button.dialogresult = dialogresult.None, ut it doesn't
work. The form has been still closing...
Sorry for my english, but I'm beginner ;-) Tag: c# listbox onselect Tag: 83016
Handle changes in system font size
I need to write a graphical UI with non-Windows look and feel
(Irregular-shaped bitmapped controls and forms)
but is having probelm when i update the System font size settings.
(e.g. 96 dpi -> 120 dpi)
Is there any docs from Microsoft on reccommended ways to
handle the font size change?
Thanks.
--
Regards,
Hin Tag: c# listbox onselect Tag: 83013
TopMost problem
Hi guys.
I am writing an aplication with C#.Net in VS.Net2003
I have a Mdi form wich has 2 child forms.
How can I set one of the child forms as a topmost ?.
When I set TopMost property to true it does not work.
I tried every thing but nothing helps.
Can anyone send me an example of code.
Thanks Tag: c# listbox onselect Tag: 83007
Can't override ShowDialog
Hi:
I have a set of derived forms that I wish to implement an 'Execute' method
to launch these forms, but I also wish to hide the 2 inbuilt ShowDialog
methods so these can't be called unwittingly.
I have tried:
private new DialogResult ShowDialog() { }
private new DialogResult ShowDialog(IWin32Window aParent) { }
but these are completely ignored and the 2 methods are still visible and
usable.
How can I hide these?
TIA,
Martin. Tag: c# listbox onselect Tag: 83006
Probs with visual inheritance and DataGrid columns
Hello!
I've got the following problem: I add a form frmBaseForm to my project, this
form contains the DataGrid named let's say dgInvoices which has the table
style named tsInvoicesData with several column styles named: tsCompanyName,
tsValid, tsValidUntil. Then I add an inherited form to the project, which
inherits frmBaseForm that's where the problems start: in the inherited form
I have a DataGrid with the same name as on the base form dgInvoices, BUT the
table style name is DataGridTableStyle1, more than that, column styles names
(shown in property browser) are DataGridTextBoxColumnStyle1,
DataGridBooleanColumnStyle1, DataGridTextBoxColumnStyle2. Why it happens
this way? Why Buttons, TextBoxes, Panels etc. are shown in the inherited
form with the same names, but Table/Column styles are not. The most
interesting thing is, that if I go through inherited form members in
run-time using Reflection I find these Table/Column styles under names which
are assigned to them in the parent form (tsInvoicesData, tsCompanyName,
tsValid, tsValidUntil) not which are visible in the property browser for the
inherited form. Could please explain me this weird behavior of the IDE, is
it normal or not, if it is normal, then WHY?! If not, then is this fixable
and how? Tag: c# listbox onselect Tag: 83005
Custom Control Property HelpText Property
Yeah, reading the subject, it makes no sense...but here goes..
I made a textbox control w/ some added features...the problem is, whenever I
go to use it, I forget what my custom properties do. Is there a way to put
helptext into the custom properties so it appears in the bottom of the
property window like all of the standard properties of standard controls? I
think if it can be done it has something to do with accessing the appropriate
attribute of the property using the system.reflection namespace...but yeah, I
don't know, that's why I'm asking! Tag: c# listbox onselect Tag: 82998
"Restructure a Windows application" from scratch in 2 months
Hello Everybody,
Please guide me so that I can fulfill this challenging assisnment ...
I have been asked to "Restructure a Windows application" from scratch in 2
months. The existing application which is working but it is very heavy as no
proper application architecture and layering has been followed for this. It
was really hard to maintain (as I was maintaing it till now) .
First let me tell u a bit about my application ...
This appliction uses Window forms UI with a lot of panels put one on the top
of other.There are few separate forms for login etc. This UI interact with
webservices to get the data from our database and show in turn on UI. Three
Windows services are updating our database from some other remote database
after regular interval. So in this way we keep our database updated with
real data. Thus client UI don't has to wait for long to get the real time
data directly from the original source.We are currently deploying the Client
UI from web and using C# as language.
Being new to dotnet technology, I don't know how to start with this. Some of
the facts/questions that are coming to my mind after studying my application
and the concepts ...
1.
There is a lot of hype and demand about UML Tools like "Rational Rose" etc.
I want to use it to redevelop my application.
2.
Microsoft recommends the "Application pattern and practices" to design the
application. I am presently going through the following topics ...
.NET Data Access Architecture Guide
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daag.asp
Desinging Data Tier Components and Passing Data Through Tiers
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/BOAGag.asp
Although these are very good resources but these are very vast and taking a
lot of time. Sometimes I am not able to follow these articles as I don't
have extensive experience.
Could you please point me towards 1 or 2 sample applications of "Similar
Kind" (Preferably with Full UML diagrams/documents) with of course easy to
understand documentation and source code, so that I have the practical view
of "Microsoft Pattern and Practices" and I can instantly follow them. It
would be better if these applications are not very complex and yet inclue
the layering concept as well as the usage of all technologies -Web
Services,Windows Services,UI,SQL Server connectivity etc.
3.
What is the best way to use Panels/Forms. Is it good to show multiple panels
on the same form and when needed use visible for 1 panel and invisible for
multiple panels or use multiple forms? And why the respective practice is
used?
Thank you for all of your patience to go through such a long mail. Please
advise me the best way to go about it keeping in mind the time constraint of
2 months.
Thanking you in advance,
Regards,
Rajat Tandon. Tag: c# listbox onselect Tag: 82997
Calling winForms in Installer project
I had build an installer project for my ASP.NET project. And found that
several fields need to be configured, like the web.config files and etc,
which requires user input. Also I need to attach my database using the
installer project, anybody could suggest how I could perform similar action?
One of my idea is to build a winform project which accepts athe user input
and configure the fields during installation, but I had no idea how winform
object is being called during installation.
Any idea and suggestions are welcomed! Thanks in advance.
Regards;
weichung Tag: c# listbox onselect Tag: 82994
is that there is no onselect for listbox in c#?
if i want to trigger an event when i select an item in the listbox
what can i do?
I think SelectedIndexChanged event is what you need.
Regards,
Konstantin
alan wrote:
> is that there is no onselect for listbox in c#?
> if i want to trigger an event when i select an item in the listbox
> what can i do?
>
> thanks a lot!!!
>
> I think SelectedIndexChanged event is what you need.
>
> Regards,
> Konstantin
>
> alan wrote:
> > is that there is no onselect for listbox in c#?
> > if i want to trigger an event when i select an item in the listbox
> > what can i do?
> >
> > thanks a lot!!!
>