|
Cant Do that because richtextbox has only one method to scroll text and its scrolltocaret(). Have tried using it but id gives a little different effect. It doesnot scroll text until the caret(blinking cursor) reaches at the bottome) plus there are a few more problems in it.
sorry for disturbing you again and again
Thanks alot for taking interest in my problem
|
|
|
|
|
Hi friends..
hope you know about text qualifiers....
It's used to represent columns in textfiles....like..
"ItemNo","ItemName"
0,"Knorr"
firstline represents the fieldnames and the nextline their datas...
Comma represents the column delimiter and double quotes represents the textqualifier....
In my application,am creating a textfile.for that,i have to represent the textqualifiers and delimiters...How to do it programmatically....
That is,if i want to define my custom delimiters and TextQualifiers,how can i do them in coding?
Is there any option to do them via registry?Kindly help me...
I need it urgently...
Thank you....
|
|
|
|
|
at the time of form load the no of rows in confirmed so based on that we have to create table in c#
Shipra Pandey
Software Developer
Solversa Technology Pvt Ltd.
|
|
|
|
|
Is it for a Desktop Application?
Can u tell me which table u want to create?
Regards,
Pramod
|
|
|
|
|
tell me the real application and what actually u want!
it is easy to do at run time
using DataTable
but you have to do a lot of work for this
not a good way to Add a table
u can do one thing
create a stored procedure for your temperoray table
and create it whenever needed!
and using another sql query you can populate dataset!
and make it available
when ever u need a table just call the stored procedure and create a temporary table!
and use it
if this will not solve yur problem let me know what actually u want
cheers
nitinbourai
|
|
|
|
|
hello there is another method to do this
create a dataset and at runtime u can make a datatable like this
DataTable dt = new DataTable["Supplier"];
and add colums to it using the column propreties
and add into the data set
ds.Tables.add(Supplier);
find the appropriate function for adding table to a dataset
use intellisense!
i am confuse about the actual syntax
nitinbourai
|
|
|
|
|
I'm trying to inherit a class from Collections.Generic.List<T> , and override the Indexer, specifically the this[index].set method
I am trying the followingthe follwoing:
public class NodeList<T> : List<Node<T>>
{
public Node<T> this[int index]
{
get { return base[index]; }
set
{
base[index] = value;
}
}
}
And I don't seem to get the "bolded" part right
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
You cannot get the behavior you are looking for that way. List<t>.this is not marked as virtual so you will need to change your definition to include the "new" keyword.
I strongly recomend that you do not do this. Shadowing a method in this way will make you're code very difficult to read. For instance.
<br />
public class Dog<br />
{<br />
public void Bark() { Console.WriteLine("Dog"); }<br />
}<br />
<br />
public class Lab : Dog<br />
{<br />
public new void Bark() { Console.WriteLine("Lab"); }<br />
}<br />
<br />
public class Program<br />
{<br />
public static void Main()<br />
{<br />
Lab l = new Lab();<br />
Dog d = l;<br />
<br />
l.Bark();<br />
d.Bark();<br />
}<br />
This will unexpectedly (unless you know that Lab is shadowing Bark) will print
Lab
Dog
I would go with overridng one of the collection bases instead.
Jared Parsons
jaredp@beanseed.org
http://jaredparsons.blogspot.com/[^]
|
|
|
|
|
I guess I am missing a fundamental C#/C++ difference here - I thought it is virtual since it's part of the IList<t> interface.
With Colleciton base, you mean the non-Generic collections?
I initially worked with a List<node<t>> member, forwarding almost all methods. However, I would also have to mirror the non-generic / generic relationship (i.e. I need generic access to this, otherwise *everything* including client classes turn into generics (without any benefit).
(I'd have to figure out how to do this anyway).
Is there a way to do that (easier)?
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
|
Just wanted to say thanks - that was the bit of information I desperately needed
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
|
I am working on a simple project that requires the end user to upload files to a web server and specify some keyword and other document information. I have been researching what is the most effective way to accomplish this that is 1. Simple, and 2. reasonably secure. Here are my thoughts to date:
Option 1 - Web Application:
This option would allow the user to select a file on the local machine and upload it to the server. This would (I believe) require a client side ActiveX component as well as it would require a user database to restrict the uploading of undesireable content to the site. Neither of which my client really want to do.
Option 2 - Clientside Application:
Store encrypted FTP credentials on the client and use FTP (or alternative? help here!) to send the files from the client to the server. This is simple and requires no user database. However the call to the FTP server is in clear text which theoretically could be packet sniffed. Apparently FTP transmissions can now be encrypted with SSL (and supported under .NetFramework 2.0) but I am not sure how this is configured and whether this is setup under IIS. There does not seem to be any option to EnableSSL under IIS (for FTP) for Windows XP (is this a Windows 2003 option only?)
Is there another protocol (say http) that can be secured under SSL to upload files? Suggestions (samples) on how I would how would connect to an IIS server? I would prefer to not have any server side components or web services and connect to the server directly from the client.
Any suggestions on approaches to address this problem would be appreciated.
Cheers,
David
-- modified at 17:14 Sunday 1st January, 2006
|
|
|
|
|
Hello,
i have a (probably) very basic design question.
I need to create a Person Object which holds information like Name, Email, Age, and Gender.
The problem is the Gender information.
There can only be "Man" and "Woman".
Soo i could either create a Man and Woman object which inherits from the Person object, or i could maybe store the information as an int, boolean or maybe even better as an Enumeration ?
But i cant decide which is the "correct" way to do it.
The Man and Woman object will be completly identical except for their type (how they are declared - new Man() and new Woman() ..).
Or should I in this case go with the other option and store the information as an int/boolean/Enum in the Person object ?
And is that how it is done when you have a value than can only be a certain different set of values ?
Or something completly else ?
There is no really difference as far as i can see, as i will either have to do checks like -
if (myObj.Gender == "Man"), or
if (myObj is "Man")
of course i could do some overloading of the methods soo i dont even have the if else - like HandleThis(Man obj) and HandleThis(Woman obj).
Maybe for the scalability, escpecially if it had been other information i had to store which could change by time it would probably be best to go with the inhertiance example.
or maybe i should always go with that solution ?
To some of you this might be a stupid question, but i cant really decide.
Soo i hope someone can help me to tell me what is the "correct" way to do it and why.
Martin
Happy New Year everyone !
|
|
|
|
|
just use and enumeration, inheritance from a person object would be too much normalization...its very unlikely humanity will converge into anything other than a man or woman, so a simple enumeration would be perfect. You might consider not having a default constructor and instead have a consturcture that requires a gender initialization.
normailization is good, but there is always to much of a good thing...
|
|
|
|
|
I'd think you need to look to whether the Gender object will have any responsibility. If you are handling any methods such as:
if (myObj.Gender == "Man"), or
if (myObj is "Man")
you might want want to utilize the state or strategy patterns (GoF) instead. http://ootips.org/[^] or http://www.dofactory.com/Patterns/Patterns.aspx[^]
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
hello everyone and happy new year
i`ve got a task to write a client-server game (web application)
i`ve succeded if writing clent-server part and data tranfer (as an xml web service)
so, now i need actually game. and here is the problem!
how could i make a game field? i mean some kind of a board for example for chess, so that i could get event by clicking specific cell? suppose there is some easy way to do it, not making hundred of image buttons
what could you reccomend?
P.S. remember, THIS IS A WEB APPLICATION
|
|
|
|
|
Hi,
I have asked this question about a day ago and I was given a very good answer about some concepts I was not aware of-- Region.Translate, and Matrix.Transform. So I've been
experimenting with them and I'm able to now draw Rects and Translate and Rotate them
but I still haven't solved what I ultimately want to do...
/////////////////////
PointF pt_1 = new PointF(0,0)
PointF pt_1 = new PointF(100,100)
public void DrawLine(Graphics g)
{
SolidBrush brush = new SolidBrush(Color.SteelBlue);
Pen pen = new Pen(brush, 10);
g.DrawLine(pen, pt_1.X, pt_1.Y, pt_2.X, pt_2.Y);
}
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
DrawLine(e.Graphics);
}
////////////////////////////////////////////
How do I change to my own coordinate system and have it permanently stay that way?
That is, I want (0,0) to always be the center of the Form, no matter what event fires.
What I have (not the test code above) is a program that can draw vectors on an XY axis.
I can do it-- only because I've hard-coded the coordinates for the Graph Origin, which
besides being a lousy way to do things, also prevents me from any more progress....
Any (further) help would be greatly appreciated.. thanks
|
|
|
|
|
Since reading your post two days ago, I've tried implementing this in as many ways as I could think. Unfortunately, I just can't get it to stick. I think that you will have to translate the coordinates for every message/event that you receive.
Admittedly, you don't have too much work ahead of you. For messages/events that require painting, you only need to do the Graphics.TranslateTransform( Width / 2, Height / 2 ) call. For messages/events that have client coordinates associated with them, you'll need to subtract Width / 2 from the x and Height / 2 from the y . Finally, with messages/events that have screen coordintates, you need to call PointToClient(Point) and then subtract like the last call.
I would write three static methods in a helper class with signatures like:
Point CenteredPointFromClient( Point point, Form form );
int CenteredPointFromScreen( Point point, Form form );
void CenteredGraphics( Graphics g, Form form );
I wish a better solution existed. I don't think that it does because it would mess up the way that the .NET runtime draws child controls. Sorry.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
plz email me jema_r84@yahoo.com
im try to study it now..huhuhu
|
|
|
|
|
Have you thought about buying a book or searching the internet for tutorials.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
Please see below on what I am trying to do...
Want to get the property value little differently...
Thanks in advance,
Shrini
<br />
class myItem<br />
{<br />
public myItem(){}<br />
public myItem(int EntryID)<br />
{<br />
_EntryID = EntryID;<br />
}<br />
int _EntryID;<br />
public int EntryID<br />
{<br />
get { return _EntryID; }<br />
set { _EntryID = value; }<br />
}<br />
}<br />
}<br />
class myItemList<br />
{<br />
public List<myItem> GetItems()<br />
{<br />
List<myItem> itemCollection = new List<myItem>();<br />
for(int i = 0; i < 5, i++<br />
{<br />
item.Add(i);<br />
}<br />
return itemCollection<br />
}<br />
}<br />
class myClass<br />
{<br />
public void ABCD()<br />
{<br />
myItemList myItems = new myItemList();<br />
List<myItem> Items = myItems.GetItems()<br />
<br />
<br />
<bold>WHAT I WANT TO DO IS HERE...</bold><br />
<br />
I know I can access the Items property like this...<br />
<br />
Items[0].EntryID<br />
<br />
But I want to be able to pass in the name 'EntryID' Dynamically...<br />
<br />
string fld = "EntryID"<br />
<br />
Items[0][fld]<br />
<br />
Is this possible?<br />
<br />
<br />
<br />
}<br />
}<br />
<br />
|
|
|
|
|
Yes, either by using reflection (a bit messy IMO), or implementing an index property in the myItem class:
int this[string key] {
get {
switch(key) {
case "EntryId": return this._EntryID;
default: throw new ArgumentException("No property with the name '" + key + "'.", "key");
}
}
}
---
b { font-weight: normal; }
|
|
|
|
|
Took me little bit of thinking... Ofcourse it is System.Reflection...
What I am doing is some what similar to DTS where you match field names from one database to another for transfering data...
Here I have to match Property names to fields and these names are coming from outside...
<br />
Type type = myItems[0].GetType();<br />
PropertyInfo info = type.GetProperty(PROPERTYNAME);<br />
System.Windows.Forms.MessageBox.Show(info.GetValue(myItems[i], null).ToString());<br />
|
|
|
|
|
Hello everyone!
Iam coding a little tool in C# which could be used as image downloader from websites.
Via httpget I retrieve the pagecontent of the entire website and put all that into a textbox objekt (like a console)
now I want to extract any "http:\\xxxxxxxxxxxxxxxxx.jpg" links and put them into a new string. But I have no idea.
can you help me?
|
|
|
|