|
Guffa,
Can you give some sample code or link
thanks
Happy coding!!
kotteeswaran
|
|
|
|
|
|
I have code that allows me to basically write the contents of a richtextbox to a bitmap (sending a EM_FORMATRANGE using SendMessage). This code works fine, but it always draws the text "normal size" regardless of the setting of ZoomFactor in the RichTextBox. How can I get the "zoomed" verison of the text into a bitmap?
Thanks in advance!
|
|
|
|
|
Why don't you try zooming into the extracted bitmap? Let me know if you need the code to zoom into an existing bitmap
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Hi Polis,
I'm interested in the "zoomed" output of the RichTextBox because it does a nice job of scaling the fonts rather than the "blocky" output of scaling a bitmap. Is this what you're referring to?
Thanks!
Lori
Polis Pilavas wrote: Why don't you try zooming into the extracted bitmap? Let me know if you need the code to zoom into an existing bitmap
|
|
|
|
|
Hey Lori,
No, what I was referring to was to zoom into the image after it's extracted. Sorry I can't help you with that since I don't know how you get the bitmap in first place.
If I were you, most probably I would extract the bitmap like you do, then zoom into the whole image, and crop out the parts I wouldn't want to show.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Hello there!
I have been working on this and cannot get it to work for the life of me. I am simply just trying to add rows to a dataset.
I recieve no errors. The datatable does update when I click refresh, but I do not see the rows added.
Can anyone please help me where I have gone wrong?
RCIDBphase1DataSet RCIDB = new RCIDBphase1DataSet();
private void submitbutton_Click(object sender, EventArgs e)
{
RCIDB.jobintake.Rows.Add("test", "test");
RCIDBphase1DataSet.EnforceConstraints = false;
RCIDB.jobintake.AcceptChanges();
this.jobintakeTableAdapter.Fill(this.RCIDBphase1DataSet.jobintake);
RefreshDataset();
}
private void RefreshDataset()
{
this.jobintakeTableAdapter.Fill(this.RCIDBphase1DataSet.jobintake);
}
-- modified at 11:37 Friday 9th December, 2005
|
|
|
|
|
Did you try taking a look here[^]?
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
I have a client/server relationship which I use to update files on connected users' computers. It uses Asynchronous Socket operations and sends binary data over TCP sockets. The connections are maintained indefinately until the client or server disconnects, or a client encounters an error and closes the connection. The problem I am having is that after a few days, the server stops sending messages to its clients. The number of clients right now is about 20-25, which are connected at all times. I see from the message logs that it is receiveing client requests, but it is not sending a response to those clients. The server is set to send updates at 12:30 AM every day, but after about 4 days it stops sending anything. I know it would be helpful to have the code, but not knowing where exactly the problem is, it is hard to post code, and there is A LOT of it.
Any ideas on what the problem may be are appreciated. Thanks in advance!
|
|
|
|
|
I fixed this problem once.
I can't remember the solution, but I think I had a thread to keep it alive. Becuase the CLR tries to shut it down after a certain period of time.
Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I would also attach and event counters to it, to see if the OS is shutting it down and something sporadic isd happening.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Beware of IP address changes. If your clients are DHCP based and the IP resets at somepoint during your conenction then you will have a problem. For example if your DHCP address lease is for 3 days then you might want to visit that.
Also, make sure your read logic in the server and client is looking for its corresponding peer to drop. I.E. if recv() returns 0 or if a SocketException occurs, depending on how your code is structured. The application should free up any socket related resources and return to a steady state. For the server, this means listebing for new connections. For the client, either exiting or initiating a connection retry sequence.
Finally have you stress tested your server? How long can it sustain a constant message flow? If the answer is not indefinitely then you might want to revist the server code to make it moe robust. If it were me, I would make sure the server is 100% bullet proof under load to understand how it performs and what to expect in terms of client communication. Remember any test harness you build should use the same client connection logic. Once you nail that down consider creating a library so that you can build client applications w/o fussing with the connection details.
Mike Luster
|
|
|
|
|
The clients and servers both use a .dll for connection/send/rcv data. The server assigns the new socket to an ArrayList when a client connects, and gives the client an associated number. When a client disconnects, the server removes the client at the ClientNumber position in the ArrayList, then updates all necessary ClientNumbers to the correct position. While the update is going on, the server is suspended, IE, it can not accept new connections until the update is complete.
The client dll backend catches an error, performs cleanup procedures, then trys to reconnect at a random interval. The connect/disconnect portion of the program isnt the problem. Even when the server hangs it still accepts/disconnects.
IP Addresses are static. That shouldnt be a problem. Im beginning to think that it may be some of the other software running on the actual server with my server program. I think the backup software is locking the database when the server tries to update file listings. When I came in this morning, the ListView telling me what the current files were was empty, suggesting it failed contacting the database. If that is the case, then when it tries sending files, it wont have any references in the DataSets, and will simply return from the function without sending anything. Ill keep everyone informed incase the problem may come up with someone else.
|
|
|
|
|
Hello,
Is there a way when we close the form using X (top right corner of the form on the ControlBox), to make it act as a cancel event, when I press Cancel button on this form. In other words, to run cancel button event?
Thank you
|
|
|
|
|
every form has two properties :
AcceptButton:
called when the user press "ENTER".
and the button appears differently.
CancelButton
called when the user press "ESC" or click the close button.
in both cases the form calls the click event of the according button.
hope i helped .
|
|
|
|
|
Hi to everyone!
I just want to ask if it is possible to make an application that all its inputs will appear on MS Word.. I mean if I type Hello on the application, it would automatically appear in MS Word.. If it is can someone tell me how.. thanks a lot
bryz
-- modified at 9:18 Friday 9th December, 2005
|
|
|
|
|
I guess what you're saying is that if you type something in a textBox, you want it to appear inside a Ms Word document right? Take a look at this[^]. It covers a lot of stuff for communicating with Ms Word from C#
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Polis, Thanks a lot..
Regards,
Bryan
|
|
|
|
|
Hi to everyone!
I just want to ask if it is possible to make an application that all its inputs will appear on MS Word.. If it is can someone tell me how.. thanks a lot
bryz
|
|
|
|
|
Can you explain more about your prb. Or atleast rephrase your Q
-A
Work smarter, not harder
|
|
|
|
|
Actually, I am planning to make an application whose input (from a user) that will have its output reflected in another application (like notepad).. is it possible? Ex. if I am the user and I type "Hello" , "World" then the output would appear in the notepad each time a word is typed. If it is possible, can you teach me how to do it? Thanx a lot
|
|
|
|
|
I know that iframes are HTML code but I'm using it in my web form. I have created two web forms, the one is used the main wep page and the other is displayed inside an iframe on the main web page. The web page inside the contais a CheckBoxList and I want to acces this list from the main web page.
Please help...
|
|
|
|
|
Can anybody tell me how to implement a string.Format(..) style function.
i.e. the string.Format() function can take an unlimited amount of parameters, how can I do the same thing in my own functions?
e.g. MyAdditionFunction(1,2)
Which adds all the int values passed into it (the example above would return 3)
I would also like to be able to do:
MyAdditionFunction(1,2,3,4)
which would return 10
Like the string.Format(..) function the MyAdditionFunction can take any amount of parameters
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
|
public int MyAdditionFunction(params int [] values)
{
int total = 0;
foreach(int i in values)
total += i;
return total;
}
usage:
Console.WriteLine(MyAdditionFuntion(1,2,3,4,5));
|
|
|
|