|
Only the reference are stored. Not just Hashtable, but any collection stores only references to the objects and not the objects themselves. For value types, the value is boxed and a reference to the boxed instance is stored.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello! I've got a problem.
I've created a class who herits from Hashtable. I've also created a UIEditor to edit the values at design time. But when i do that, there is nothing writed in the InitializeComponent method. My class is however marked as Serializable...
Thanks for your help
|
|
|
|
|
I have a panel with AutoScroll property set to true. the panel contains a picturebox, whose height and width r decided at runtime. Panel's height and width r fixed. When i drag mouse over the picturebox i need the panel to scroll up down right left if the size of the picturebox is greater then the panel. How do i do it?
Thanks in advance
Nitin
|
|
|
|
|
Not bug free, but it gives you an idea
Private _mouseDown As Boolean<br />
Private _lastY As Integer<br />
<br />
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown<br />
_mouseDown = True<br />
_lastY = e.Y<br />
End Sub<br />
<br />
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove<br />
If _mouseDown Then<br />
Dim y As Integer<br />
If e.Y > _lastY Then<br />
y = e.Y - _lastY<br />
Panel1.AutoScrollPosition = New Point(Panel1.AutoScrollPosition.X, y)<br />
ElseIf e.Y < _lastY Then<br />
y = _lastY - e.Y<br />
Panel1.AutoScrollPosition = New Point(Panel1.AutoScrollPosition.X, y)<br />
End If<br />
End If<br />
End Sub<br />
<br />
Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp<br />
_mouseDown = False<br />
End Sub
|
|
|
|
|
Hi,
I need help!
I need to move print job from printer A to Printer B..
my problem is:
I have print's line job and I need to move this to other printers...
How to do it in C#?
please, somebody to know and it will be able to help me...
thank you
|
|
|
|
|
I certainly hope that all of your printers are the same, or at least can use the same printer driver.
You can't move a job from one printer to another. But, you can setup printer pooling so more than one printer can pull jobs from the same queue.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Anyone is using XtraReports from DevExpress.com[^]?
Seems like a great piece of software and the price is right. Comments, opinions?
Thanks!
|
|
|
|
|
I want to make may order with each column has a color by datagrid. But I don't know how to do this. Please help me. Thanks.
|
|
|
|
|
Two things i would like to ask.
1. I would like to do something if the user cliks the x at the topright corner (thus closing the form). How can i get in contact with this click event?
2. What is the general closing event of a form?
I am pretty new, so please give clean anserws that even i can understand
R
Johan
|
|
|
|
|
Add an event handler for the closing event to the form. The easiest way is this (using Visual Studio): go to the View Designer of your form, activate the tab properties and click the Events-button. Look for the "Closing" event in the list and double-click on it. An event handler will be created for you.
When the X in the title bar is clicked, this event handler will be called. It allows you to do some clean-up or even to prevent the form from closing (in contrast to the "Close" event).
|
|
|
|
|
Look at the Form.Closing event. Technically, your event handler for the closing event should only deal with closing stuff and should be "agnostic" as to why or how the form was closed.
|
|
|
|
|
|
Hello everyone,
I was wondering how can I incorporate a classic winhelp file I made into my c# aplication
thx
|
|
|
|
|
|
Process p = Process.Start("D:\\NOVO\\novo\\c#\\DVD Tracker ver1.0\\dvd\\help file\\help.hlp");
this is solution
|
|
|
|
|
Hello,
I would like to fill my datagrid's second column based on to the value of first column.
At the first column I am selecting "OPERATION CODE".And based on the operation code the second comboboxcolumn must be filled with "STOCK CODES"
How can I do this? How can I apply the 5 data-table relationship into one datagrid?
Please help
King Regards
|
|
|
|
|
There are two simultanous.second thread executes a funtion, before first thread excutes a wait statement.
|
|
|
|
|
And, what's the problem??
|
|
|
|
|
None. Is there a rule that forces a forum post to state a problem?
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
Heh, evidently not.
Just from the vague details I would suggest reorganizing the code so that the original poster's code does not run into a state where it is asking to "wait" in a thread unsafe place. Other than that, we need more details because none of us are mind readers.
|
|
|
|
|
I try to design an database application with 3 tier,design. So is it possible to pass all the Binding Context from User Interface Layer (UI Layer) to (DATA Layer) and then update the Binding Data in Logic Layer ?
Where DATA LAYER is a data class which is collection of the Field Name and Value only.
Sorry for my poor english..
|
|
|
|
|
What is a 3 tier,design ?
|
|
|
|
|
|
Thanks for da link man ,sorry i cant answer your question !
Did you check out my question about the "ticket system"
|
|
|
|
|
kakarato wrote:
Where DATA LAYER is a data class which is collection of the Field Name and Value only.
Yes. However, in your data class you'll need to implement properties for your fields. You class needs to implement [propertyName]Changed events for all your properties, and the property setters need to check if the value has changed and, if the xxxChanged event is not null, fire the event. Also, you need to initialize your fields usually.
If you don't do the event stuff, you won't get 2 way data binding.
Like this:
public class MyData
{
protected string myText;
public event EventHandler MyTextChanged;
public string MyText
{
get {return myText;}
set
{
myText=value;
if (MyTextChanged != null)
{
MyTextChanged(this, EventArgs.Empty);
}
}
}
public MyData()
{
myText="Initial Value";
}
}
I was going to write an article on "Intro to data binding" at some point!
Marc
My website
Latest Articles:
Undo/Redo Buffer
Memento Design Pattern
|
|
|
|