Chart control with curve fitting?
Can anyone recommend a WinForms (not ASP.NET) charting control which will
fit a curve to XY data (Bezier, splines, etc)?
--
Bert Hyman St. Paul, MN bert@visi.com Tag: Screencapture without using SendKeys? Tag: 52184
Camera Sale -Nikon , Canon, Minolta , Sony ,Xcam2 , Fujifilm ,
Camera Sale -Nikon , Canon, Minolta , Sony ,Xcam2 ,
Fujifilm ,
http://shopforless.itgo.com/
Camera Sale -Nikon , Canon, Minolta , Sony ,Xcam2 ,
Fujifilm ,
from $50 -up for the top brands
http://shopforless.itgo.com/ Tag: Screencapture without using SendKeys? Tag: 52182
MDI Child Form size
Hi All,
Is there a way to make a MDI Child's height larger then the parent form?
For example, when I try to add a new type of MDI Child to a Parent form that
is setup for a width/height of 800 X 600, and I want to have a longer Child
form (say the size will be 800X1200).
Everytime I try this, Visual Stuido resets the height of the child to be
near what the height of the Parent is.
Thanks,
T. Waldren Tag: Screencapture without using SendKeys? Tag: 52177
Property Grid Stops Expanding Expandable Properties
I am using the PropertyGrid control. I have altered the BrowsableAttributes
property to a custom attribute. When I do this, expandable properties will
no longer expand in the PropertyGrid. For example, I have a public font
poperty. I can call up the font dialog from the PropertyGrid, but I can't
expand the property to see the font members. If I don't change the
BrowsableAttributes the PropertyGrid behaves normally.
Any ideas?
--
Howard Swope
Software Engineer
Spitz, Inc [http://www.spitzinc.com] Tag: Screencapture without using SendKeys? Tag: 52174
Vanishing Custom User Control Bug
Hi
I am currently designing a Windows form which inherits from a basic
custom dialog form. The new form uses custom user controls. When the
form is compiled, the custom controls disappear and the message
"There is already a component named 'myControl'. Components must have
unique names, and names must be case-insensitive. A name also cannot
conflict with the name of any component in an inherited class"
appears for each disappeared control in the task window. This is very
confusing because the form that is inherited does not contain any
instances of myControl, only two windows buttons and an error
provider.
Has anyone a clue as to why this may be happening?
Regards, Phil Tag: Screencapture without using SendKeys? Tag: 52169
MDI Parent and Childs - Opening and Closing
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C349EF.98765890
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have a child form that opens within the MDIParent. From this child =
form (frmEntry), I open another child form(frmAircraftEntry). I do this =
by
Dim AircraftEntry As New frmAircraftEntry()
AircraftEntry.MdiParent =3D Me.MdiParent
AircraftEntry.Show()
Me.Close() ' close frmEntry
What I notice is that if I minimize the newly created form =
AircraftEntry, there is still an instance of frmEntry running even =
though I closed it. I am guessing it is from the call of =3D =
Me.MdiParent. If I move the me.close to the top of the sub, it closes =
the form as expected but then AircraftEntry does not open as a child. =
What am I doing wrong, or is there another way to determine the MDI =
parent?
--=20
Brian P. Hammer
------=_NextPart_000_0008_01C349EF.98765890
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.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>I have a child form that opens within the MDIParent. From =
this child=20
form (frmEntry), I open another child form(frmAircraftEntry). I do this =
by</DIV>
<DIV><FONT color=3D#0000ff>Dim</FONT> AircraftEntry <FONT =
color=3D#0000ff>As</FONT>=20
<FONT color=3D#0000ff>New</FONT> =
frmAircraftEntry()<BR>AircraftEntry.MdiParent =3D=20
<FONT =
color=3D#0000ff>Me</FONT>.MdiParent<BR>AircraftEntry.Show()<BR><FONT=20
color=3D#0000ff>Me</FONT>.Close() ' close frmEntry</DIV>
<DIV> </DIV>
<DIV>What I notice is that if I minimize the newly created form =
AircraftEntry,=20
there is still an instance of frmEntry running even though I closed =
it. I=20
am guessing it is from the call of =3D Me.MdiParent. If I move the =
me.close=20
to the top of the sub, it closes the form as expected but then=20
AircraftEntry does not open as a child. What am I doing =
wrong, or is=20
there another way to determine the MDI parent?</DIV>
<DIV><BR>-- <BR>Brian P. Hammer</DIV></BODY></HTML>
------=_NextPart_000_0008_01C349EF.98765890-- Tag: Screencapture without using SendKeys? Tag: 52154
Repost: Problem Retrieving DataSet Returned By A WebService
Hi,
I'm working on a project which includes WebServices and Windows Form
application.
The Windows Form application will call the WebServices to retrieve data from
database. The data will be returned as DataSet.
Now, here's the problem. On .NET Framework 1.1, if any rows in the dataset
returned contain errors (marked by calling the SetColumnError() method or
setting the RowError property of the DataRow), I get the following error
message in the Windows Form application,
"There is an error in XML doument (1,xxxxxxx)"
If I forced the Windows Form application to run on .NET Framework 1.0,
everything works fine.
Is this a bug? Or I need to make some code adjustment because of changes to
the Framework?
Here's the partial code for the WebService project
Code:
<WebMethod()> _
Public Function RetrieveDataSet() As DataSet
Dim ds As New DataSet
Dim dt As New DataTable
Dim row As DataRow
Dim i As Integer
dt.TableName = "TestTable"
dt.Columns.Add("TestColumn1", GetType(String))
dt.Columns.Add("TestColumn2", GetType(Integer))
ds.DataSetName = "TestDataSet"
ds.Tables.Add(dt)
For i = 0 To 10
row = dt.NewRow
row("TestColumn1") = "This is row " & i
row("TestColumn2") = i
dt.Rows.Add(row)
' The following code trigger the error after the DataSet
' is returned to the calling Window Form application
row.SetColumnError("TestColumn1", "Error message here")
Next
Return ds
End Function
For the Windows Form application, you need to insert a datagrid control
(assumed as datagrid1). It will look something like this,
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim ws As localhost.Service1
Dim ds As DataSet
Try
ws = New localhost.Service1
ds = ws.RetrieveDataSet
Me.DataGrid1.SetDataBinding(ds.Tables(0), "")
Catch ex As Exception
MsgBox(ex.Message)
Finally
If (Not (ws Is Nothing)) Then
ws.Dispose()
End If
End Try
End Sub
I really hope someone could help me out with this one.
Thanks in advance. Tag: Screencapture without using SendKeys? Tag: 52152
Continued problem with Socket in User Control in IE
Hey guys (and ladies),
To get started, all of this is going to be run under Full Trust permissions,
so I know that it isn't a security problem.
I have a UserControl that contains a socket that connects to our server
practically instantly when the UserControl is hosted in an executable
residing locally on a client machine. If I attempt to host this control in
Internet Explorer, the connection event takes almost exactly a minute to be
fired, after which everything is happy and connected. Now this only occurs
when one initially browses the page, as subsequent refreshes (F5s or the
little button) connect immediately.
To verify that this is a client side problem, I put 10-second-interval
heartbeats in the socket stream from the server. Sure enough, on an initial
browse and subsequent 60 second wait, the client side socket buffer contains
the six heartbeats. Upon refreshing, the buffer contains only a single
initial heartbeat. I've run the command line tool "netstat" to check the
established sockets and see only a single socket connected and have also
verified open and close events on the server.
The funkiest part: both netstat on the client and the server (via an
attached process) show immediate established connections, but it seems like
something has delayed the first connection event to Internet Explorer.
Finally, any web service calls that are made during this socket connection
window are also hung up. If these calls are made during times when the
socket is not attempting a connection, the calls go through in expected
amounts of time. This is the case even if the call is made when the page is
initially loaded for the first time.
If anyone has the slightest hint, it would be highly appreciated.
Thanks,
Willis Tag: Screencapture without using SendKeys? Tag: 52147
Creating a Pluggin
I have written an application and am looking to extend its capabilities. I am looking to create
pluggins and don't know where to start. I am also looking to store the pluggins in a subdirectory
from the application root.
I looked on MSDN and some of the other code sites but couldn't find and example. Does anyone have
an example?
Thanks,
Dave
DavidElliott@BellSouth.net Tag: Screencapture without using SendKeys? Tag: 52145
Setup Program for .NET Apps.
I was wondering if there was a better way to create a
single setup project for a winform .NET App'.
It's the .NET redistributable (dotnetfx.exe) that seems
to be causing the problem. How can this be distibuted
with out a sepertate setup program. I would have thought
a merge module or something. But it seems I need to get
my clients to install the dotnetfx.exe first then my app
after.
Any ideas. Tag: Screencapture without using SendKeys? Tag: 52144
Farpoint Controls
Does anyone have opinions on Farpoints .NET Spread and
Input Pro controls for Winforms development?
cheers
Guy Tag: Screencapture without using SendKeys? Tag: 52140
Exporting data from sqlserver to excel
hie, i have 3 views in sql server and would like to export the data to
excel after i run the query. how do i code this in my windows
application? i haven't got a clue on how to do this.. thanx alot 4 all
the help!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Screencapture without using SendKeys? Tag: 52134
PropertyList Control
Can anyone recommend a good PropertyList control that I can easily add items
to in VB.NET? The built-in one seems too complicated in that you have to
create a class that you want it to represent, etc. and some of the existing
controls I have found do not seem to work under .NET.
Thanks;
Michael Tag: Screencapture without using SendKeys? Tag: 52131
protect my code from decompile
hi.
how to protect my vb.net application , from decompile ?
all the tips , softwares, we be nice to read about.
thanks and have a nice day. Tag: Screencapture without using SendKeys? Tag: 52121
How to do dockable form in MDI?
How do I create a dockable windows form within an MDI
parent?
The behavior is similar to the IDE interface, with mdi
child windows in the center and property windows docked
to the right. I want to create a property window that is
either floating or docked to one side of the MDI parent. Tag: Screencapture without using SendKeys? Tag: 52120
Controling C# Forms in Windows Application
I'm a web applications developer and I'm being asked to write this
windows application so I'm sure this is an easy answer but It's not
jumping out at me.
I have an application that uses several forms in a single windows
application. I need to be have the user click a button and have it
bring up a different form. These forms aren't generated on the fly
they are hardcoded. For example the entry point of the application
has a welcome menu with a login. If the user is a new user they need
to fill out a account form. This form is located on a seperate
windows form then the login / welcome menu.
Thanks in Advance for all help and suggestions
Braden Bowers Tag: Screencapture without using SendKeys? Tag: 52118
Controling C# Forms in Windows Application
I'm a web applications developer and I'm being asked to write this
windows application so I'm sure this is an easy answer but It's not
jumping out at me.
I have an application that uses several forms in a single windows
application. I need to be have the user click a button and have it
bring up a different form. These forms aren't generated on the fly
they are hardcoded. For example the entry point of the application
has a welcome menu with a login. If the user is a new user they need
to fill out a account form. This form is located on a seperate
windows form then the login / welcome menu.
Thanks in Advance for all help and suggestions
Braden Bowers Tag: Screencapture without using SendKeys? Tag: 52117
Strange Issue with MDI childs and Merged menus.
Have a MDI parent with a menu and a MDI child with a menu that gets added to
the parent - nothing fancy. One the parent, there is a menu (file/new) item
that loads and shows a new child. Works fine so far. However, if you click
(file/new) 2 or 3rd times, without actually clicking on the new child first,
I will get: "An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll Additional information: Object
reference not set to an instance of an object."
However, if I click inside the ListView in the first child (I think because
it changes the focus off the menu) then I can continue creating children
without this error. You must *actually click the control as setting the
focus in the code does not stop the problem. This does not happen if I
remove the menu from the child or if I do not start the child as MDI.
Therefore, I am guessing it is an issue with merged menus and/or mdi
children. Anyone run into this before? Is there a way to simulate the
mouse click in code (i.e. not just setting the focus).
--wjs Tag: Screencapture without using SendKeys? Tag: 52115
how to display multiple image on a windows form...
hiye people... how can i display multiple image on a
windows form? my image will be from a folder somewhere on
the local machine. whats the best method to display
multiple image?
yours truly
simon Tag: Screencapture without using SendKeys? Tag: 52109
Intercepting events
Hello all,
I have a form with several controls(buttons) on it. I want
to start a screen saver after nothing has been pressed for
10 min. And of course if something has been pressed, to
restart the timer. To to this I have to trap each
control's Click event and restart the timer from there. Is
there a way to do this only once, somehow to hook before
each control's Click event or something sismilar?
Is there a way the form to intercept an event going one of
its controls?
Thank you Tag: Screencapture without using SendKeys? Tag: 52104
Intercepting events
Hello all,
I have a form with several controls(buttons) on it. I want
to start a screen saver after nothing has been pressed for
10 min. And of course if something has been pressed, to
restart the timer. To to this I have to trap each
control's Click event and restart the timer from there. Is
there a way to do this only once, somehow to hook before
each control's Click event or something sismilar?
Is there a way the form to intercept an event going one of
its controls?
Thank you Tag: Screencapture without using SendKeys? Tag: 52103
Windows Forms Inheritance, Incomplete?
I was playing around with Windows Forms
and found out this Forms Inheritance feature.
The moment I saw that, I felt this can be
used effectively if the application
contains couople of forms which have
a consistant look and also shares
SOME similar functionality between the forms.
Lets say for example, I have 2 forms and both
forms have buttons as (New, Edit, Save, Close)
Both the forms before showing, should do a
security check(say in forms load event)
In the old vb scenerio, we would create 2 similar
forms seperately and do code cut and paste
for each form which have the similar functions.
But here, with forms inheritance this should
be automaticaly done. But what happense when
u inherit a form at the moment is, it only
sets the controls MODIFIER poperty to
say Protected, Proteted Internal etc..
But If I want to override the parent forms
functionality , say overriding CLOSE buttons
click method, I have to manually edit
the parents click event as;
protected virtual void btnClose_Click(object sender, System.EventArgs e)
and then edit the close button event in the
child form to;
protected override void btnClose_Click(object sender, System.EventArgs e)
And then, in the child forms' event registration for
CLOSE button should be removed/commented(the line below).
//this.btnClose.Click += new System.EventHandler(this.btnNew_Click);
Otherwise, when the child instance get created
it will register 2 events(cause it goes up the
inheritance hierachy and creates parent form instance
first and then come back to child form)
so if u click CLOSE button once,
it will call the close method twise!!!!!
My question is why they didn't automate this couple
of steps ? If a forms controls have been set to
Protected / Protected Internal, they could have
generate the code so that it will really
work.
I want to know what you guys think. May be
I have taken the whole thing from the wrong
end.
May be forms inheritance is there ONLY to get the
UI duplicated? is it?
Regards
KK Tag: Screencapture without using SendKeys? Tag: 52098
Bug in datatable.select
If you use a datatable select on a column that contains a GUID you will have
a major problem if you are not using US language.
We are using Danish language and when selecting like this:
ds.Tables(0).Select(GuidColumn = 'SomeGUID')
It will not always return the row as expected, I suspect the problem is that
in Denmark the character "å" is the same as "aa" and one side of the
equation returns "å" while the other returns "aa".
This is a serious bug and should be fixed ASAP - I have reported this to MS
6 months ago, but to no avail.
For anyone interested I can send a project that demonstrates this behaviour.
Regards
Thorben Jensen Tag: Screencapture without using SendKeys? Tag: 52093
What is the best method to display multiple data
hiye good people of devCity, I'm new to the .net world.
i've recently been assign a task to display multiple data
ON A WINDOWS FORM. if this task were to be completed in
asp.net i would use datagrid and all its wonderful feature
to customize the output of it. but sadly, i'm not...
anyway, since my app would be in a windows form, do i
still need to use datagrid to display multiple rows of
data or is there a better tool out there and i'm not aware
of it? and if i were to stuck with datagrid, can someone
show me some sites on the net on how to customize the
datagrid the way asp.net does?
your help is greatly appriciated...
yours truly
Simon Tag: Screencapture without using SendKeys? Tag: 52092
Quote extraction from Yahoo Historical Quotes
I have the following method that retrieves quotes from the Yahoo historical
quotes web page.
According to their FAQ, there is no limitation on the number of quotes one
may download, and because the problem seems to come and go, I'm concerned it
may be a problem with my code.
In particular, the problem seems to occur when I retrieve quotes over a long
period of time. Normally the routine runs every night and downloads the
previous days quotes. Occasionally, however, I'll download one or more years
worth of quotes for several stocks. It's on these occasions when the code
seems to fail. It doesn't fail the first time, though, and it won't
necessarily fail on the stock that I'm retrieving multiple quotes from.
The exception that is thrown is: "System.Net.WebException: The underlying
connection was closed: The server committed an HTTP protocol violation." The
exception is thrown at wrq.GetResponse().
I originally thought it was because I was going through a machine using
Internet Connection Sharing, but then I did it directly to the internet
without a proxy, and the same problem occurred.
Anyone have any ideas? Code follows:
public QuoteList GetQuoteHistory(Stock StockOb, DateTime StartDate, DateTime
EndDate)
{
if (StartDate.Year < 1970)
{
StartDate = new DateTime(1997, 1, 1);
}
bool done = false;
int tryCount = 0;
QuoteList list = new QuoteList();
while (!done)
{
// Build url query string
string url = @"http://" + yahooIP + @"/table.csv?a=" +
((int)(StartDate.Month - 1)).ToString() + @"&b=" +
StartDate.Day.ToString() +
@"&c=" + StartDate.Year.ToString() + @"&d=" +
((int)(EndDate.Month - 1)).ToString() + @"&e=" + EndDate.Day.ToString() +
@"&f=" + EndDate.Year.ToString() + @"&s=" + StockOb.Ticker +
@"&y=0&g=d&ignore=.csv";
WebRequest wrq = null;
Stream strm = null;
StreamReader sr = null;
try
{
wrq = WebRequest.Create(url);
wrq.Timeout = 30000;
wrq.Proxy = WebProxy.GetDefaultProxy();
strm = wrq.GetResponse().GetResponseStream();
sr = new StreamReader(strm);
}
catch(System.Exception ex)
{
if (null != sr)
{
sr.Close();
}
if (null != strm)
{
strm.Close();
}
// Check to see if the operation timed out. If it did,
// retry a couple of times.
if ("The operation has timed-out." == ex.Message)
{
tryCount++;
if (tryCount > 2)
{
return null;
}
continue;
}
else
{
return null;
}
}
string line;
try
{
// If there's no day, close out.
if (null == (line = sr.ReadLine()))
{
return null;
}
while (null != (line = sr.ReadLine()))
{
// Parse quote data nad add the quote if it's not already in the
// list of quotes
char[] splitCh = new Char[1];
splitCh[0] = ',';
string[] items = line.Split(splitCh);
Quote quote = new Quote();
quote.QuoteDate = Convert.ToDateTime(items[0]);
quote.OpenPrice = (float)Convert.ToDouble(items[1]);
quote.HighPrice = (float)Convert.ToDouble(items[2]);
quote.LowPrice = (float)Convert.ToDouble(items[3]);
quote.ClosePrice = (float)Convert.ToDouble(items[4]);
quote.Volume = Convert.ToInt32(items[5]);
if (false == list.ContainsKey(quote.QuoteDate))
{
list.Add(quote.QuoteDate, quote);
}
}
}
catch(System.Exception ex)
{
Trace.WriteLine("Unknown exception processing request: " +
ex.ToString());
}
finally
{
// Close everything nice and clean
sr.Close();
strm.Close();
done = true;
}
}
return list;
} Tag: Screencapture without using SendKeys? Tag: 52090
TreeView with adjustable TreeNode height
Hi,
Does anyone know a third party TreeView control with the possibility to
adjust (programmatically) independently the heights of the TreeNodes? i.e.
sort of multiline TreeNode.
(Or would it be feasible to construct such one by yourself inheriting from
the .NET TreeNode class?)
Ron Tag: Screencapture without using SendKeys? Tag: 52089
mdi scrollbars - now tearing my hair out!
Hi all!
Original question:-
Is it possible to disable the scrollbars that appear on
an MDI parent form, so when the child forms are dragged
outside the forms client area the scroll bars do not show!
----------------
Still can't seem to find any info on how this is done!
Searched everywhere on the net tried EnableScrollBar and
ShowScrollBar, so please can anyone help with this almost
impossible problem!
Thanks in advance,
Carl Prentice. Tag: Screencapture without using SendKeys? Tag: 52088
About the samples in MSDN TV Data Validation in Smart Client Applications
I'm a regulary watcher of MSDN TV. I recently watched the episode Data
Validation in Smart Client Applications.
I'm very interested in one of samples - the validation sample. I'm very
surprised that when a validation component is added onto the form, it
dinaymically adds new properties to a TextBox control!
I went to the site mentioned in the show, but the samples are not there (I
got the ever existing 404 error).
Can someone tell me that is the key technique to dynamically add properties
to a control on a form? Tag: Screencapture without using SendKeys? Tag: 52085
problem with form1.show
If I use the command form1.showdialog() the form appears
and stays on the screen.
However, if I use form1.show() it appears then
immediately closes. I've spent two hours pulling my hair
out on this one, thumbing through 3 vb.net books.
For now I'm using showdialog, but I need the 'real thing'.
Thanks in advance.
dennist Tag: Screencapture without using SendKeys? Tag: 52080
Icon's size problem
Hi!
I've copied some ico file;
on this copy I've worked under VS to graphicaly modiffy icon;
the result is that I can only change picture of the max-res icon.
Problem - how to convert this "big" to other sizes?
Is there any soft under VS (or other) that can make this conversion?
Thx in advance
KW. Tag: Screencapture without using SendKeys? Tag: 52075
Thanks all - Suggestions for Disable Ctl+Alt+Del C#
Dear Friends
Thanks for all your suggestions.
Brain Thank you for your source code and valuable suggestions.I am working
on it...
Thanks,
Dev Tag: Screencapture without using SendKeys? Tag: 52058
How many threads
Hi,
If I have a code like this:
class Foo
{
public Form1 frm1;
public Form2 frm2;
public static void Main()
{
frm1=new Form1();frm2=new Form2()
Application.Run(frm1);
}
}
How many threads will I have in my process (excluding the
CLR's ones)?
Does creation of a form create a thread, too?
I think it does because where else the forms' message
loops will reside, but I am not sure
Thank you Tag: Screencapture without using SendKeys? Tag: 52057
Strange TextBox behavior when 2 or more text boxes are placed next to each other.
We have several forms that use textBoxes to collect info from the user. It
seems that when we have 2 text boxes stacked one below the other, when the
user types in the second one the text is actually entered into the first
one. We thought that maybe upgrading to .NET 1.1 might solve this issue,
but it is still there. Tag: Screencapture without using SendKeys? Tag: 52040
form with datagrid steals focus
Hi. I'm having a very annoying focus problem. I have a class
(MyDataList) which implements CollectionBase and IBindingList. This
class is bound to a data grid.
whenever my MyDataList is updated [example: OnListChanged(new
ListChangedEventArgs(ListChangedType.Reset,-1));] (another thread
invokes updates on the UI thread) the form containing the DataGrid
takes focus and then acts like something set TopMost = true on the
containing form!
I can't figure out what is causing this, and it's driving me insane!!
Has anyone encountered this before, and found a fix? Or does anyone
have a suggestion? (extend DataGrid and override some protected
event?) Tag: Screencapture without using SendKeys? Tag: 52038
Dropdown Grid
Have anyone seen or implemented a control that drops a
grid out of dropdown list box? Tag: Screencapture without using SendKeys? Tag: 52024
Visual Inheritance for ComboBox
Hi All,
Just been toying around with inheriting from the ComboBox control. See below
a simple example of the new ComboBox class.
// start MyComboBox.cs file
using System;
using System.Windows;
using System.Windows.Forms;
using System.Drawing;
namespace MyComboBox.UI
{
/// <summary>
/// Summary description for MyComboBox.
/// </summary>
public class MyComboBox : ComboBox
{
public MyComboBox()
{
this.ForeColor = Color.DarkBlue;
}
protected override void OnHandleCreated(EventArgs e)
{
if (this.DesignMode)
{
this.Items.Add("Design Mode");
}
else
{
this.Items.Add("Run-time Mode");
}
this.Items.Add("Orange");
this.Items.Add("Apple");
this.Items.Add("Pie");
}
}
}
// end
There's no problem adding the control to my toolbox. Also - no problem
dragging and dropping the custom combo onto the design canvas.
Strange thing is, after switching between design time and code a couple of
times and running it - the font seems to change into a bigger font,
something like Arial bold or such.
Also, I suppose I need to specify some attribute tags before the class
definition. Any ideas or suggestions?
Thanks a bunch,
Wim Hollebrandse Tag: Screencapture without using SendKeys? Tag: 52023
Menu shortcut keys do not work when Form.Show is called.
I have a form that I build in C# that does not seem to annunciate a menu
item selection when a shortcut key is pressed. It only seems to occur if I
display the form using the Form.Show() method. The problem does not seem to
occur when I use Form.ShowDialog().
Can someone explain how I can get around this problem?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
varnk@diebold.com
----------------------------------- Tag: Screencapture without using SendKeys? Tag: 52012
MDIChild forms maximizebox.
Hello ALL,
I have this situation:
1. A MDI Form named frmPrincipal;
2. A MDIChild form named frmCustomers;
When I show the frmCustomers form, from a click event of a button of
frmPrincipal, like this:
frmCustomers.MdiParent = this;
frmCustomers.WindowState = FormWindowState.Maximized;
frmCustomers.Show()
The frmCustomers form shows ok, but the minimizebox, maximizebox and
controlbox appears, and I can´t like this.
In the frmCustomers properties I set false to maximizebox, controlbox and
minimizebox, but they appears yet.
I try to remove the border of the form (set FormBorderStyle = None) but
don´t work too.
Please, how can I hide this buttons?
Thanks in advance and sorry my English.
Fernando Lopes
Marília - São Paulo - Brazil. Tag: Screencapture without using SendKeys? Tag: 52009
Problem with drawing over the top of a background form
Hi, I am hoping someone can point me in the right direction. I am working on
a program that has a form that has a background mage that the user can
change. Currently I assign in directly to background image. After an image
is assigned to the background the user has the ability to draw rectangles on
the image using the mouse to define the regions. To do that I create a
bitmap and constantly redraw the rectangles on it that are stored in a
linked list each time the form repaints.. the problem is that because of
this bitmap, I never see the image assigned to the background. Of course
this makes sense since I am creating a bitmap. I've tried setting the bitmap
to be transparent, and that allows me see the background image, but
everytime I use the mouse to draw or resize a region, it doesn't refresh
properly and I'm left with tons of rectangles on the screen, instead of just
the final rectangles position. Is there any easier way to do this? I've also
tried to assigned the .BMP image I use directly as the bitmap I am creating
the rectangles on rather then the background, but then I get another error
saying
"Additional information: A Graphics object cannot be created from an image
that has an indexed pixel format."
The bmp is an 8 Bit format image. I've also tried converting it to a GIf
with no success.
I was going to post some of the code, but figured the post was long enough,
if anyone is interetsed in seeing what i have so far, just let me know. I
appreciate any help you guys can give me. Tag: Screencapture without using SendKeys? Tag: 52006
Simple way to force a form to validate
Is there a simple way to force a form to invoke validation on all its
controls.. I want to do this on a button_click prior to doing some
processing..
Thanks Tag: Screencapture without using SendKeys? Tag: 52005
HOWTO: Remove the left indicator column of a datagrid?
Hello ALL,
Please, is there any way to remove the indicator column (that´s in the left)
of a datagrid in windows forms?
Thanks for help.
[]s
Fernando Lopes
Marília - São Paulo - Brazil Tag: Screencapture without using SendKeys? Tag: 52002
Pointing to custom forms
When we create a new win usercontrol project(any type of
project really), IDE creates a default usercontrol form
for us. Is there a way to set IDE so that instead of this
default form, It creates a custom form?
thanks Tag: Screencapture without using SendKeys? Tag: 51992
Am I doing something wrong? (Variables)
Hiya all,
I am developing a windows form application. I am coding in C#. What I have
is two forms/Classes, frmMain & frmAdd and they both have the same default
namespace "Q.A._Testing_Centre". In frmMain I have initialize & instantiated
my variable as "public string userName", where the user input name is
stored. I am trying to get the stored data propertied from my frmMain to my
frmAdd. I thought this is the correct syntex for outputting the info in my
textbox (scratching my head), maybe it's not. So please let me know if you
can help, or where I'm going wrong. Code is as follows:
namespace Q.A._Testing_Centre
{
public class frmMain : System.Windows.Forms.Form
{
public string userName; <<<---- I want the data from here
...
...
...
namespace Q.A._Testing_Centre
{
public class frmAdd : System.Windows.Forms.Form
{
private void SubMainMenu()
{
frmMain Main = new frmMain();
txtBoxSample.Text = Convert.ToString(Main.userName);<<<--- to output in my
textbox here
...
...
...
I have tried a sample textbox with in frmMain and this data is in fact
stored until I exit my program. But I cannot seem to reproduce the same
textbox output in frmAdd. I seem to get a blank textbox area. Alternatively
I have try "txtBoxSample.Text = Main.userName" syntex which does not work as
well.
Or maybe if someone has a better alternative, please feel free to let me
know.
All help is truly appreciated & thank you all in advance.
MikeY Tag: Screencapture without using SendKeys? Tag: 51989
Searching for folder Zip/Unzip utility.
I have tried alot in searching for API to make an utility
for zipping and unzipping the folders in vb.NET. If any
one has the idea to create this utility by using .net
framework please let me know.
regards
sandy Tag: Screencapture without using SendKeys? Tag: 51982
list of mdi children in a submenu of mdiparent
Hello,
I would like to have a list of mdi children in a submenu of mdiparent.
the list should be refreshed dynamically when mdi children are created and
destroyed. mdi child should be activated when the user clicks the menu item.
I have some results but I am not satisfied (deep problems with
MdiChildActivate).
Maybe there's an article or an example on how to do that?
Regards,
Wiktor Tag: Screencapture without using SendKeys? Tag: 51981
Component Errors
I am Intermediate VB Programmer. I develop an
application recently which I intend install on a server
network. But when I was testing software on the server, I
encountered a problem(ie when I tried to load the
application on the network from one of the client comptuer
(work-station). It was complaining of Some components
either missing or not properly registered. And these were
some of the component I used for the program such as
MSAdodc.Ocx... Inshort,some most of the activeX component
that I used.
Apart from developing a server and Client
Application,is there no other ways that can make this
applicatio work properly for me while application is on
server system and been accessed from the client computer?
I will be very grateful and thankful, if I can get
the solution right away.
Thanks Tag: Screencapture without using SendKeys? Tag: 51976
Disable Ctl+Alt+Del C#
Dear Friends,
How to disable the start,windows task
manager,Ctl+Alt+Del buttons through C#?,
If any one knows please let me know...Any suggestions would be greatly
appreciated.
Thanks,
Dev Tag: Screencapture without using SendKeys? Tag: 51975
DateTimePicker BackColor Property
Hi,
for those of you, who need a backcolored DateTimePicker
control:
this ist my implementation of the BackColor property for
the standard DateTimePicker Control (which does not work):
public class MyDateTimePicker : DateTimePicker
{
#region internal set backcolor hack
private Color _BackColor = SystemColors.Window;
public override Color BackColor
{
get
{
return _BackColor;
}
set
{
_BackColor = value;
Invalidate();
}
}
protected override void WndProc(ref Message m)
{
if (m.Msg == (int) 0x0014 /* WM_ERASEBKGND */)
{
Graphics g = Graphics.FromHdc(m.WParam);
g.FillRectangle(new SolidBrush(_BackColor),
ClientRectangle);
g.Dispose();
return;
}
base.WndProc(ref m);
}
#endregion
}
... seems to work quite well.
claudio Tag: Screencapture without using SendKeys? Tag: 51969
Double Click on TreeView
Hi all,
I wanted to know if a node in tree view is double clicked,
I tried clicks property on MouseDown but it always returns 1.
any solutions for this problem
regards,
... Tag: Screencapture without using SendKeys? Tag: 51966
Why this does not work?
Hi:
This is a little program. It has a thread that calls trough Invoke to a
method called Draw. The Draw method draw elements within the Panel control.
For some reason, the program does not close sometimes. Please semd me
comments about this.
Thanks!
Juan C. Olivares
// project created on 11-07-2003 at 0:31
using System;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
namespace MyFormProject
{
delegate void DelegateCallDraw ();
class MainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Panel panel;
private DelegateCallDraw CallDraw;
public MainForm()
{
InitializeComponent();
panel.AutoScroll = true;
// Add controls
this.Draw ();
// Create delegate
CallDraw = new DelegateCallDraw (Draw);
// StartThread
Thread thread = new Thread (new ThreadStart (StartTimer));
thread.Start ();
}
// This method is used in the forms designer.
// Change this method on you own risk
void InitializeComponent() {
this.panel = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// panel
//
this.panel.Location = new System.Drawing.Point(16, 16);
this.panel.Name = "panel";
this.panel.Size = new System.Drawing.Size(264, 128);
this.panel.TabIndex = 0;
//
// MainForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 161);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.panel});
this.Name = "MainForm";
this.Text = "This is my form";
this.ResumeLayout(false);
}
private void Draw ()
{
panel.Controls.Clear ();
panel.SuspendLayout ();
for (int i = 1; i <= 20; i++) {
TextBox tb = new TextBox ();
tb.Text = i.ToString ();
tb.Location = new Point (0, (i - 1) * tb.Height);
panel.Controls.Add (tb);
}
panel.ResumeLayout ();
}
private void StartTimer ()
{
while (true) {
// Sleep 10 secs
Thread.Sleep (1000 * 10);
// Call draw
this.Invoke (this.CallDraw);
}
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm());
}
}
} Tag: Screencapture without using SendKeys? Tag: 51964
I am looking for some sample code to do a screen capture (printscreen)
without using SendKeys. Anyone?