|
sanforjackass wrote: for every connection i know the IPs
If you have the IP addresses of the machines you don't need DNS. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thanks all
i found what i want in (skype bing)
but now i want to send files over it how?
(there is "sendcommand" command what is it if some one know?)
|
|
|
|
|
Hi. I have included the code
this.hide();
in the shown, and load event just to make sure that the form is not seen immediately after starting but resides on the task bar, till someone gets it from there but this does not work since the form is still shown on starting. What could be the problem?Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Okay. I solved it in a hack kind of way. I set the Windows Start property to minimized, then, i set it ShowAtTaskbar false.
In the tray i reversed all this and now im happy. Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
set this.Hide() in form_Shown event. it will work.
|
|
|
|
|
I want when a button is clicked, my application shuts down then restarted by the Operating System. I am using Visual Studio 2008 on Vista (TM), and of course programming with C Sharp.
Is it possible to make a new Object like:
MainForm mf = new MainForm();
mf.Show();
Then immediately kill the application?Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
modified on Saturday, February 20, 2010 5:12 AM
|
|
|
|
|
Application.Restart() Best Regards,
Chetan Patel
|
|
|
|
|
Thank you. Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Sir
I am doing my project in C#.net&SQl server. I have dought about How to fetch the image data into data formet through OCR technology
|
|
|
|
|
|
Okay, i think you would need a plug in of some sort and consider the BLOB data type, atleast i know it exeist in MysQL. Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Hi all,
I was able to format strings relatively easily when writing Console applications when I use WriteLine methods and place holders to ouput strings. However when I want to out put strings via text boxes I am having a little problem. For Example suppose I want to output a number that has 3 numbers to the right of the decimal point how do I do it if my code is currently written like the following
txtPercent.Text = Convert.ToString(myMoney.getInterestRate)
Thanks in advance for your help.
|
|
|
|
|
Not sure if I totally understand your question as to what your wanting but I think what your wanting to do is convert the text to a decimal.
basically if you have Price 1.99 in your text box your wanting to convert that to a decimal do i Understand you correct ? If so, then do this
Decimal myConvertedString = (Decimal)textbox.text;
or are you trying to simply get the value from your getInterestRate method and put it in your text box ?
If so then do this
txtPercent.Text = (myMoney.getInterestRate).tostring();
or if your wanting to split the values so you get the numbers to the right of the decimal and the numbers to the left in separate indexes then use a split.
String[] splitstring = null;
string stringtosplit = txtPercent.text;
this way you will end up having an array with the number(s) to the left of the . stored as index 0
and the numbers to the right of the decimal stored as index 1;
hope this helps.
|
|
|
|
|
I believe the OP just wanted to format a number (double, float, whatever) as a string with a certain number of decimal places. Though that seemed like a specific example of a more general question (how to apply formats to objects when serializing them). See my answer the the OP's question for more info.
|
|
|
|
|
Look into string.Format(). This page shows specifically how to format with a given number of decimal places. Also, if you just need to work with one number (day, a double), you can just use ToString to do the formatting for you:
MessageBox.Show((0.1111233d).ToString("0.000"));
|
|
|
|
|
How would I do something like this
var distinctBooks = query
.GroupBy(x => x.BookID)
.Select(x => x.FirstOrDefault());
to this
List<FillGrid> query = (from b in db.Books
join ba in db.BookAuthors on b.ID equals ba.BookID
join a in db.Authors on ba.AuthorID equals a.ID
join bn in db.BookNumbers on b.ID equals bn.BookID
where a.AuthorFirst == splitstring[1].ToString() && a.AuthorLast == splitstring[0].ToString()
select new FillGrid
{
AuthorID = a.ID,
Author = string.Format("{0} {1}", a.AuthorFirst, a.AuthorLast),
Title = b.Title,
Price = (decimal)b.Price,
BookNumber = bn.SurrogateNumber,
BookID = b.ID,
Count = db.BookNumbers.Count(c => c.BookID == b.ID)
}).ToList();
I keep getting a conversion error...
I also tried taking and doing query.tolist().firstordefault(); still no go any help would be great thanks
|
|
|
|
|
your first query works. should work.
so should the second one.
eventually try
var query = ... instead of List...
what's the splitstring?
|
|
|
|
|
I realize the first and second queries work that's not the issue.
The issue is how do i do the first one using the data from the second one?
Basically i want to use the query's results and only return the distinct ones or the firstordefault()
so basically what I'm trying to do is
public class FillGrid
{
public int AuthorID {get; set;}
public int BookNumber {get;set;}
public int BookID { get; set;}
public int Count {get; set;}
public string Title { get; set; }
public string Author { get; set; }
public decimal Price { get; set; }
public string Keywords { get; set; }
public List<FillGrid>FillTheGrid(string treeviewText,string treeviewTag)
{
List <FillGrid>results = new List<FillGrid>();
........
List<FillGrid> distinctresults = query.GroupBy(i => i.BookID).Select(i => i.FirstOrDefault());
return distinctresults;
</pre>
but i keep getting the following error.
<pre>
Error 1 Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<yetagain.DataOperations.FillGrid>' to 'System.Collections.Generic.List<yetagain.DataOperations.FillGrid>'. An explicit conversion exists (are you missing a cast?)
|
|
|
|
|
well thats easy
List<FillGrid> distinctresults = query.GroupBy(i => i.BookID).Select(i => i.FirstOrDefault());
List<FillGrid> distinctresults = query.GroupBy(i => i.BookID).Select(i => i.FirstOrDefault()).ToList();
var distinctresults = query.GroupBy(i => i.BookID).Select(i => i.FirstOrDefault());
A LINQ query returns an IEnumerable by default and it does not get exectuted right away.
Only when you do something with it.
But if you call the .ToList() it will execute it and cache the results.
|
|
|
|
|
yeah i just did that before you replied thanks again
|
|
|
|
|
Hi, I'm working on a c# application using MDI containers, and I wonder if there's a way to move a child without showing it's content while dragging it?
I don't know if I'm being clear with my question, I'm trying to do something as the effect of this performance option:
http://img697.imageshack.us/img697/804/examplet.png
|
|
|
|
|
Please don't repost the same question across different forums.
|
|
|
|
|
one of the simplest possible solutions could be to add a panel in all your forms. keep all your controls inside those panels.
Add a bool property named BeintMoved in the form, and in the setter, change the visible property of the panel.
all you need now is to change this property while the form is being moved.
now, whenever form movement happens, this panel will become invisible and so will all child controls.
|
|
|
|
|
The thing is, I want the child mdi forms to stay in the container's border, so the container doesn't have any scroll bars and all the windows stay on the work area.
I have already did this, but the form flickers as it's moving. If I deactivate that option on windows, it doesn't happen, and the form still stays at the border. I imagine using panels, the form would still flicker.
|
|
|
|
|
I am sorry. I don't understand what you want. I thought you wanted to achieve a performance boost by hiding the content of child forms. In that case my solution does the job.
|
|
|
|