who 'eats' my mouse click messages?
Hi,
I have a simple form with a simple button that does the following:
static int button1Count = 0;
void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Debug.WriteLine((button1Count++).ToString()
+" Button1 - click");
System.Threading.Thread.Sleep(3000);
System.Diagnostics.Debug.WriteLine("End Sleep");
}
As you can see, when I click the button, it writes something to the output
window and sleeps for 3 seconds. Then, it writes another line to the output
window.
Now, I do the following: I press 3 times quick enough that it takes less
than 3 seconds.
I notice that sometimes the button get pressed 3 times and sometimes, only
twice.
It looks like the messages are 'eaten' somehow...
Can someone explain this? I tried to look for an explanation but failed to
find such.
Thanks in advance,
Alon. Tag: spam post deleted Tag: 117748
Design view NOT displaying controls
Editing an existing windows application, in Visual Studio 2005, which has
several panels. Text boxes & labels, associated with some of the panels,
only show up as outlines in the Design view. Their actual text is not
displayed. What could cause this?
One thing that these controls have in common, is that their parent panel, is
not the first panel. Those labels that refer to the primary panel, do show
up in the Design view. Tag: spam post deleted Tag: 117741
---->> School BOY & GIRL Enjoying SEX at PARK <<------
HAI..........
Guys this web site s very useful to
you...........
How This site
helps..........
how to earn money form
online......
In this site, you wil earn more than 10000/- Rs per month....
its true ....... just login this site and << EARN MONEY
>>
www.freeonlinedollers.blogspot.com
www.freedollers.blogspot.com
www.moviesgossips.blogspot.com Tag: spam post deleted Tag: 117738
=?ISO-8859-1?B?LqmpqampqakgLS0gQWN0cmVzcyBTZWNyZXQgQk9USCBST09NIHNjZW5lcyAt?=
HAI..........
Guys this web site s very useful to
you...........
How This site
helps..........
how to earn money form
online......
In this site, you wil earn more than 10000/- Rs per month....
its true ....... just login this site and << EARN MONEY
>>
www.freeonlinedollers.blogspot.com
www.freedollers.blogspot.com
www.moviesgossips.blogspot.com Tag: spam post deleted Tag: 117737
Images Do Not Show Up for TreeView
Good afternoon. This had been working for several weeks, but something's
changed and now my images are no longer visible in my TreeView!
I've confirmed that the image file is in place and loaded correctly. I've
confirmed that the ImageList is valid. I can reference imageList.Images[x]
and access my icons just fine. However, if I add nodes to a TreeView and set
their ImageIndex and SelectedImageIndex properties, I still see blank white.
This persists whether the nodes are selected or not.
It's not merely referencing the 0th element of the list, which had been
blank white: for testing I made non-white.
If the ImageList is valid, and the nodes' image indices are set, is there
some obscure setting in TreeView that I need to enable display of images?
Any ideas are appreciated!
Code:
ImageList imageList = new ImageList();
//imageList.ColorDepth = ColorDepth.Depth32Bit; // Has no effect
imageList.ImageSize = new Size(20, 20);
imageList.Images.AddStrip(global::MyNamespace.Properties.Resources.My_Icons);
TreeTemp.ImageList = imageList;
for (int j = 0; j < 4; j++)
{
TreeNode node = new TreeNode(j.ToString(), j, j);
TreeTemp.Nodes.Add(node); // Show as blank white
}
TreeTemp.Invalidate(); // No effect
BackgroundImage = imageList.Images[0]; // Displays test graphic as expected Tag: spam post deleted Tag: 117736
Concurrency error handling
Hi
I have asked this question before but have not received any clear answer. I
have a winform app with bound controls via dataadapter/dataset combination.I
have a dbconcurrency exception ex. Now I have the following;
DataRow = ex.Row
DataTable = ex.Row.Table
DataColumns = ex.Row.Table.Columns
DataSet = ex.row.Table.Dataset
How can I now via code, do the following;
1. Make a copy of the datarow,
2. Re-read the row from datasource,
3. Update read row with values form row copy.
Any help woudl be appreciated.
Many Thanks
Regards Tag: spam post deleted Tag: 117735
Drawing
In my application I'm doing some drawing in my OnPaint routine using
Graphics->DrawRectangle. The rect bounds are constant and not scaled
in anyway.
One of our Chinese customers is seeing the rectangles appear in the
wrong place. When I started investigating this I found that I got the
same problems if I changed my Windows DPI settings from 96 to 120.
However the customer tells me that they are using 96 DPI.
Are there any other settings which could cause this problem? They say
it's the same whatever screen resolution they use.
Also is there anyway to calculate the rectangle positions such that
they will always be write no matter what the users Windows settings
are?
TIA,
KK Tag: spam post deleted Tag: 117733
Winforms Tree View Control
Hi,
I am working on .NET 2.0 Winforms Tree View Control.
I need to have the text formatting for the Tree View nodes:
1. I should be able to right/left align the text.
2. I should be able to put some color only for part of the text.
Please note the requirement is to do this in code but not at run time.
If you have any helpful links please let me know.
thanks,
Joy Tag: spam post deleted Tag: 117732
Disable DataGridView Combobox cell
I have a databound DataGridView which has five columns and two of which are
ComboBox columns. I want to disable one combobox cell in a row depending
upon the selection in the other combobox cell. I cannot find a way to
disable the Combobox cell for a row in a grid.
Any help would be appreciated.
Thanks Tag: spam post deleted Tag: 117728
app start & logon form
1. What I need is to start an existing app and provide a pop-up with
the user name and password.
2. I've observed its permitted to start the app with either shell or
shellExecute.
3. What's the procedure to have the app filehandle be aware of the
logon form.
4. FYI I do not have source code for the app.
thx.,
EP. Tag: spam post deleted Tag: 117727
Lining up external combobox with datagridview column
Hi
I'm very new to windows forms. I want to use a comboBox to do I kind of
'change all' on some datagridview columns cell values. i.e. The user selects
a value in the dropdown and it changes all the cell values in the column it
applys too. AutoSizeColumnsMode is Fill so I would like to lock the comboBox
to the column that it should apply too.
What options do I have?
Many thanks
Andrew Tag: spam post deleted Tag: 117723
ContextMenuStrip Bug??
VB.NET 2005 SP1... I have two drop down items on a contextmenustip:
DropDown1 (Enabled)
DropDown2 (Disabled)
If i hover over dropdown1 to see the items, and then hover over
dropdown2 it will show the items and fire the dropdown event which can
crash the app as I expect the dropdown event only to fire if the menu
item is enabled.
If I don't hover over DropDown1 first it behaves as expected. Is this
a bug, or should I be doing something different? Tag: spam post deleted Tag: 117721
NumericUpDown
I need to change the behaviour of NumericUpDown (compact framework 2.0) so
that I can show a dialog stating that the value is not within the allowed
range rather than just capping the input value. Any ideas how I can achieve
this? I don't seem able to find a suitable place to hook into (pre
set-value).
Thanks
Pete Tag: spam post deleted Tag: 117718
TreeView Event
Can anyone tell me how can I register the "onDoubleClick" on the last node
of each level of a TreeView. I use C# as programming language.
Thanks
George Tag: spam post deleted Tag: 117717
NullReferenceException in Windows.Forms.Label?
One of the users of my application is reporting the following crash. The
stack trace looks like it's all internal to the Framework, so any ideas on
what this might be? I've never had the error myself and am not really sure
what to suggest...
System.NullReferenceException: Object reference not set to an instance of an
object.
at System.Windows.Forms.Label.CreateTextFormatFlags()
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam) Tag: spam post deleted Tag: 117715
Odd query failure
I'm writing a Winforms program in VB (Dot Net 2.0, VS2005) using a SQL Server
2000 database. I'm not sure whether I have a programming bug or a sql
problem. I can't get a 'Like' query to work.
I have a dll with an xsd. I dragged 2 fields from the Server Explorer onto
the xsd. I then created a second query for a Like search. (I've probably
used this basic technique hundreds of times on this job but I rarely use the
'Like' command.) This runs perfectly in the Query Builder. The query is as
follows:
SELECT serial, cnst
FROM dbo.micro
WHERE (serial LIKE @serial + '%')
where 'serial' is the primary key, Char 11. 'cnst' is char 10 - null
permitted.
I have a data management layer which inherits the xsd. In that I created a
pair of functions to fill the default 'micro' table:
Public Sub FillMicro()
Dim da As New
DataManager.dsMicroScheduleTableAdapters.microTableAdapter
Try
da.Fill(micro)
Catch ex As Exception
MsgBox("Error Message")
End Try
End Sub
Public Sub FillMicro(ByVal vsJobno As String)
Dim da As New
DataManager.dsMicroScheduleTableAdapters.microTableAdapter
Try
da.FillByLikeQuery(micro, vsJobno)
Catch ex As Exception
MsgBox("Error Message")
End Try
End Sub
So, the first function FillMicro() works. The second, FillMicro(jobno)
returns nothing, even though there should be about 1200 rows. I'm not
getting any error messages or crashes. It just returns 0 rows.
I'll probably find the bug 5 minutes after I post this but for now I'm
stumped.
Anyone see anything wrong with this? Tag: spam post deleted Tag: 117713
Can't remove highlighting when cursor is moved
When I am editing code in VB.Net 2005 and I move my cursor, the code between
where I was and where I now am stays highlighted. Pressing ESC does nothing.
In order to continue, I must close the window and begin again, but as soon
as I select text, the problem occurs again.
I don't have this problem in the VB6 IDE or in Word. I have a second
machine that uses the same mouse and keyboard through a switch and I don't
have the problem in VB.Net on the second machine, so it's not the mouse or
the keyboard.
I need to be using the machine that's having the problem. Has anyone seen
this before? If so, how do I fix it?
Thanks in advance,
Carol Tag: spam post deleted Tag: 117712
dir net books
.NET database dev questions
http://freedownloadablebooks.blogspot.com/2008/03/net-database-dev-questions.html
Some general quickies
http://freedownloadablebooks.blogspot.com/2008/03/some-general-quickies.html
.NET WebDev interview questions - Part 1
http://freedownloadablebooks.blogspot.com/2008/03/net-webdev-interview-questions-part-1.html
.NET WebDev interview questions - Part 3
http://freedownloadablebooks.blogspot.com/2008/03/net-webdev-interview-questions-part-3.html
Electronic engineer interview questions
http://freedownloadablebooks.blogspot.com/2008/03/electronic-engineer-interview-questions.html
C++ notes for discussion
http://freedownloadablebooks.blogspot.com/2008/03/c-notes-for-discussion.html Tag: spam post deleted Tag: 117708
Odd sizing problem
I'm writing a Winforms app (Dot Net 2.0, VS2005, VB).
I have a simple usercontrol with 2 panels on it, one with labels, one with a
variety of editing controls, mostly datetimepickers and NumericUpDowns. A
number of these usercontrols are then instantiated and put on a form in
another project.
The problem is this: The panel containing the controls is apparently
expanding and increasing the space between controls, both height and width
(so that part of it is hidden when the control displays). There is code that
changes the width of the usercontrol itself and the position of the panel
within the usercontrol, but no code whatever to change the width of the panel
or height of anything. Autosize for the panel is False.
What could I be forgetting? Tag: spam post deleted Tag: 117702
Custom form with its own designer / OnPaintAdornments (VS2008)
Hi everybody,
I have a form (inherits from Form) that has its proprietary title bar and
and a footer section. I'd like to prevent the user from placing any
control in those areas. That is, I'd like to define a deviating area on
which controls may be placed. If i.e. a TableLayoutPanel is placed on the
form and the Dock-property is set to "Fill", this needs to be the area
that I define.
I was assuming that it'd be sufficient to create a Designer that (just as
with other controls) utilizes OnPaintAdornments to define/restrict the area
where controls can be dropped.
However, my designer is simply being ignored - none of the events there are
being fired!?
The scenario roughly looks like the following:
--- 8< ---
<ToolboxBitmap(GetType(Form)), Designer(GetType(My_Form_Designer))> _
Public Class MyForm
Inherits System.Windows.Forms.Form
'...
End Class
Public Class My_Form_Designer
Inherits ParentControlDesigner
'...
Protected Overrides Sub OnPaintAdornments( _
ByVal pe As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaintAdornments(pe)
'...
End Sub
End Class
--- 8< ---
The above designer's code should react if I add a messagebox-line and
create a new form MyForm in a project. Unfortunately, nothing happens at
all (no matter where I place a messagebox).
Hence, is there any additional things one needs to implement in order to
create a forms-designer? Any other base-designer I need to use or
interfaces I would need to implement? Also, why would the behaviour of a
forms-designer differ from that of other controls?
I found many references on the web that were geared at control designers,
but none of them explicitly addressed forms ...
Cheers,
Olaf
---
X-Posted, F'up to microsoft.public.dotnet.framework.windowsforms Tag: spam post deleted Tag: 117699
Equivalency to TransparencyKey in WPF?
When using a windows forms approach I can accomplish my goal - a
portion of a window completely transparent so that it appears as
though there is a "hole" in the application - I can do so in the
following manner:
1 - Create Window, put Panel control on Window
2 - Set Window's TransparencyKey property to Pink
3 - Set Panel's background color to Pink
This creates a see-through, "screen capture"-like look.
There is, however, no TransparencyKey property on a WPF window. Is it
possible to do this sort of thing in WPF?
(I guess I could host a Windows Forms custom UserControl that does
such a thing within a WPF window, but that seems a wee bit hoakie)
Any advice appreciated! Tag: spam post deleted Tag: 117697
Winform sql server app
Hi
I am new to sql server and need to build a one-many winform app with visual
studio 2008 and sql server backend and need some pointers.
I have the following questions;
1. If I create the app by creating a relationship between master and child
tables in dataset and then dragging the master table and relation onto a
form to auto generate everything, would that be a good enough way to cerate
the app? If so, what more can I do to turn it into a robust enough app such
as error handling etc? If this is not a good way to cerate app what should I
instead do?
2. Is there a good book on the subject of vs2008/vb2008 and sql server 2005
specifically, that will me sufficient advise on how to develop the app?
Many Thanks
Regards Tag: spam post deleted Tag: 117695
How to get text to fit inside a button
Hi, I'm working with Visual Studio C# 2008 Express and I'm having the
hardest time trying to get an 8.25f Microsoft Sans Serif font in a
70x18 pixel (width x height) FlatStyle.Popup button. The text just
won't center to fit inside the button. The font gets chopped off at
the bottom (because it doesn't want to perfectly center itself).
Can someone else out there just try this to see what I mean? There's
plenty of room in that button to fit that size text and it would save
a lot of space in my app as I need several columns of these size
buttons.
It's just a Windows Forms App compiling to whatever Framework version
Express defaults to (the latest, I presume).
Thanks for the help! Tag: spam post deleted Tag: 117694
uncheck a checkboxcolumn in datagridview
I've got a checkbox column in a datagrid view that I'd like to be able
to validate, and if they've checked this column, but something else
needs to be done first, I want to be able to backout and uncheck the
column. How do I do that?
Private Sub dgvDetail_CellContentClick(ByVal sender As
System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles
dgvDetail.CellContentClick
With dgvDetail.CurrentCell
Dim colIndex = .ColumnIndex
If (.OwningColumn.DataPropertyName =
"AccountingAcceptance") Then
If (Convert.ToBoolean(.EditedFormattedValue) = True)
Then
If
(dgvDetail.CurrentRow.Cells("txtNetPaymentAmount").Value.ToString.Length
= 0) Then
If (MsgBox("Do you wish for the Net Payment
Amount to be updated with the value from the Check Amount?",
MsgBoxStyle.YesNo, "Net Payment Amount Needed") = MsgBoxResult.Yes)
Then
dgvDetail.CurrentRow.Cells("txtNetPaymentAmount").Value =
dgvDetail.CurrentRow.Cells("txtCheckAmount").Value
Else
' uncheck it
End If
End If
End If
End If
End With
End Sub Tag: spam post deleted Tag: 117693
Interesting layout problem
I have a rather interesting layout problem. At the moment I have a
FlowLayoutPanel on a tab page. The size of the page may vary with the size
of the window. The FlowLayoutPanel itself hosts a variable number of
identically sized user controls. Autoscroll of the FLP is True. The idea, of
course, is to smoothly fill the FLP horizontally no matter what the width of
the FLP. So far, so good.
Now I've been asked to change that. The powers that be want a left column
of labels to match the individual controls on each of the user controls. (The
controls of each usercontrol are arranged vertically.) I.e., if there were
several rows of user controls, there would have to be a set of labels for
each row. Even more interesting, they should stay parallel with their
respective controls, no matter what the position of their row. In other
words, they'd have to somehow stay in sync with their respective row while
the user was scrolling the FLP up and down.
Anyone ever do anything like this? (This is VB 2005.) Tag: spam post deleted Tag: 117691
Storing form size
To be user-friendly, I like to store the size and position of a window so
that it can be opened in the same place the next time the user starts the
app. Ideally, I would simply retrieve this information during the
FormClosing event, but if the window is minimized at the time you get the
minimized size and not the "restored" size. (The one thing I don't want to
do is start the app minimized; it either opens at its last restored size or
maximized.) Because of this I record the form's position and size during
every Move or Resize event, but that seems clunky. Is there any way to ask
(.NET framework method or API call, I don't care) a minimized window what
its restored size and position are? Tag: spam post deleted Tag: 117681
Timer in module
Hi
How can I use a timer in a module such that I can start the timer and then
trap when timer has reached the interval?
Many Thanks
Regards Tag: spam post deleted Tag: 117677
Currency manager changes position on endedit
Hi
I have a winform app with fields bound to a backbend db via a currency
manager (System.Windows.Forms.CurrencyManager). The app generally works fine
but in a specific instance where I select a value from a drop down control
and then call the MyCurrencyManager.EndCurrentEdit(), to begin to try to
save the record, the position of the currency manger becomes -1 which
creates problem in saving and accessing the original record. What could be
the problem and how can I debug this?
Many Thanks
Regards Tag: spam post deleted Tag: 117675
Pausing a process without holding OS
Hi
I need to add pauses in-between processes in my app to give time to other
users/processes on the network. Is there a way to pass control to OS for a
specified time (say 15 seconds) to delay my app but at the same time not
blocking OS's processor cycles?
Thanks
Regards Tag: spam post deleted Tag: 117673
Docking framework of Visual Studio 2005
I had come across a link which mentioned that Microsoft has released the UI
docking framework of Visual Studio 2005 which can be used in our projects...
I am not able to find the link where this was mentioned and from where to
download this VS2005 UI docking framework...
Any idea?
- Andrew Tag: spam post deleted Tag: 117672
Component which contains a winform
Sorry if my question may seems stupid but I'm just a beginner...
I would like to ass a .net component which contains a winform inside it.The
main program would use it by its will and the form would pops up (along with
the functionality of the component).
Is it possible?
Regards
Ronny. Tag: spam post deleted Tag: 117671
Problem with forms MDI application
I am building a MDI Windows Forms application where I have placed a
splitcontiner. Using tabs I am trying to load different forms into the split
container. Everything works fine, but for some reason the application hangs
on exactly the 10th time a from is loaded into the splitcontainer (can
repeat this). I have gone back to basics and removed all code from the child
forms being loaded and still the applcaition hangs on the 10th time a form
is loaded.
If anyone can see any logic in why this is happening or can take a moment to
look at the code below to se if I am doing something obvious wrong, that
would be much appreciated
Niclas
Public Class Main
Private Sub Lable1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Lable1.Click
LoadForm(New frm1, SplitContainer1.Panel2)
End Sub
Private Sub Lable2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Lable2.Click
LoadForm(New frm2, SplitContainer2.Panel2)
End Sub
Public Sub LoadForm(ByVal frmToLoad As Form, ByVal tab As Control)
Try
Dim Frm As Form
For Each Frm In tab.Controls
Frm.Dispose()
Next
Frm = frmToLoad
Frm.TopLevel = False
Frm.Parent = tab
Frm.Show()
Catch ex As Exception
MessageBox.Show(ex.Message, "An error occured",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try
End Sub
Public Sub DisposePanelForm(ByVal TargetPanel As Panel)
Dim f As Form
For Each f In TargetPanel.Controls
f.Dispose()
Next
End Sub
Private Sub SideBar_MouseHover(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Lable2.MouseEnter, Lable1.MouseEnter
Dim lbl As Label
lbl = CType(sender, Label)
lbl.ForeColor = Color.Yellow
End Sub
Private Sub SideBar_MouseLeft(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Lable2.MouseLeave, Lable1.MouseLeave
Dim lbl As Label
lbl = CType(sender, Label)
lbl.ForeColor = Color.White
End Sub
Private Sub Tab1_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Tab1.Enter
If SplitContainer1.Panel2.HasChildren = False Then
LoadForm(New frm3, SplitContainer1.Panel2)
End If
End Sub
Private Sub Tab2_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Tab2.Enter
If SplitContainer2.Panel2.HasChildren = False Then
LoadForm(New frm4, SplitContainer2.Panel2)
End If
End Sub
Private Sub Tab2_Leave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Tab2.Leave
DisposePanelForm(SplitContainer2.Panel2)
End Sub
Private Sub Tab1_Leave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Tab1.Leave
DisposePanelForm(SplitContainer1.Panel2)
End Sub
End Class Tag: spam post deleted Tag: 117670
Interactive ColorDialog
Is there a method to do unmodal ColorDialog? That a necessity to react on
discoloration in ColorDialog yet to pressure on OK is. Event ColorChanged
would walk up, but for some reason I him at ColorDialog did not notice
http://www.alvas.net - Audio tools for C# and VB.Net developers Tag: spam post deleted Tag: 117664
Office XP PIA problem on user PC
My application uses Office XP PIA as the client runs various versions of it -
from XP to 2007. It works for all but one PC (it has Vista with Office 2003
installed) - my application throws the following exception when trying to use
Word.Application object:
"Unable to cast COM object of type
'Microsoft.Office.Interop.Word.ApplicationClass' to interface type
'Microsoft.Office.Interop.Word._Application'. This operation failed because
the QueryInterface call on the COM component for the interface with IID
'{00020970-0000-0000-C000-000000000046}' failed due to the following error:
Library not registered. (Exception from HRESULT: 0x8002801D
(TYPE_E_LIBNOTREGISTERED))."
I loaded an VS Express on the PC - when I look up the references - they
refer to Word version 12.0 - which does not exist on the PC.
Please help! Tag: spam post deleted Tag: 117663
Windows XP Malicious Software Removal Update
Malicious Software Removal July 2008 (KB890830) shows in the Review Update
History that it has been loaded 9 TIMES. The yellow shield auto update icon
continues to tell me that the update needs to be loaded.
How can I get rid of the Auto Update Icon as I am certain this has been
loaded and run in the background. It is not listed in Add/Remove programs but
I do not think this gets into this list?
Thanks for any help. Tag: spam post deleted Tag: 117662
A few quick refresher questions about Windows Services
I wrote one Windows Service app under dot net 1.1 about 5 years ago, as part
of my web services cert. I've just been told to write a Windows Service
program in VB, Dot Net 2.0. (Business as usual :-) So refresh my memory:
1. The installutil program is the only way to install a windows service?
2. It will probably be necessary to make it possible for a non-programmer to
change a few settings. So far as I know, what I'll probably have to do is
write a separate windows app to edit whatever sort of config file is used.
If there's a better way to do this, please let me know.
3. To the best of my knowledge, this service is intended to monitor a
directory and ftp any xml file that shows up to another computer. I have
never done anything like this either, (I have never done anything with FTP
in a Microsoft environment) although the code I've looked at seems simple
enough. If there are any examples out there that do approximately that,
please point them out.
Thanks. Tag: spam post deleted Tag: 117659
Microsoft Report Viewer Control
anyone has a code sample to connect the Microsoft Report Viewer Control
using Microsoft SQL Server stored procedure? Tag: spam post deleted Tag: 117657
splitter cursor
i want to know how can i change the spilitter cursor? i mean the splitter
line not the whole control.. Tag: spam post deleted Tag: 117655
TableLayoutPanel scroll bar issues
Hi .
I am using a table layout panel with autoscroll = true
I found several issues which dont seem to work properly
1. when I have more rows then in view and the vertical scroll bar is added
it sometimes also adds the Horizontal scroll bar because it doesnt adjust the
width properly and the scrollbar takes up part of the client area. This isnt
consistent, sometimes the horizontal appears and sometimes it doesnt .
2. I have noticed something funny . I want to remove and add a control and
while doing that I want to maintain the scroll position so I do
int prevVal = m_TableLayoutPanel.VerticalScroll.Value;
.... ADD AND REMOVE
m_TableLayoutPanel.VerticalScroll.Value = prevVal;
The funny thing is that if I call athe above line once it doesnt change the
VerticalScroll.Value . IF I call it TWICE then the second time it does change
the Value.
so my code looks like this
m_TableLayoutPanel.VerticalScroll.Value = prevVal;
m_TableLayoutPanel.VerticalScroll.Value = prevVal;
Andy idea why this happens ????????? Tag: spam post deleted Tag: 117650
MDI child forms: how can one open another form?
Hi,
In an MDI Windows forms architecture, I have several child forms which I
need to be able to open fellow child forms. How is this done?
--
Thanks in advance,
Juan Dent, M.Sc. Tag: spam post deleted Tag: 117646
System.ComponentModel.Win32Exception: Error creating window handle.
Hi All,
I am using WinForm and .NET 2.2 framework in my application. My application
mainly uses Infragistics WinGrid. I am extending infragistics grid to
support some functionality by adding winform's toolstrip control (which
intern hosted in a User Control) on Grid Headers. The way I extend this grid
is by implementing Infragistic's IUIElementCreationFilter interface. This
interface provides two methods, AfterCreateChildElements and
BeforeCreateChildElements. The issue that I am facing is, when I load grid,
I am getting following error and it kills my application.
"System.ComponentModel.Win32Exception: Error creating window handle".
This error occurs only when I set BackColor property of my user control to
Transparent. If I do not set BackColor or set it to some color my
application just works fine. I checked the number of window handles and also
GDI Object count at the time this error is thrown. Window handle count is
around 500 and GDI Object count is around 125. Also this error does not
occur all the time. In my application I have several modules where I use
infragisitcs WinGrid which in tern calls same implementation of
IUIElementCreationFilter interface and the code work fine for other modules.
I am not able to figure out as to why this issue is occurring sometimes and
what is that causing it.
During my investigation I found that adding user control with BackColor =
Transparent into Grid's control collection invokes OnPaint event handler and
which intern calls AfterCreateChildElements method in recursive way.
AfterCreateChildElements method is called after an element's ChildElements
have been created. The child element's can be repositioned here and/or new
element's can be added.
The stack trace is given below:
System.ComponentModel.Win32Exception: Error creating window handle.
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at Orion.Dashboards.DashboardPartControl.ShowAlert(Object sender,
AlertRaisedEventArgs e) in
C:\FRSDev\DevRoot\foundation61\Orion\Source\Common\Orion.Dashboards\Controls\DashboardPartControl.cs:line
1097
at Orion.Dashboards.DashboardPartControl.OnAlertRaised(Object sender,
AlertRaisedEventArgs e) in
C:\FRSDev\DevRoot\foundation61\Orion\Source\Common\Orion.Dashboards\Controls\DashboardPartControl.cs:line
986
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Fusion.Windows.Forms.VirtualListGrid.RaiseAlert(Exception ex) in
C:\FRSDev\DevRoot\foundation61\Fusion\Source\Presentation\Fusion.Windows.Forms\Widgets\VirtualListGrid.cs:line
1024
at Fusion.Windows.Forms.VirtualListGrid.OnPaint(PaintEventArgs pe) in
C:\FRSDev\DevRoot\foundation61\Fusion\Source\Presentation\Fusion.Windows.Forms\Widgets\VirtualListGrid.cs:line
638
at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs
e, Rectangle rectangle, Region transparentRegion)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle, Color backColor, Point scrollOffset)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle)
at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
at
System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmEraseBkgnd(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32
x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef
hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32
x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef
hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at
Fusion.Windows.Forms.FilteringCreationFilter.AfterCreateChildElements(UIElement
parent) in
C:\FRSDev\DevRoot\foundation61\Fusion\Source\Presentation\Fusion.Windows.Forms\Widgets\FilteringCreationFilter.cs:line
106
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase
controlElement, Boolean recursive)
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase
controlElement, Boolean recursive)
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase
controlElement, Boolean recursive)
at
Infragistics.Win.UltraWinGrid.RowColRegionIntersectionUIElement.VerifyChildElements(ControlUIElementBase
controlElement, Boolean recursive)
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase
controlElement, Boolean recursive)
at
Infragistics.Win.UltraWinGrid.DataAreaUIElement.VerifyChildElements(ControlUIElementBase
controlElement, Boolean recursive)
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase
controlElement, Boolean recursive)
at
Infragistics.Win.UltraWinGrid.UltraGridUIElement.VerifyChildElements(ControlUIElementBase
controlElement, Boolean recursive)
at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive)
at Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(Boolean
verify, Boolean syncMouseEntered)
at Infragistics.Win.ControlUIElementBase.get_CurrentCursor()
at Infragistics.Win.UltraControlBase.get_Cursor()
at System.Windows.Forms.Control.WmSetCursor(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
A first chance exception of type 'System.ComponentModel.Win32Exception'
occurred in System.Windows.Forms.dll
A first chance exception of type 'System.ComponentModel.Win32Exception'
occurred in System.Windows.Forms.dll
Error creating window handle.
Please let me know incase anyone has any clue or idea as to how to proceed
on resolving this issue.
Thanks in advance,
-Tushar Tag: spam post deleted Tag: 117643
Fancy Windows Form
I started using Windows Live Mail and really like the main form design.
I was wondering if anyone knew what tools were used to develop that
kind of form. It is a lot like the new MS Office forms with very customized
title bar and buttons.
TIA
Larry Tag: spam post deleted Tag: 117642
Protected forms and cell growth
Hi,
I have a protected form with lots of areas for data entry (comments, goals,
etc.). I formatted the cells to wrap but the cell does not resize itself
when lots of information is entered. Is it possible to have the cell grow as
data is entered?
Kathleen Tag: spam post deleted Tag: 117641
complicated forms design
How others have approached having extremely large forms that duplicate
database structures.
I am currently designing an application with a lot of tables and a lot of
controls. Problem is that the forms are very much overloaded and
therefore my basic structure is very wrong.
I have about 40 database tables, a few forms, multiple tabs on each with
moderately complicated layout on each tab. You can imagine the whole
design, number of events, and how it ends up.
How have others managed this sort of complicated design?
Do you break off the database into a separate class, how can you keep
this visual?
Can you layout a tab on its own visually and then embed in the actual
form at runtime.
Ta
Ken Tag: spam post deleted Tag: 117640
Changing the Form Default BackColor at Runtime
I have a program that have over 10 forms in it. The BackColor for each form
defaults to System.Drawing.SystemColors.Control.
How can I override or change what that color is? Basically what I would
like to do is have different color schemes available to the user without
having to program each and forms/controls in the application.
How can I build a new color pallete that will override the SystemColors
without affecting the base OS color scheme.
Thank you. Tag: spam post deleted Tag: 117636
ObjectDisposedException
Hi,
I have an invisible button in my form. I have a timer
(System.Windows.Forms.Timer) with interval 300 ms. In the timer tick event I
check for a certain flag, and if that flag is true, the button becomes
visible (After setting the flag's status to false again).
The problem is that if the event happened and the button became visible, and
then I closed the form, and then reopened it and let the event happen again,
then the operation of making the button visible throws an exception of type
System.ObjectDisposedException.
It looks like when I reopen the form, I already haven't got the button. One
could think it's been Garbage Collected, but I'm not sure about that, because
the button is part of the form which is reopened (Form f = new Form(); ).
Can someone please explain the source of the problem and the solution?
Thanks a lot Tag: spam post deleted Tag: 117632