|
|
Ok....
if no body want to help me.... I will not force to any body....
But one thing to say is that i cann't post small errors to CP, because it is so much slow in response.....
and i cann't understand the sentence " In your quest for high-quality, 24x7, instant, free professional help " , what do u mean by that???
|
|
|
|
|
I think what he's getting at is that we programmers are happy to help, however we charge for consultancy.
What you are asking for is somewhere between a teacher and a consultant. Both these professions are chargeable by the hour. On the other hand, message boards are free - make your decision.
This is no different to DIY jobs for me. If I can wait a bit, I can get it done free as I just have to find some time to do it myself. If I want it NOW, or I lack the required skill, then I pay a man to do it for me.
|
|
|
|
|
Daniel Turini wrote:
"If someone gives you a horse, don't look at its teeth."
Here in Czech Rep we have the same saying maybe cuz it's roman, isn't it?
Horatio or Seneca or ... ?
David
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
About adding to messenger for instant help...
Lets say there are two types of problems:
1. Problems that you have tried to solve with all your abilities. And maybe asked your co-worker.
This is the proper time to ask for help at CP or other resouce.
2. Problems that you give up on after a few minutes.
I believe this is a very destructive habit. You should never give up on any problem. I recomend sharpening your searching skills, buying books on subjects you don't clearly understand, read MSDN regularly , read newsgroups... This is what is actually going to get you much more than instant messenger help.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Hi i am trying to move a child windows within an mdi window
i have a control on the child that when clicked it allows me to drag the child around
however the child is actualy offset a whole lot below and to the right
i do not know how to get the window to move to my mouse position within the parent form
i think the problem has to do with the mouse coords being from the child form and not the parents coordinates how do i move the child window to exactly where my mouse pointer is?
if(dragging)
{
this.Location = MousePosition;
}
ive tried everything subtratcing and adding the forms original positon
PointToScreen and ScreenToClient
can someone please help me!
|
|
|
|
|
when the mouse is clicked on the child window, it is not clicked in the upper lefthand corner, it's offset by some (x, y), record that offset when the mouse is clicked, and add it the mouse position when you do the move
mouseclick (x, y) {
mouseoffet = point (x, y);
}
mousemouse () {
if(dragging)
{
this.Location = MousePosition + mouseoffset;
}
you're losing that offset.
|
|
|
|
|
when the mouse is clicked on the child window, it is not clicked in the upper lefthand corner, it's offset by some (x, y), record that offset when the mouse is clicked, and add it the mouse position when you do the move
mouseclick {
mouseoffset = MousePosition - this.Location;
}
mousemouse () {
if(dragging)
{
this.Location = MousePosition + mouseoffset;
}
you're losing that offset.
|
|
|
|
|
Try the following:
if(dragging)
{
this.Location = parentform.ScreenToClient(Cursor.Position);
}
www.troschuetz.de
|
|
|
|
|
I created my first C# application. When the application runs, the user can drag the bottom-right corner to resize it.
Is there a property that I can turn that option off?
|
|
|
|
|
yes change the form border style
|
|
|
|
|
Hello
I am want to query a database in my book table. I want to find all the books that are over due. This is the query below, but when l execute it, it returns no records. I think it is because of the datatype. I am using MS Access in the datadue field l have it set as a DateTime datatype.
I am using C#
DateTime today = Convert.ToDateTime(DateTime.Today.ToShortDateString());
string queryOverdueBooks = @"SELECT RefNumber, Title, DateOut, DateDue FROM Book WHERE DateDue < '" + today + "' ";
Does anyone know how to correct this query so that it will return the books that are overdue.
Many thanks in advance,
Steve
|
|
|
|
|
Try using some function which is equivalent of To_Date function of oracle.
string queryOverdueBooks = @"SELECT RefNumber, Title, DateOut, DateDue FROM Book WHERE DateDue < To_date('" + today + "' " + ", yyyy/mm/dd");
|
|
|
|
|
just checked the access syntax. the below should also do.
DateTime today = Convert.ToDateTime(DateTime.Today.ToShortDateString());
string queryOverdueBooks = @"SELECT RefNumber, Title, DateOut, DateDue FROM Book WHERE DateDue < " + today + ";
Another solution:
DateTime today = Convert.ToDateTime(DateTime.Today.ToShortDateString());
string queryOverdueBooks = @"SELECT RefNumber, Title, DateOut, DateDue FROM Book WHERE DateDue < Format(" + "'" + today + "', 'YYYY/MM/DD') ";
Do reply whether it could solve your problem or not.
|
|
|
|
|
Here's my code, designed to query a definition from dict.org (ironically, there are only a handful of Windows programs out there that do that):
**************************
IPHostEntry IPAdd = Dns.Resolve("dict.org");
IPEndPoint IPEP = new IPEndPoint(IPAdd.AddressList[0], 2628);
Socket s = new Socket(IPEP.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
string str = "DEFINE * " + Convert.ToChar(034) + SelectedWord + Convert.ToChar(034) + Convert.ToChar(013) + Convert.ToChar(10);
Byte[] Sender = System.Text.Encoding.ASCII.GetBytes(str);
Byte[] Receiver = new Byte[20000];
s.Connect(IPEP);
Int32 bytes = s.Receive(Receiver, Receiver.Length, 0);
s.Send(Sender, Sender.Length, 0);
bytes = s.Receive(Receiver, Receiver.Length, 0);
strDefinition = System.Text.Encoding.ASCII.GetString(Receiver, 0, bytes);
************************
My problem is, every so often I get a response that is so long it overflows my Receiver array (ever look up "at" in the dictionary? ). Declaring a 1,000,000 member array seems a bit silly, so is there a way to declare a dynamic Byte array that can be added to like an ArrayList? Or maybe some other workaround for this algorithm?
|
|
|
|
|
tantiboh wrote:
My problem is, every so often I get a response that is so long it overflows my Receiver array (ever look up "at" in the dictionary? ). Declaring a 1,000,000 member array seems a bit silly, so is there a way to declare a dynamic Byte array that can be added to like an ArrayList? Or maybe some other workaround for this algorithm?
Something like this:
StringBuilder sb = new StringBuilder();
while ((bytes = s.Receive(Receiver, Receiver.Length, 0)) != 0)
{
sb.Append(System.Text.Encoding.ASCII.GetString(Receiver, 0, bytes));
}
strDefinition = sb.ToString();
Yes, even I am blogging now!
|
|
|
|
|
It's an interesting approach. Apparently, GetString doesn't like it when bytes hits zero, so I rewrote it like this to prevent a lock-up:
*************************
Byte[] Receiver = new Byte[150];
System.Text.StringBuilder sb = new System.Text.StringBuilder():
Int32 bytes = s.Receive(Receiver, Receiver.Length, 0);
do
{
sb.Append(System.Text.Encoding.ASCII.GetString(Receiver, 0, bytes));
}while ((bytes = s.Receive(Receiver, Receiver.Length, 0)) == 150);
sb.Append(System.Text.Encoding.ASCII.GetString(Receiver, 0, bytes));
strDefinition = sb.ToString();
**********************
The problem I'm encountering now is that the algorithm doesn't wait until all the data is retrieved before it starts processing it. Is there a way to stop the program until all the data is received? How does the program know that the sender has finished sending data?
|
|
|
|
|
Hi all,
I try to write to a Form1 class which extend a window Form class, and serves
as the base class for another class Form2(not extend Window Form class) (i.e. Form2 extend Form1).However, when I try to use the VS.net Form designer for putting control on the Form1, I got errors. Why ?
Thanks
|
|
|
|
|
Hi,
If you could list the type of errors you are getting, it will make it easier for us to help you. Also, a quick code snippet never hurts.
~javier lozano
(blog)
|
|
|
|
|
Sorry
In fact,
I write 2 form class
one entitled "class Form1 : System.Windows.Forms.Form"
another entitled "class Form2 : Form1"
How do I use the VS .Net Form designer to design form2?
Thanks
|
|
|
|
|
Hi,
I am wondering whether it is possible to open and run or run a matlab program from an interface developed in c#.
I mean i have a matlab xyz.m file which runs directly, when u type at matlab interface command prompt. Can we automate it by doin tht directly from an interface developed in c#?
thanks in advance,
Suman.
Suman
|
|
|
|
|
Matlab is in C, isn't it ? To run it in C#, MC++ or COM are probably your only hope.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi Graus,
yeah Matlab is developed in C, but i need to run matlab program directly from C#.
BTW how to use MC++ or COM in implementing this type of applications. I mean can u gimme an example of a simple program.
Thanks,
Suman.
Suman
|
|
|
|
|
|
I'd like to affect specific items in a List Box. In other words, I'd like to take any one (or more) elements of the List Box Collection and, say, turn it red, or turn it bold.
Anybody know how to do this?
|
|
|
|
|