should bound textbox change for combobox selection
I have a combobox that is bound to a column of a table. I have a textbox
bound to a second column in the same table. When the user makes a
combobox selection, what do I have to do to cause the bound textbox to
update with the value from the new row?
Thanks!
LuAnn Tag: Suggestion Tag: 56243
Controls don't overlap on design form, but do at runtime
I left a Microsft DevDays some months ago with the idea that if you anchored
all of your controls to all four sides, then the screen would size up
proportionally when the form was maximized or made larger. My current test
form most emphatically does not do this - controls overlap on each other in
a most ugly fashion. My scroll bar next to a multi line text box ends up
half the width of the screen. The data grid on the top half and the edit box
on the bottom half both expand to well over half the screen. Does anybody
have any ideas on how to make a form size up gracefully? Tag: Suggestion Tag: 56241
adding controls programmatically on winfform
i try to add a group of linklabel to winform as following, but when running
it, i can only see one linklabel added (the first one). Could anyone help
me to solve it and tell me why?
thanks
jj
---------------------------------------------------
LinkLabel[] lnkCase = new LinkLabel[caseCount];
for (int i = 0; i < caseCount; i++)
{
lnkCase[i] = new LinkLabel();
lnkCase[i].Text = dirs[i].Name;
lnkCase[i].Name = dirs[i].Name;
lnkCase[i].Location = new System.Drawing.Point(100 + i * 2, 80 + i *
2);
lnkCase[i].Size = new System.Drawing.Size(272, 23);
lnkCase[i].LinkClicked += new
System.Windows.Forms.LinkLabelLinkClickedEventHandler
(lnkCase_LinkClicked);
this.Controls.Add(lnkCase[i]);
}
----------------------------------------- Tag: Suggestion Tag: 56240
ListView does not update internally
ItemActivate or SelectedIndexChange events do not always update the
SelectedIndices or SelectedItems properties. This has to be a bug. I'm using
.NET Framework 1.1. Tag: Suggestion Tag: 56239
Reactivation of a closed MDI Child
In the parent of my MDI application I declare a child form
private frmChild = null;
which is to be activated on a menu click. In the click event I am using the
following code:
if (frmChild == null || !frmChild .IsHandleCreated)
{
frmChild = new frmChild ();
frmChild .MdiParent = this;
frmChild .Show ();
}
else
frmChild .Activate();
This does not have the desired effect however; I am trying to avoid having
to go through initialization each time the form is re-opened. I also need
to make sure that only one instance of this form is opened at a time.
Can anyone offer help?
Thanks,
Nate Tag: Suggestion Tag: 56235
Newbie question/gripe
I'm in my first couple hours with .NET 2003. I created a C++ project and
started working on a Windows Form. Should .NET not be totally inappropriate
to my purposes, I'll gradually start migrating a monolithic/Client Server
app (currently using ADO) to it.
On my first attempt to run my form I got a browser with a message that I
should change the Web Services namespace for my project. My reaction was
"What the h*ll are you doing in my face?". I intentionally chose Windows
Forms over Web Forms because I don't want to run in a browser or over the
web. I sure didn't get the form I had designed.
What should I do to write applications that don't try to invoke HTTP without
my permission and simply work on the machine they are running on?
Thanks
Randy Hersom Tag: Suggestion Tag: 56232
VB.NET Rich Text Box control ( RichTextBox ) - adding custom hyperlinks
Hello!
What I want to do is be able to set a piece of text in the rich text
box control so that it has a 'link' style. Then, whenever this piece
of text is clicked on, the LinkClicked event is raised. In other
words, I want the behaviour of a hyperlink without having to show the
full url.
Is this possible without having to manually change and detect the font
styles myself?
Thanks!
Al. Tag: Suggestion Tag: 56230
.net directory dialog
Hello
since there is no folder dialog controls in .net
how to make such kind of things with existing controls?
or any 3rd party controls is good? Tag: Suggestion Tag: 56229
RichTextBox SelectionFont Issue
When you select text in the RTF editor (C# code) that has different styles
of font (i.e. part of the test is bolded and part is underlined) the
selectionfont property is set to null.
Is there any other way we can access all the available style for the
selected text?
Thanks
Joseph Tag: Suggestion Tag: 56227
invoking on UI thread
I understand the notion that a UI thread should be
responsible for managing the UI elements; therefore,
worker threads need to call invoke on a control. I don't
understand the technical reason for this. What is it
about the Win32 message loop that doesn't like worker
threads to update the UI and why does it work anyway (at
least most of the time)?
Thanks for shedding some light,
Paul Tag: Suggestion Tag: 56226
Unloadable Control
Is it possible to implement a control that can be loaded into, and later
unloaded from current the process when it is no longer needed? I've been
able to do this with other classes by subclassing MarshalByRefObject,
putting it in it's own assembly, and loading it into its own AppDomain
(which can later be unloaded). But as far as I can tell, this isn't as easy
with a System.Windows.Form.Control descendant (even though they descend from
MarshalByRefObject).
The first problem I've run into is that as soon as I try to use the control
(which was created in a different AppDomain), I get a SerializationException
because the ControlCollection class (of the parent) is not a descendant of
MarshalByRefObject (or serializable). Apparantly, controls need to
reference that collection in some way, when they are added to the parent
(which is in the original AppDomain in this situation).
So my question is, is there some way to implement an unloadable control,
where all it's code is in an assembly that can be loaded-into/unloaded-from
the process? There may be workarounds, like just making the code behind the
control's events unloadable, and not the control itself. But for my
purposes, the control wouldn't be generic enough for something like that. A
good analagy would be a user control for implementing a propery sheet.
Any ideas?
-Ethan Tag: Suggestion Tag: 56225
Rich Text Box control ( RichTextBox ) Drag and Drop problem
Hello!
I have tried a few things to get drag and drop to work in the rich
text box control. The best example I have come across is point 22.3
of:
http://www.syncfusion.com/FAQ/WinForms/FAQ_c89c.asp#q572q
However, there is a slight problem in that the drag and drop does not
work if the *very first* drag and drop operation you do is from within
the control itself (i.e. dragging from and dropping into the control).
The drop cursor changes to the 'prevent drop' cursor (/).
After this first attempt though, drag and drop works fine!
Can anybody help? Even the MSDN help isn't useful (to be honest it
just doesn't work - http://support.microsoft.com/default.aspx?scid=kb;en-us;814309)
Thanks,
Al. Tag: Suggestion Tag: 56224
Drag and Drop between ListView and TreeView.?!
I've got a treeview and listview program which i would like to add a
drag and drop utility to it. i've managed to drag and drop items from
the treeview to the listview, from the treeview to itself. but i
cudn't do the same from the listview to the treeview.?!!
i would like to be able to drag and drop items/nodes from both to
either one of them and update the data automatically and refresh the
controls.
I don't know how to do this and i've got a very short time to do it.
Any help, examples or comments would be very much appreciated.
Thank you in advance.
Regards,
Kam
The treeview looks like:
Level1
--Level2
---Level3
and the code i've developed is as follows:
//-----------------------------------------------------
private void treeView1_ItemDrag(object sender,
System.Windows.Forms.ItemDragEventArgs e)
{
treeView1.DoDragDrop (e.Item, DragDropEffects.Move);
}
private void listView1_DragEnter(object sender,
System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent (typeof (TreeNode)))
e.Effect = DragDropEffects.Move; //All or Copy (try)
}
private void listView1_DragDrop(object sender,
System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent (typeof (TreeNode)))
{
TreeNode tn = (TreeNode) e.Data.GetData
(typeof (TreeNode));
listView1.Items.Add (tn.Text, tn.ImageIndex);
treeView1.Nodes.Remove (tn);
}
}
private void listView1_ItemDrag(object sender,
System.Windows.Forms.ItemDragEventArgs e)
{
listView1.DoDragDrop (e.Item, DragDropEffects.Move);
}
private void treeView1_DragEnter(object sender,
System.Windows.Forms.DragEventArgs e)
{
e.Effect = DragDropEffects.Move;
}
private void treeView1_DragDrop(object sender,
System.Windows.Forms.DragEventArgs e)
{
TreeNode NewNode;
if(e.Data.GetDataPresent("System.Windows.Forms.TreeNode", false))
{
Point pt = ((TreeView)sender).PointToClient(new Point(e.X, e.Y));
TreeNode DestinationNode = ((TreeView)sender).GetNodeAt(pt);
NewNode = (TreeNode)e.Data.GetData("System.Windows.Forms.TreeNode");
if(DestinationNode!= NewNode)
{
DestinationNode.Nodes.Add((TreeNode) NewNode.Clone());
DestinationNode.Expand();
//Remove Original Node
NewNode.Remove();
}
}
}
//--------------------------------------------------- Tag: Suggestion Tag: 56216
Vertical toolbar
Hi,
I need to set the orientation of the toolbar .. so that I can have a toolbar
that comes up vertical and also if I attach a splitter it should resize
buttons also
I am not able to resize buttons as width is a private property of the
button.
Thanks
Rajesh. Tag: Suggestion Tag: 56208
Changing values in DataRow
Hi
How can I change some values in the DataRow? I make a query to get some
records out of database and then I want to change some, but it doesn't seem
to work. With the following code, nothing gets set:
foreach(DataRow myRow in Table1.Rows)
myRow.ItemArray.SetValue("overwritten value", 0)
myRow contains 3 columns and I would like to change the first one - index 0.
Please help,
Alen Tag: Suggestion Tag: 56207
Strange ComboBox Binding Behaviour
I am trying to bind multiple comboboxes here to the same datasource.
I see a strange behaviour with reference to the time when the ComboBox
actually gets its Items Collection populated.
I am putting my Code in here. 2 functions (implementing the same
functionality) which give me variable results.
To give an idea what i am trying to achieve:
I am developing a new Container Control (extending Panel)(i call it
DataWindow) which supports a Grid as well as Free-Form layout.
//----------- MY CODE--------------//
// This Works Correctly
// Gets called for the Free-Form as well as Grid Layout
protected virtual void e_ComboBoxRetrieved()
{
// dwComboControl is a Class that stores information about
// a single ComboBox Control placed on the DataWindow
dwComboControl dwc;
// icol_ComboControls is a custom collection of dwComboControl.
// Thus a collection of all the ComboControlsthat the developer
// may have placed on the DataWindow
int i_ComboCount = this.icol_ComboControls.Count;
ComboBox cb;
DataTable dt;
for(int i = 0; i < i_ComboCount; i++)
{
dwc = this.icol_ComboControls[i];
dt = DataUtil.GetDataTable(dwc.ComboSql);
// if the layout is FreeForm, then bind the ComboBox
if(this.dwLayout == dwLayoutType.FreeForm)
{
cb = dwc.ControlRef;
cb.DataSource = dt;
cb.DisplayMember = dwc.ComboDisplayCol;
cb.ValueMember = dwc.ComboDataCol;
// I Get the correct result of here.
// ie. cb.Items.Count == dt.Rows.Count
MessageBox.Show(cb.Name + " : " + cb.Items.Count.ToString() +
" Rows : " + dt.Rows.Count.ToString() );
}
else // Do not bind the ComboBox, just set the
// reference of the retrieved DataTable to
// dwComboControl's idt (instance DataTable)
{
dwc.idt = dt;
}
}
}
// Gets Called for Each Row retrieved in the Grid
// I have used reflection here and replicated the controls
// placed by the Developer during Design-Time into a new
// Panel which is passed as a reference here.
private void f_BindComboBox(dwDetailPanel adp)
{
ComboBox cb;
dwComboControl dwc;
// ie. for each ComboBox actually placed by the Developer
// for a Single Row
int i_ComboCount = this.icol_ComboControls.Count;
for(int i = 0; i < i_ComboCount; i++)
{
dwc = this.icol_ComboControls[i];
// Get a Copy of DataTable to which this ComboBox is to
// be Bound. Doing this to save Database trips for
// binding ComboBox's for each row.
// dwc.idt has been populated earlier in e_ComboBoxRetrieved()
DataTable dt = dwc.idt.Copy();
// Get the Instance of ComboBox in the Current Panel
cb = (ComboBox)adp.icol_ChildControls.GetControl(dwc.Name);
// icol_ChildControls is a custom Collection (with a
// HashTable implementaion). It is a collection of All
// the controls placed on the Detail Panel
cb.DataSource = dt;
cb.DisplayMember = dwc.ComboDisplayCol;
cb.ValueMember = dwc.ComboDataCol;
// This is where i see inconsistent behaviour
// ie. cb.Items.Count is 0
// dt.Rows.Count gives a correct Figure.
MessageBox.Show(cb.Name + " : " + cb.Items.Count.ToString() + "
Rows : " + dt.Rows.Count.ToString() );
}
}
//----------------------------------------------------------------//
Further more, when my DataWindow (Grid) finally gets displayed, I find
that all the ComboBox's in all the Rows retrieved do display the Bound
Data correctly.
The problem for me is, after each DetailPanel is created for each row
retrieved for the Grid DataWindow, I have to set the
ComboBox.SelectedValue to the value in the DataBase. When i go to do
that, i find out that there are no Items in the ComboBox.
This is how the events have been organised in my Control
For Each DataRow
1) Create Host DetailPanel for the Row
2) Replicate all the ChildControls for the Row (using reflection)
3) Bind ComboBox's on the new DetailPanel
4) Set values of the Current Row in the DetailPanel
End For
I have double checked that these two functions are the only place
where anything related to ComboBox is happening in my application.
Anyone who is aware of such problems / has any idea why is this
happening / any solution. Help is appreciated.
-Snehal Tag: Suggestion Tag: 56200
Print with feed tractor laserjet and customized papersize
Hi,
I have a problem with a laser feed tractor printer, paper size is 8.3 X 11
inc.. For print in windows xp home from a c# application i use a custom
paper size added at the printer server properties. The problem is that i
have to print a value near bottom margin (sheets are pre-printed), but if i
use custom papersize this value will not printed, i think because there is a
bottom margin, but in my custom paper size i have set all margins to 0.00 .
Is there any solution? Is teher any way to set bottom margin to 0 (is a feed
tractor printer!)?
If i set custom paper size more height the bottom value is printer but the
printer don't stop exacly at the end of the sheet, and the next print begin
with a bigger upper margin.
Also:
- how can i user c# to add a custom print from to SO?
- i have to use a print from, or i can simply use c# code to specify custom
paper size?
- how set printer papersize and papersource from c#?
Thanks in advance,
epederiva Tag: Suggestion Tag: 56199
Paging in Windiws Datagrid.
Hi,
i am having one datagrid, i am fetching more than 25k
records in that datagrid.
At present i am displaying all the records in one grid.
so the datagrid takes hell lot of time to fetch record
from database and displaying it.
Whether paging is allowed in Windows C# forms ? Or any
other way to implement paging ?
Thanking in Advance.
Regards,
Mahesh D. Rane
LnTInfotech, Powai
Mumbai. Tag: Suggestion Tag: 56189
changing configuration file at runtime
I want to ask how to modify the configuration file
(windowapplication.exe.config) at runtime and keep this setting for the next
time the program start? Tag: Suggestion Tag: 56187
ListView.SelectedIndexChanged problem
1. ListView has Multiselect = true
2. I handle the above-mentioned event.
3. SelectedIndices collection has 0 elements when navigating by mouse-click
or up/down arrow
I need to have Multiselect on to support deleting multiple items at time.
But I tried with multiselect=false, and I still get SelectedIndices
collection with 0 elements. All this leads me to believe that .NET 1.1
ListView has a bug. Tag: Suggestion Tag: 56186
ListView.SelectedIndices does not work
When I tie to SelectedIndexChanged event. The SelectedIndices property has 0
items as I use the up/down arrows to navigate the listview. Tag: Suggestion Tag: 56185
MDI Child Form Not Releasing DataSet
I have an application that creates MDI child windows to edit different datatables in the same
dataset.
At one point in the application cycle, users have the opportunity to log off the database server (so
they can reconnect to a different one). As part of that log off, I clear the dataset.
Unfortunately, if an MDI child form has been opened and then closed, the datatable for that form
hangs on the clear (i.e., aDataTable.Clear() stalls forever). This problem does not occur if that
table's form has not been opened and closed.
This seems to be a problem where the MDI child form, while "closed", is still maintaining a
reference to the datatable (probably through databinding?).
How do I get rid of this reference so that datatable can be cleared? I've tried setting the
MDIParent property of the MDIChild form to null in an event handler for the MDIParent form that
watches for MDIChild Close events, followed by a call to MDIChild.Dispose(). Unfortunately, that
does't solve the problem.
Any leads or workarounds would be greatly appreciated.
- Mark
p.s. BTW, this is looks to be the second "silent failure" of the NET Framework I've come across in
the past week (the first had to do with the way the Framework's handling of DBNull values for bound
DateTimePicker controls breaks the BindingContext.Position code, with no outward sign of a problem).
I'm beginning to think the NET Framework design team didn't take enough advantage of exception
handling in developing the Framework. Tag: Suggestion Tag: 56184
automatic code generation
I'm not sure if this is the right forum, but it has to do
with the automatic code generation of a WinForm for the
Compact Framework.
Anyway, I thought I'd report an issue I've been having. I
subclass a control to define my own button class that can
draw custom images (since the CF does not permit this as
is). Anyway, to add it to my winForm, I manually add it
in among the automatically generated code, adding it to
the proper tab control, etc.
I build it, run it, and it works fine. Sometimes if I
then hide the automatically generated code (w/ my newly
added code interspersed) and proceed to edit the WinForm
through the GUI interface provided in VS .NET 2003 C#, at
some point, the code I intertwined w/ the automatically
generated code disappears.
I haven't nailed down the exact procedure that causes the
problem b/c each test I have to re-write the inter-mixed
code. Right now it isn't a big deal for me, but in the
future it might become an issue. I suspect that at some
point, the compiler may be re-generating the
automatically generated code but doesn't realize I've
edited it? Oh, and before it removes the code, an error
might pop up saying my class is uninitialized, but if I
build my project, it sees that it is initialized (among
the auto-gen code) and builds fine. Tag: Suggestion Tag: 56183
Alternative to TransparencyKey property?
Hi,
I'm trying to convert an application from C++ to CSharp.
Under C++ I used the SetLayeredWindowAttributes() API
to make parts of my form transparent. Now in CSharp, I
was trying the forms TransparencyKey property. However,
it doesn't work on my system with 32bit display and I found
this confirmed by other posts on this topic.
I asked myself if I could avoid this problem by dllimport-ing
the API function. I'm very new to CSharp and Dotnet and
could not get it working, yet. I would really appreciate if
anyone could tell me what is wrong in the following code:
//the original function signature
/*
BOOL SetLayeredWindowAttributes(HWND hwnd,
COLORREF crKey,
BYTE bAlpha,
DWORD dwFlags
);
*/
//define the key constant
private const int LWA_COLORKEY = 0x00000001;
[DllImport("user32.dll", SetLastError=true)]
public static extern int SetLayeredWindowAttributes(int hwnd,
int cKey, byte bAlpha, int dwFlags);
//in the forms constructor
int ret = SetLayeredWindowAttributes(this.Handle.ToInt32(), 0x00FFFFFF, 0,
LWA_COLORKEY);
if(ret == 0)
{
try
{
throw new Win32Exception();
}
catch(Exception err)
{
MessageBox.Show(err.Message);
}
}
thanks for any ideas,
Nick Tag: Suggestion Tag: 56177
Mouse Events in Nested Controls
Hi all,
I am wondering what the "normal" behavior for mouse events(click,down,
etc..) within nested controls is. Do the mouse events fire for the
container control and the child control if you click on the child control?
Or only the child control? or only the parent control?
The reason I am asking is because I have a Panel which has many child Panels
within it. When I hook up a mouse event (mousedown,click) to the parent, it
does not fire when I click on the child control. I was hoping it would fire
so I could use GetChildAtPoint to access the child control. The event DID
fire when I clicked on part of the panel without a child control.
I then opted to hook up the mousedown event inside my child control and
simply have it act upon the parent control to do the work. Unfortunately,
the event does not fire here either!?
Am I missing something? Is there a property that must be set correctly to
make this work?
Thx in advance,
Cole Tag: Suggestion Tag: 56176
DataGrid and unbound text boxes
I'm building a VB.Net Windows form application.
I have a DataGrid and 5 unbound textboxes on a form.
The DataGrid is populated with a OleDbDataAdapter and is using a table
called Clients.
What I want to do is have the users fill in the unbound textboxes and click
a button and have those values inserted into the table clients. I will then
refresh the datagrid and the new values will appear.
I created a New Connection, A New DataSet and A New Select Command to the
table Clients.
When I Create a datarow like so:
Dim drw2 As DataRow
drw2 = DataSet1.Tables("tblClients").NewRow
I recieve a error " Object reference not set to an instance of an
object......"
When I look up the error it looks like the new select command I've built is
interfering with the one on the OleDbDataAdapter.
Does anybody have any workaround ideas?
Thanks
Erik Tag: Suggestion Tag: 56172
drop down list events
I have created a drop down list and populated from db. When an item is
selected, I want to then populate and make visible a second list based
on the value of the first.
My problem is that I can't get the selection to be detected...
I have coded
Sub ddlDistricts_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ddlDistricts.SelectedIndexChanged
Dim wsGetAreas As New localhost.myWebservice1()
dsAreas = wsGetAreas.GetAreas(ddlDistricts.ID, boolerr)
ddlAreas.DataSource() = dsAreas
ddlAreas.Visible() = True
End Sub
but the event never triggers..
What am I doing wrong?
kate
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Suggestion Tag: 56171
Can userControl's menu item have shortCut?
Even if I set the shortCuts of a user control's menu items, they do not
work. What's the tricks?
Thanks, Tag: Suggestion Tag: 56170
MyMainMenu - Urgent
Hi
I need to catch the event MouseDown and MouseUp on a MainMenu but this
classe haven´t those methods.
How can i write them??
Thank You Tag: Suggestion Tag: 56166
Unable to add short key key to tab sheet in tab control
Hello,
I'm not able to add shortcut key to the tab sheet, which is a part of
default tab control. If I place a '&' in the text property of the tab sheet,
the ampersand chararter gets displayed in the tab sheet caption. If I add
another ampersand, the second one is not shown.
How do I add a shortcut key to the tab sheet.
Deepak Kashyap MJ Tag: Suggestion Tag: 56165
Memory Issue
I am developing a application and I think I have a memory
leak, but I am not sure.
TESTS:
1: I open and close a edit window I have work on for 2
weeks the memory grows by 6MB
2: I open and close the same edit window with no code, no
data just controls and the memory grows by 6MB
3: I create a brand new form with a couple of random
controls and no code and I open and close it the using the
same SUB, memory does not increase at all.
Something seems to be wrong with my window however I have
no idea what. Could someone give me some insight into why
this would be happening.
I really do not want to cut and paste all my code and
controls into another window just to find out I still have
the same problem. Tag: Suggestion Tag: 56163
how to set focus on a combobox on a tab when the form is loaded?
Hi,
I have a form with 3 tabs and each tab has a combobox on
it. When the form is loaded, I determine which tab to
display based on parameters passed into the form's New()
method.
When the form is loaded, I would like to place the cursor
in the combobox of the selected tab, place some text in
the combobox, and highlight the text. However, not only
am I unable to get the cursor in the combobox (combo.focus
() executes, but does not do it), assigning the text to
combo.text does not show the text in the combobox.
combo.SelectAll
combo.SelectedText = [my text]
creates an error, apparently because combo has not been
fully loaded yet.
Any ideas how to get the text into the combobox,
highlight the text, and put focus in the combo?
Thanks,
David Tag: Suggestion Tag: 56161
how to set focus on control in a tab on tab click?
Hi,
When I click a tab on my form, I want a combobox on that
tab to be given the focus (I want the cursor to be
sitting in the combo, blinking, and if the user starts
typing, the text should appear in the combo). Setting
the focus from the tab.SelectedIndexChanged event does
not do it. The combo seems to have focus (if I type, the
characters appear in the combo), but the cursor is not
visible until I click in the combo.
Any thoughts?
Thanks,
David Tag: Suggestion Tag: 56159
.NET DataGrid vs. 3rd party controls
I have not done much work with .NET yet but we are trying to decide
whether the grid that Microsoft provides is going to provide enough
functionality for us. As far as VB 6, we use the Videosoft FlexGrid
now and have found it to be very useful. Does anyone know what how
good/bad the .NET grid is? Are there different versions for web forms
versus windows forms?
Any help would be appreciated.
Thanks! Tag: Suggestion Tag: 56155
Problem with Web Service and Inherited Forms
Hallo, I have a big problem with Windows Forms and Web Services. When
I add a Web Service to my solution, the forms inherited from other
forms don't get opened in design mode and I get a reference error.
Am I the only one who has got this problem?
I have Visual Studio 2003 and framework 1.1
Please help me... Tag: Suggestion Tag: 56153
Book Suggestions Please!
I have had VS7 for about a year now and use C# mainly.
The apps that I write are for my own use on the desktop so ASP/Web
applications hold little interest for me. I tend to use the Win API a
lot still but I suspect that there are better ways.
I am looking for book(s) that give details of the various namespaces
and the functionality within them (I know it's in the help but I can't
read that in the bath) and especially any books that will ease the
transition from the API to inbuilt functionality (assuming it's
there). Books that show how to use the API for things like shell hooks
and how to show the system context menu would be very much of
interest.
I liked the earlier Petzold books because they gave a complete
breakdown of the API and also Appleman's book on VB6 and the API.
I have I got Petzold's Programming Windows, Jesse Liberty's
Programming C# and Mueller's .NET Framework Solutions. They look good
on the face of it but are very basic once you get into them and really
add nothing beyond the excellent help system in VS.Net.
Any suggestions would be appreciated, those I have searched for
usually end up being about writing Web apps rather than Windows Forms
apps.
Regards
--
Jeff Gaines Damerham Hampshire UK Tag: Suggestion Tag: 56148
How to detect closed form?
I have opened form from another form and I have an variable with reference
on it. But what if someone close referenced form? I tryed to test an
variable on Nothing value but there is still reference on closed form. The
questin is: How can I find out that the referenced form is closed.
I have two ideas:
1) Exception handling
2) Handle closed event of closed form
Is there some better way?
And another problem. When a referenced form is closed, I can still run
frm.Hide() without throwing exception, but frm.Show() fires exception.
Object is closed, so why frm.Hide() doesn't throw the exception too?
Thanks Martin Skrenek Tag: Suggestion Tag: 56144
Data Entry via DataGrid
Is it possible to do add records via a datagrid? For
example, an application opens a datagrid with its source
a datatable with 2 records. Can one add a third record
to the source datatable via the datagrid? If so, how
please? Thank you.
JT Tag: Suggestion Tag: 56137
ANN : Klik! SizeLib.Net v1.2 has been released...
This is a multi-part message in MIME format.
------=_NextPart_000_0081_01C37618.C29B82D0
Content-Type: text/plain;
charset="iso-8859-9"
Content-Transfer-Encoding: quoted-printable
=DDstanbul, Turkey - 05 September 2003
=20
Klik! Software today announced availability of SizeLib.Net v1.2 to make =
your .Net applications resolution independent.
=20
SizeLib.Net consists of 2 controls. The first one is a full blown =
Resizer control which keeps your controls size/font proportion related =
with it's container. The second one is SizePos control which completes =
the well known resolution independent paradigm claimed by most of the =
resizer products. This control tracks the screen resolution and adjusts =
your forms whenever the resolution changes and also has the ability to =
save your form/size and position to ensure that your forms will always =
open on the same size and position.
=20
".Net Windows Forms has brought us great layout management features like =
ability to dock and anchor controls." said =D6zden Irmak, President of =
Klik! Software. "But sometimes they don't let you to achieve the layout =
management you want. This brought us with the conclusion of SizeLib.Net. =
We aimed not to give only a Resizer control but also wanted to complete =
the well known resolution independent paradigm with the SizePos control =
and more...".
=20
Please come and visit us on http://www.kliksoft.com/ to have more =
info...
=20
About Klik! Sofware :=20
=20
Founded in 2002, Klik! Software is a privately held company with the aim =
of developing quality software components and tools for software =
development community.
=20
Our aim is to provide easily usable and most functional products on the =
market which also reflected to our slogan, "the rest is just a few =
kliks...".
------=_NextPart_000_0081_01C37618.C29B82D0
Content-Type: text/html;
charset="iso-8859-9"
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-9">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><FONT face=3DArial><FONT =
size=3D2><STRONG>=DDstanbul,=20
Turkey – 05 September 2003<?xml:namespace prefix =3D o ns =3D=20
"urn:schemas-microsoft-com:office:office"=20
/><o:p></o:p></STRONG></FONT></FONT></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><o:p><FONT face=3DArial=20
size=3D2> </FONT></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><FONT face=3DArial><FONT size=3D2>Klik! =
Software today=20
announced availability of SizeLib.Net v1.2 to make your .Net =
applications=20
resolution independent.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><o:p><FONT face=3DArial=20
size=3D2> </FONT></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><FONT face=3DArial><FONT =
size=3D2>SizeLib.Net consists=20
of 2 controls. The first one is a full blown Resizer control which keeps =
your=20
controls size/font proportion related with it’s container. The =
second one is=20
SizePos control which completes the well known resolution independent =
paradigm=20
claimed by most of the resizer products. This control tracks the screen=20
resolution and adjusts your forms whenever the resolution changes and =
also has=20
the ability to save your form/size and position to ensure that your =
forms will=20
always open on the same size and =
position.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><o:p><FONT face=3DArial=20
size=3D2> </FONT></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><FONT face=3DArial><FONT =
size=3D2>“.Net Windows Forms=20
has brought us great layout management features like ability to dock and =
anchor=20
controls.” said =D6zden Irmak, President of Klik! Software. =
”But sometimes they=20
don’t let you to achieve the layout management you want. This =
brought us with=20
the conclusion of SizeLib.Net. We aimed not to give only a Resizer =
control but=20
also wanted to complete the well known resolution independent paradigm =
with the=20
SizePos control and more...”.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><o:p><FONT face=3DArial=20
size=3D2> </FONT></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><FONT face=3DArial size=3D2>Please come =
and visit us on=20
</FONT><A href=3D"http://www.kliksoft.com/"><FONT face=3DArial=20
size=3D2>http://www.kliksoft.com/</FONT></A><FONT face=3DArial><FONT =
size=3D2> to have=20
more info...<o:p></o:p></FONT></FONT></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><o:p><FONT face=3DArial=20
size=3D2> </FONT></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><FONT face=3DArial><FONT =
size=3D2><STRONG>About Klik!=20
Sofware :</STRONG> <o:p></o:p></FONT></FONT></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><o:p><FONT face=3DArial=20
size=3D2> </FONT></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><FONT face=3DArial><FONT size=3D2>Founded =
in 2002,=20
Klik! Software is a privately held company with the aim of developing =
quality=20
software components and tools for software development=20
community.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><o:p><FONT face=3DArial=20
size=3D2> </FONT></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20
style=3D"FONT-FAMILY: Verdana"><FONT face=3DArial><FONT size=3D2>Our aim =
is to provide=20
easily usable and most functional products on the market which also =
reflected to=20
our slogan, “the rest is just a few=20
kliks...”.<o:p></o:p></FONT></FONT></SPAN></P></DIV></BODY></HTML>
------=_NextPart_000_0081_01C37618.C29B82D0-- Tag: Suggestion Tag: 56132
docking forms
Hello,
I have a form (mdiclient) containing 2 docked forms
frmprojecttree and frmProjectinfo
The following code creates the docked form frmProjectinfo
Public shared cProjectinfo as content
' Create the object that manages the docking state
DkManager = New DockingManager(Me,
Crownwood.Magic.Common.VisualStyle.IDE)
cProjectInfo = DkManager.Contents.Add(New
frmProjectInfo, "Project Info ", internalImages, IntCount
Mod 6)
IntCount += 1
' Setup initial state to match menu selections
DefineContentState(cProjectInfo)
' Setup the correct starting colors to match the
menu selections
DefineControlColors(cProjectInfo)
' Request a new Docking window be created for the
above Content on the right edge
DkManager.AddContentWithState(cProjectInfo,
State.DockTop)
The fields within this docked form are bound to a
collection, this works fine as the index of the
collection "projlist" changes.
below is the binding code
ProjList = Projectlist.GetProjectsArray()
'bind all the form fields to their respective
properties of Project
'MyProjectDet.MdiParent = Me.MdiParent
mdiClient.CProjectInfo.Control.Controls
(6).DataBindings.Add("text", ProjList, "ProjectCode")
mdiClient.CProjectInfo.Control.Controls
(4).DataBindings.Add("text",
ProjList, "ProjectSiteAddress")
mdiClient.CProjectInfo.Control.Controls
(3).DataBindings.Add("text", ProjList, "ProjectSiteName")
mdiClient.CProjectInfo.Control.Controls
(8).DataBindings.Add("text",
ProjList, "ProjectSiteTownCity")
The only problem is that when you click to dock the
projectinfo form by clicking on the bell the binding is
lost. Any idea how to stop the binding from been lost on
docking (clicking the pin icon) of the projectinfo form.
Regards
Robert Tag: Suggestion Tag: 56130
DataGrid
Hello,
i'm using DataGrid in my WinForm application, now i'd like to know how to
get notified when the data is changed by the bindingmanager, because i've a
master detail form and i'd like to know when the data in my detail
(datagrid) is changed when master data change.
than you Tag: Suggestion Tag: 56126
.net localization problem
can i specify the localization (which language to display) each time when i
run a window application instead of localize by the windows system
automatically? Tag: Suggestion Tag: 56115
String Builder - not appended
Hi
I am using a variable of StringBuilder to form a string.
After appending a string of value like this
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0
Verdana;}}
\viewkind4\uc1\pard\f0\fs17 saesae \b esrdsr esrdsr\i refetwe\b0\i0\par
}
This value is appended to that string builder.
Whatever appended after this value, not getting appended to the
StringBuilder.
How to solve this problem?
Thanks and Regards
Karuppasamy Natarajan Tag: Suggestion Tag: 56114
Toolbar buttons dont' show
I just wrote a quick Windows app with some toolbar buttons. In design view,
the buttons show up fine, but when I run the app, the toolbar button images
don't show up. Is there some simple setting that I am missing? I've tried
using both .GIF and .BMP format, and both show up fine in the designer
(although the GIF is the only one that has transparency working normally). Tag: Suggestion Tag: 56107
Printing Problems
I am printing several pages.
Problem 1:
While the printout looks fine on one printer (OKI C9400 PCL) it comes out as
gibberish on another one (HP LaserJet 5/5M PostScript)
Other Windows applications (such as Word, Excel) print OK to both.
Problem 2:
If I preview the pages (using any of these printers), the printout looks OK
on screen.
When printing from the Preview dialog only partial data is printed (same on
both printers except for the gibberish).
Any ideas? Tag: Suggestion Tag: 56104
UserControl Load Event
Does anyone know of an event that is fired after a
UserControl is created regardless of whether it is visible
or not. I have a data bound UserControl that needs to
populate it's contents when it is loaded at runtime, but
not at design time. If i try to load the data in the
constructor, the DesignMode property is not set so I can't
skip the data loading in the designer. If I handle the
Load event, it doesn't fire when the control is first
created, only after the parent form is hidden, then re-
displayed.
Anyone? Anyone? Tag: Suggestion Tag: 56101
Application slow down
Hi there.
I have written a kiosk application in C# where the user can browse the
internet amongst other things.
When there has been no user activity for a while (e.g. half an hour) the
application seems to slow down and responds slowly to the next user.
I was wondering if anybody has an idea as to what could be the reason for
this.
Thanks,
Anders Schultz Tag: Suggestion Tag: 56100