|
Is there a way to share a resource file between two C# projects under one solution in VS2005. For instance,
Project1
-Class1.cs
-Class2.cs
-Resource.resx
Project2 - references Project1
-ClassA
Can sombody give me some example or a resouce
Thanks
|
|
|
|
|
guys u really doing agreat work..okie i just wanna to make color eraser ..like that one in Paint by c#..i didnt find it in deitel (it sucks).i can understand the code but i cant creat it .
fellas dont late for me..iam stuck..
Best Regards;);)
|
|
|
|
|
mr jets wrote: fellas dont late for me..iam stuck..
|
|
|
|
|
Wow.
------------
Cheers,
Patrick
|
|
|
|
|
i dont know..is that akind of joke..iam anew to the c# world but iam sure Wowww its not the answer that iam looking for ..its so simple plzz ..!
how can i do acolor eraser like that one in paint ..?
Regards ;
|
|
|
|
|
hello guys..my program like that one in Paint ( drawing lines, ellipse,...) but i dont know how to Zoom in/out the pic ..plzz answer me as fast as u can..iam stuck!!
best regards ;
|
|
|
|
|
ok zoom in zoom out is nothing if u closely look at it. in zoom in many things comes out of ur view scope,
Zoom in is basically the distance between drawing or pixels increases and it look that its widened,zoom out is opposite of that.
so my point of view is if u could understand during zoom out the distance between drawing should be increased and in zoom out distance between drawings should be decreased.
so add the constant number for zoomfactor and multiply or divide as u wish to increase of decrease the distance between points.
Regards.
Tasleem Arif
|
|
|
|
|
Article by Bingzhe Quan Zoom in/out[^] will help you.
Regards,
Satips.
|
|
|
|
|
thanks Satips ..but the big problem that iam using v.s 2003 not 2oo5 ..do u know any other articles about Zoom in/out ..i will be greatfull bro..!
Regards ;
|
|
|
|
|
Good People,
How do I use a custom color for a form or control? There is a rollout that says custom colors but it doesn't have the colors I need. Do I have to hard code it? Is there a way I can add it to the rollout? By the way, I'm using .NET 2.0.
Thank you,
BP
|
|
|
|
|
you can create a custom color using the Color.FromArgb() method.
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
Add it by right clicking on the custom colors...
In design mode
BackColor -> Custom Tab -> Right Click a square
This will bring up a screen where you can set a custom color for your selections.
Pualee
|
|
|
|
|
hi all
i make a form to draw in it and to eliminate graphics flicker i made
this.DoubleBuffered = true;
now i transfered my work to work on TabControl but i donot know how to do DoubleBuffered in it
so how can i do it
thanx
Generator
|
|
|
|
|
Unfortunately you're going to run into a wall when trying to make the TabControl double buffered. You can get the tab area itself to double buffer by extending the TabControl and setting this.DoubleBuffered = true, but that still won't fix the flicker in the tab pages themselves.
At that point it makes more sense to write your own tab control, given the amount of effort you'd go to to extend the existing one just to double buffer it.
------------
Cheers,
Patrick
|
|
|
|
|
There seems to be growing dissatisfaction with the lack of control people have over the TabControl. It looks like it may be heading in the same direction as that nasty little piece of work, the ListView.
|
|
|
|
|
Brady Kelly wrote: There seems to be growing dissatisfaction with the lack of control people have over the TabControl. It looks like it may be heading in the same direction as that nasty little piece of work, the ListView.
Absolutely. I've already abandoned both controls and use custom solutions now (not ones I wrote, 3rd party controls, but free with source code). I just got so fed up with trying to shoehorn them into doing what I wanted that I decided to stop wasting my time and went with something that actually works the way I want it to.
The ListView in particular is nasty. It's so seductive, so seemingly easy to create a list-based data presentation, and yet if you try to do even SMALL things outside of what it was designed for you quickly run into multiple impossibilities.
------------
Cheers,
Patrick
|
|
|
|
|
Patrick Sears wrote: The ListView in particular is nasty. It's so seductive, so seemingly easy to create a list-based data presentation, and yet if you try to do even SMALL things outside of what it was designed for you quickly run into multiple impossibilities.
It's also just plain damn ugly.
|
|
|
|
|
Patrick Sears wrote: get the tab area itself to double buffer by extending the TabControl and setting this.DoubleBuffered = true, but that still won't fix the flicker in the tab pages themselves.
can u explain these statments please
thanx
Generator
|
|
|
|
|
hi all
i think that i found a method that i can use
using drawing in memory as bitmap and then draw my background in the bitmap and draw bitmap again to the screen
can any one tell me how to begin search how to use this technique
thanx
Generator
Generator
|
|
|
|
|
Hello
I wrote a string appender class in c# that appends to a string until it finds a certain
group of characters. It then fires off a delegate with the completed string after the characters have been found and clears the text from the object. I'm receiving data from sockets and the carrage returns and line feeds I'm getting are in a unicode like format such as \0a or \0d. How do I search for those characters using the below class.
#region StringAppender
public class StringAppender : TextBox
{
ErrorLogging Err = new ErrorLogging();
public StringAppender()
{
this.Multiline = true;
}
public delegate void TextReceived(string Value);
public event TextReceived TextDataReceived;
private delegate void SetTextCallBack(string Text,bool AppendText);
public string TextBox
{
get
{
return this.Text;
}
set
{
SetText(value,false);
// this.Text = value;
}
}
private void SetText(string Text,bool Append)
{
SetTextCallBack SCallBack = new SetTextCallBack(SetText);
if (Append == false)
{
if (this.InvokeRequired)
{
this.Invoke(SCallBack, new object[] { Text,Append });
}
else
{
this.Text = Text;
}
}
else
{
if (this.InvokeRequired)
{
this.Invoke(SCallBack, new object[] { Text, Append });
}
else
{
this.Text = this.Text + Text;
}
}
}
public void AppendText(string Text, string[] ValuesSearched, bool FirstRun)
{
//Text = Text.Replace("\0", "");
if (Text.Length > 0)
{
try
{
//this.Text = this.Text + Text;
SetText(Text, true);
foreach (string Str in ValuesSearched)
{
//if (this.Text.IndexOf(Str) != -1)
//{
// TextDataReceived(this.Text.Substring(0, this.Text.IndexOf(Str)));
// //this.Text = string.Empty;
// SetText(string.Empty, false);
//}
if(this.Text.Contains(Str))
{
TextDataReceived(this.Text.Substring(0, this.Text.IndexOf(Str)));
SetText(string.Empty, false);
}
}
}
catch (Exception Ex)
{
throw Ex;
}
}
}
public void AppendText(string Text, string ValueSearched, bool FirstRun)
{
//Text = Text.Replace("\0", "");
if (Text.Length > 0)
{
try
{
//this.Text = this.Text + Text;
SetText(Text, true);
if (this.Text.IndexOf(ValueSearched) != -1)
{
TextDataReceived(this.Text.Substring(0, this.Text.IndexOf(ValueSearched)));
//this.Text = string.Empty;
SetText(string.Empty, false);
}
}
catch (Exception Ex)
{
throw Ex;
}
}
}
}
Jason E Cain
|
|
|
|
|
If I want to save in a variable the name of my actual file(name which i saved it before), how I can do that?
|
|
|
|
|
once u get the complete path get the the last index of "\" and then use substring just to get the file name and store in the variable
|
|
|
|
|
When filling a dataset with a table I use first FillSchema() and then Fill().
Here is my problem:
Table A has had say 1000 records in it. Those records have no been deleted before filling the dataset with Table B. So the next ID of an autofield would be 1001. Okay, but when I fill the dataset the Table A while Table A is in memory it has a starting ID of 0. So, now if I have Table A and Table B in a dataset and I am placing the ID from Table A into Table B as a FK, when the database is then updated with Table A and Table B. Table B will have false IDs for Table A.
How can you fill the dataset with Table A so that it the ID would be set to the next ID in the database would be? So that the IDs matched.
|
|
|
|
|
I found that for a SQL database using
SELECT IDENT_CURRENT('{owner}.{tablename}') AS '{whatever}';
will return the last used/inserted ID for that table. -Not the next ID but the current/last used ID.
Here is a link:
http://msdn2.microsoft.com/en-us/library/ms175098.aspx[^]
Still need to figure out a method for Access databases.
God Bless,
Jason
Programmer: A biological machine designed to convert caffeine into code. Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
Hi,
Basicly, i'm creating a graphical based control that displays the relationships of different data types.
The way i currently do it is to go through 2 data types in a foreach loop, which gives me data that i can use to get other data type structs.
eg - not my code just abit pf pseudo example:
foreach (Node node in MainDataType1)
{
Struct structInfo = node.GetStruct();
Node dataType1 = CreateNode(node, structInfo);
Struct structInfo2 = node.GetStruct();
Node dataType2 = CreateNode(node, structInfo2);
Relationship rel = CreateRel(dataType1, dataType2);
}
The above code would create the "left hand side" of the model. I would then go through the 2nd main data type with the same format of code to create the "right hand side".
The problem is, i need to create objects that arnt related, eg if a relationship is lost between 2 data types for some reason, then i wont create the node, because the struct wont return me any information for it.
I've throught of going through all the data types and creating the nodes after i've done the 2 above peices of code, and checking to see if i've created that node.
eg:
foreach (Node node in MainDataType1)
{
foreach (Node node1 in GraphNodes)
{
If (node1 != node)
{
CreateNode();
}
}
}
The problem i see with the above code is it will be time consuming and not practical as i'm going through all the data types more than once which seems silly to me.
Any ideas?
Regards,
Gareth.
|
|
|
|