|
Thank u for ur replay.
One more quetion is how to fill different fields (edit box or combo box) in a web forms and how to trigger the click event of a button Programatically?
Regards
Jefy
|
|
|
|
|
Master Bushnell wrote:
I need a program
I'm sure you do. You're mistaking this site for rentacoder, I believe. Here, you need to write your own code, and ask questions when you get stuck.
Master Bushnell wrote:
C# please, if you make it easy to use, then C++ will be accepted
Wow - that's pretty damn big of you, to accept C++ if it's good enough. Seriously, what's wrong with this picture ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Sure! Just send a cashiers check for $1,000 to me and I'll get started when it clears. I only deal in cash-up-front.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Everybody,
I got a problem. I have a treeview with an iamgelist attachted to it. it works fine but when i try to drag and drop (so when i turn the property from the treeview.allowdrop to true) it gives an error message:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll
Additional information: DragDrop registration failed.
somebody knows whats happening here???
Rob
|
|
|
|
|
And you're sure, that has something to do with the image list?
Claudio
Claudio's Website
|
|
|
|
|
no i'm not. Don't know what the problem is but i have found out that the problem occurs when i set the panel on witch the treeview is located to visible...
|
|
|
|
|
I want to tile a 1 pixel wide buy 20 or so pixels heigh image horizontally.
I tried just taking drawimage and setting the image width to the desired length but it produces a sortof gradient affect where the stretch fades off into nothingness...instead of filling the region properly.
Besides using a for loop and incrementally calling drawimage, is their any other way?
|
|
|
|
|
Yes, if you're using GDI+, you can create a bitmapbrush, and set it's tiling option to what you want, then fill your area with a rectangle using that brush.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Can you show me how to declare a bitmapbrush.
I tried searching google, msdn, and the vs.net object browser and found no reference to them.
|
|
|
|
|
Sorry, it's called TextureBrush
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hey
I am not getting this event to fire?
<br />
PortConnection PCon = new PortConnection(delegatePassError);<br />
serialPort = PCon.connectPort(inSettings);
<br />
serialPort.ReadTimeout = 10000;<br />
serialPort.ReceivedEvent += new SerialReceivedEventHandler(incoming);
<br />
<br />
serialPort.ReadTo("test");
<br />
private void incoming(object sender, SerialReceivedEventArgs e)<br />
{<br />
}<br />
I know that the serial port is working, and i know that there is data that are being sent from a CellPhone on the port.
But i cant get the event to fire? have i connected it wrong?
|
|
|
|
|
I have no notice that the event is only fired when i am using
<br />
string data = SP.ReadExisting();<br />
or likevice?
This does not help me! i dont whant a Thead that goes in a loop and looka if there is somthing in the serialport stream, i whant an event to be fired instead. Is there no way to do that?
|
|
|
|
|
Is there realy no one that nows of this problem? Or am i explaining it bad?
|
|
|
|
|
You might try and contact the guy who wrote the "I/O-Ports uncensored"-articles.
Maybe the solution is in one of the articles as well.
Cheers
Sid
|
|
|
|
|
Hey!
I have now tryed some more and i get the event to work on another computer, but on my station computer i the event will not be fired.
Its looks like i will have to make a test when the program starts to see if the event is working, if not i will have to use a thread loop instead
What do you think of this?
BestRegards
Snowjim
|
|
|
|
|
Hey guys, I have 2 drop down box's, both are populated by 2 diff datareaders viewing the same table but using different fields as the datavaluefield. How can I make the selection of one filter the other on changeselectedvalue? I have tried this in a couple different versions, one a JScript tip I got here a couple years back but neither seems to go.
In C# I have
loadStateDetail() - <br />
stquery "Select State, ST_Abbrev, Mer_CD"<br />
ST_Abbrev is DataValue Field<br />
<br />
in loadMerDetail()<br />
currentstate = ivState.Value()<br />
merquery "Select Mer_CD where ST_Abbrev = '" + currentstate + "'"
Any suggestions on how to make my onSelectedValueChanged to make this kick off right?
Thanks!
David @ Premier
You are only as good as your last project.
|
|
|
|
|
Hi,
im currently working on making myself a MySql Object Abstraction Layer
so that i pass in objects and it does the database trasnsactions using
reflection
so far everything works except the select
since im trying to rebuild the objects in my method based on an object
i pass in
i am no able to instantiate the object and to give it its constructor
args or to set its properties
i have pasted my code here :
http://www.vkarlsen.no/pastebin/ViewPaste.aspx?id=5452
the code will be online for only 48 hours as of now
i have commented on the errors and to show my logic
this method should work with any object i pass it so no object
structure is known
in advance.
the method should adapt to the constructor and all properties stored in
the database should be pu back into the object...
i m stuck
can someone please have a look.
Thanks
Alexandre
|
|
|
|
|
Hey folks!
I need help getting something done. I need a function to do this but can not seem to figure out the structure to make it happen.
This is a plain text explanation of what I am doing, how should it be in C#??
public static void tiers()<br />
{<br />
string tier_temp = "124.5";
if tier_temp has "."<br />
string tier_fr = extract number to left of ".";<br />
string tier = extract numbers to right of ".";<br />
else<br />
string tier_fr = "0";<br />
string tier = tier_temp;<br />
}
I have seen this done using Mid and Left in VB6 but can not see how it should be done in C#
HELP!!!
Thanks Everyone!
David
You are only as good as your last project.
|
|
|
|
|
hi,
use
<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemstringclasssplittopic.asp">String.Split()</a>[<a target=_blank title='New Window' href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemstringclasssplittopic.asp">^</a>] . This looks like you want to use "124.5" as number... If yes, look at Parse()[^] method of standard number types.
hope it helps.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
that part I think I understand, but how do I step the parsed info to the if so that it can populate my other var's?
I am very new to C# and trying to learn durring project development so please be patient with me!
Thanks;
David
You are only as good as your last project.
|
|
|
|
|
I see. If you really want both parts of a input as strings, String.Split returns array of strings (delimitered by chars in argument you passed to this method). So
public static void tiers()
{
string tier_temp = "124.5";
if(tier_temp.indexOf('.')>=0)
{
string [] parts = tier_temp.Split(new char[]{'.'});
string tier_fr = parts[0];
string tier = parts[1];
}
else
{
string tier_fr = "0";
string tier = tier_temp;
}
}
is almost direct translation of your example. I don't say this code is optimal or secure! Just an example...
DEWright_CA wrote:
I am very new to C# and trying to learn durring project development so please be patient with me!
That's ok.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
That is incredible, now I just need to see if I can make the next part of it work.
Will be able to test the entire thing after I get the validation piece added!
Thanks for the help, seeing your I now realize my main problem is the brackets; for some reason I have not gotten use to all of those!
Thanks again!
David
You are only as good as your last project.
|
|
|
|
|
Hello Friends,
I need to add some event funtions about Window Forms, for example I want to add sentence to the "Form_Closing" Event and customize it, but I know I don't write the function declaration.
How can I add these functions from the C# GUI or how can I know which are all these funtions from the C# GUI?.
Tnx for help me.
|
|
|
|
|
|
Noel,
On a WinForm, delegates are used to wire component/control events to the method that handles them. For a bit of background have a look at this article by Maysam here at The Code Project: Link. When you are working on a GUI (which is a WinForm) in Visual Studio, click on the control that you are interested in modifying and then look at the Properties window on the right side of the screen. If you click on the small yellow lightning bolt, you have an event editor built into the IDE. This provides a list of the events that you asked about in your last question. Double click on any event that you are interested in editing and it will (1) automatically code the delegate for you and (2) take you to the code view for your form so that you can add the code for the method that is fired when the event occurs. Anytime you return back to the design view, you can easily find the code for the method again by double clicking the event in the Event editor window. More specifically for your question about the "Form Closing" event, click on the topmost area of the form in the design view, click the yellow lightning in the Properties window, and scroll down to the "Closing" event. Double click on it and you're ready to code!
You can also find more information about all of the events for controls and components at Microsoft's site: http://msdn.microsoft.com. Search for whatever class you are interested in and it will have a members page that includes a description of all events. Here's an example for the combobox: Link.
Hope that this helps. Best of luck with your WinForms.
-CS
|
|
|
|