|
hi
try to use ArrayList or HashTable to implement the linked list
Tamimi - Code
|
|
|
|
|
Hi Tamimi.
Thank you. I try to use Hashtable but I don't know do Hashtable do in this instance.?
If you can do simply example , you can send code to me.
Thank you.
|
|
|
|
|
hi
i think according to your first post, its Easier to use array list
to do the navigation, but still you can implement the link list with
hashtable and arraylist.
feel free to post again
Tamimi - Code
|
|
|
|
|
Hi Tamimi.
Thank you.
I was completed my example.
|
|
|
|
|
how can copy UniCode to Clipboard and then paste it as text ??
as u can see the unicode in this site
http://www.alanwood.net/unicode/basic_latin.html
i want t copy the uniCode of a for example to A=0065 and then pase it as ==> A
Palestine
|
|
|
|
|
Hello
The clipboard is just another space in the memory to exchange data between applications -or sometimes in the same application-. It doesn't matter what format that data is of.
You see, you have to make some sort of a Parse() method to get, validate, and parse the data.
It all depends on in what format you expect your data to be.
eg.
if in the clipboard the data is stored like this:
HHHH HHHH HHHH
you should follow these steps:
1- Read four bytes
2- Validate them
3- Add them to a StringBuilder -just an example-
4- Repeat the cycle Until you reach the end of data
Try checking ClipBoard class in your MSDN
|
|
|
|
|
I'm reading data from the the accelerometer on my thinkpad w/ C#. Here's my problem: It's super super sensitive - it can update (1 value) even if the laptop is sitting still on a table.
Right now I made a library to poll the accelerometer driver on my laptop every 1 ms (with a Timer). On every Timer.Tick, I publish an Event. So, the calling class can subscribe to the OnComputerSlap event (which passes and x and y cord) and do whatever it wishes. However, the event handler is getting called ever 1 ms and I want to set up some type of system where it will only push the event when - for example - the x value increases by 10 since the last reading. Some type of heuristics system. Any ideas on how to do this?
/\ |_ E X E GG
|
|
|
|
|
Can any one help me out how two application can communicate with each other one is web Application and other is Desktop Application.
Rizwan Afsar
Associate Member, Technical Team
IAP Company Ltd, Gurgaon
INDIA
www.iap-online.com
"A winner is not the one who never fails,
But one who NEVER QUITS"
|
|
|
|
|
Well here's a case of "Read the Flipping Manual", if ever I saw one!
I spent ages trying to compare a control to a TextBox, mostly without success - I went through all manner of .Equals() , .GetType , == anotherTextBox.GetType(), and all I needed to do was use was if (control is TextBox)!
Gahhh!
Still, I'm interested to know what the compiler is doing, and why if (control == TextBox) generates an error - can anyone illuminate me?
Thanks,
Martin.
|
|
|
|
|
Utini wrote: why if (control == TextBox) generates an error
What error is it generating?
Mike Poz
|
|
|
|
|
|
Utini wrote: why if (control == TextBox) generates an error - can anyone illuminate me?
Because it's suppose to be: control.GetType()==typeof(TextBox)
|
|
|
|
|
Utini wrote: Well here's a case of "Read the Flipping Manual", if ever I saw one!
Exactly, RTFM. Your code if( control == TextBox) does not and should not compile for several reasons.
1) TextBox is meaningless by itself. typeof(TextBox) means something.
2) Assuming you use the code provieded (1), it is meaningless to check for equality between a Control and a Type. What on Earth would that mean?
Josh
|
|
|
|
|
The is operator checks if the object is (or inherits from) a specific class.
(control is TextBox) does the same as Type.GetType("System.Web.UI.WebControls.TextBox").IsInstanceOfType(control) .
---
b { font-weight: normal; }
|
|
|
|
|
Nader Elshehabi wrote: if(anotherTextBox.GetType().AssemblyQualifiedName == "System.Windows.Forms.TextBox")
Thats an awful way to check whether a control is a textbox, as is the title of this thread the correct way is using the is operator, or again as above the typeof() method
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Ouch!!
Sometimes I screw things up -BADLY-, "Lack of coffee" syndrom I suppose.
Thanks for the tip though.
|
|
|
|
|
control is an instance, TextBox is a type. Apples and oranges (or more correctly, cookies and cookie cutters).
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
Hi, I'm creating a control that contains some panels. I want to when the windows form designer manipulates the control, I would place items in these subpanels, like a SplitContainer do with their panels. And, I can do these with button, too? Can click a subbutton of a control and do something, like do the TabControl when clic to select the current TabPage.
Thanks
|
|
|
|
|
I'm trying to create a form that lets me select the item from a list, then click "edit" and a new form opens with the selected record from the previous list and displays that records attributes. I can't figure out how to do this without editing the SQL query to accept a parameter. That wont work for my purpose because I need the user to be able to add/delete from that table, and sql search will only return the 1 item.
Logic Flow:
-User picks item from SQL driven listbox.
-Clicks "Edit", value passed for selected listbox item.
-new form loads (should be on current record, not record 1 which requires the user to navigate back and forth to find the right item.)
I've passed the information needed to the new form, and I know that is making it correctly. I am just not finding any kind of "jump to record" type command for the binding navigator, or the binding source.
Thanks.
|
|
|
|
|
Hello,
How do you get the actual point where the mouse clicked on a form during an onclick event. Here is what I have so far, but it doesn't work...
<br />
private void split_Panel2_Click(object sender, EventArgs e)<br />
{<br />
Point clickPnt = new Point();<br />
clickPnt = (Point)sender;<br />
}<br />
Thanks for your help!
RC
|
|
|
|
|
Handle the MouseDown event and cache a Point variable which you can use in the Click handler. Something like this.lastMouseDownLocation = new Point(e.X, e.Y);
|
|
|
|
|
it worked!
Thanks for your help!
|
|
|
|
|
Josh Smith wrote: Handle the MouseDown event and cache a Point variable which you can use in the Click handler.
In the Click event handler you can also use the static property Control.MousePosition . Much easier .
Alternatively, controls also have a MouseClick event which gives you the position of the mouse during the click in de event handler argument.
|
|
|
|
|
I was under the impression that he wanted to know where the mouse cursor was when the click process began (i.e. when the button was depressed). Checking Control.MousePosition is good if he wants to know the cursor position after the mouse button is released (MouseDown + MouseUp = Click). I suppose he didn't state either one specifically.
Cheers,
Josh
|
|
|
|
|
I am using the Microsoft SQLHelper.cs class for my data connections. The user enters a part number, clicks a command button and the grid should load with that data. When I pass the parameter I cannot get the grid to populate. I have been working on this since Friday.
Here is my DataBind:
private void BindData()<br />
{<br />
strPartNumberInputReference = txtSearchPart.Text;<br />
ds = new DataSet();<br />
SqlParameter param = new SqlParameter("@PartID", strPartNumberInputReference); <br />
ds=SqlHelper.ExecuteDataset(this.connectionString, CommandTYpe.StoredProcedure,"dbo.GetPartInfoTest", param);<br />
Session["ds"]=ds;<br />
dt = ds.Tables[0];<br />
Session["dt"]=dt;<br />
dgParts.DataSource=dt;<br />
dgParts.DataBind();<br />
txtSearchPart.Text = "";<br />
<br />
}
I played around with the bolded line, and if I don't pass a parameter, all the stuff populates as expected.
In my stored procedure I have the following:
CREATE PROCEDURE [dbo].[GetPartInfoTest]<br />
<br />
@PartID varchar<br />
AS<br />
SELECT c.cost, ct.Description AS ctDescription, pt.description, pt.ID as PartTypeID, dd.DrawingNumber, dd.DrawingRevision, dd.DwgPath<br />
FROM costs c INNER JOIN Parts p ON c.PartID = p.Id <br />
INNER JOIN PartTypes pt on pt.ID = p.PartTypeID <br />
LEFT JOIN DraftingData dd on dd.PartID = p.ID LEFT JOIN CostTypes ct on ct.Id = c.CostTypeId<br />
<br />
where p.PartNumber = @PartID<br />
<br />
GO
Again, played around with this and changed @PartID to an actual part number and it populated fine.
I tried the debugger and it compliles fine. It says it takes the parameter and runs through the AttachParameters method (for those of you familiar with SQLHelper). But somehow it must be getting lost and the grid does not populate.
Page Load code:
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
<br />
if(Page.IsPostBack)<br />
{<br />
BindData(); <br />
<br />
<br />
}<br />
<br />
} Command button click code:
private void btnSearchPart_Click(object sender, System.EventArgs e)<br />
{<br />
BindData();<br />
}
Can someone please walk me through this to get this stupid thing to populate? At one point I got it to populate with three blank lines. Now I'm not getting anything.
|
|
|
|