|
I have a PowerPoint file that I want to generate thumbnails from. How would I go about doing this? I think it would be best if I had it in some sort of generic image format (as it is going to be displayed on the web) however I dont know whats best. Any help would be appreciated.
Jim
|
|
|
|
|
Hi
I'm new to C# and try to send and receive UDP packets to a Counter-Strike server.
Sending packets works fine. Examining the network traffic show that I also get back a response packet from the server. But my client waiting for any UDP packets never receives any packets!
What am I doing wrong?
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
class UDPClient
{
static void Main(string[] args)
{
UdpClient recv = new UdpClient();
IPEndPoint rep = new IPEndPoint(IPAddress.Parse("217.160.132.82"), 27015);
while(true)
{
try{
Byte[] bytes = recv.Receive(ref rep);
string packet = Encoding.ASCII.GetString(bytes);
Console.WriteLine(bytes.Length + " Bytes received.");
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
}
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
There's a good chance that either your hardware firewall (i.e. a router) or your software firewall (i.e. ZoneAlarm or Windows XP Firewall) is blocking that port. Make sure the port you need to receive the packets on is opened for traffic. Otherwise you could disable your firewalls, if possible, or put your machine on the DMZ if you can't disable all firewalls.
Tech, life, family, faith: Give me a visit.
Judah Himango
|
|
|
|
|
There's no firewall involved. I get the response packet (examined in a packet sniffer), but UdpClient.Receive() just hangs and does nothing.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Ok i switched to the plain "Socket" class instead of the "UdpClient" and now everything works fine. Strange...
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi!
I cant find a easy solution to retrive the status from a faxmess that are send to the fax (modem/fax)
I have the Job ID and are trying with this find out if the Job is finished, if there were som errors like the number didnt exist or the line was busy?
i use the FAXCOMEXLib.FaxJobStatusClass status
and just have diffucult to set status to the ID that i want?
Happy for any help!
/Johan
|
|
|
|
|
I need Information about huffman algorithm , how can I make it faster.
Thanks for your time.
|
|
|
|
|
Which algorithm are you using at present? One thing you should consider (if possible) is increasing the number of potential children any one branch could have.
Obviously having too many is pointless (as it defeats the purpose of using the algorithm) and too few can cause unecessary traversals. Placement of leaf nodes can improve performance as well. You could decide that by logic, algorithm, organically (i.e on the fly depending on the needs as they change}, or just through a test battery (which is likely easiest).
Hope this helps, mail me if you need more info.
Jim
|
|
|
|
|
I would add to the normal context menu (copy/cut/delete/cancel) of Windows (that appear when the user right-click inside a textbox) a new voice during my software' installation.
That if clicked call my software passing a "pointer" to that textmenu, so i can set its text with what i want.
How can i do?
Please answer me becouse it is important.
|
|
|
|
|
You can assign your own ContextMenu to a TextBox and do whatever you want in there.
mav
|
|
|
|
|
You have not understand my question: i explain it better.
That textbox is not inside my application but it could be a inputbox (textbox) of Internet Explorer or of Photoshop or whatever other application.
|
|
|
|
|
What you're trying to do is integrate your app with the Windows Shell. Search codeproject articles or your favorite search engine for "Windows Shell integration" and you should get some helpful hits.
Tech, life, family, faith: Give me a visit.
Judah Himango
|
|
|
|
|
Hello,
May be it is very very simple but I could not find the solution.
In a datagrid, I would like to pass the next cell by passing ENTER key..How can I do this.Please help..When I use the tab key I got very stupid results.
|
|
|
|
|
you could intercet the ENTER key pressing, then simply tell datagrid to select the cell you want, in your case try to use something as .SelectedIndex = .SelectedIndex + 1;
|
|
|
|
|
Thank you very much...But I it doesnt work.
When I enter in a cell then I could not see the key press event.If it possible could you please send a code sample
|
|
|
|
|
right now i'm learning about hook message...
Read this: http://www.codeproject.com/csharp/GlobalSystemHook.asp
Using the hook you can estable in whichever moment if is cliccked the Enter button.
|
|
|
|
|
Using a global system hook in this case, is like digging a small hole with a nuke
Beneath this system wide approach there are some more levels of detecting keyboard input:
1. You can install an application hook, that will catch all keyboard input of your application.
2. When you set the Form.KeyPreview property to true, the form will receive all KeyPress, KeyDown, and KeyUp events before they are assigned to the control with focus.
3. The DataGrid class provides KeyDown , KeyPress and KeyUp events which should be fired when you edit a cell.
www.troschuetz.de
|
|
|
|
|
Use the KeyPress event of your datagrid. I've never used datagrid in WinForms but I'm pretty sure it's fired when you edit a cell.
www.troschuetz.de
|
|
|
|
|
please stefan,
give me an example...How?
|
|
|
|
|
If you're using Visual Studio, select your datagrid in the Forms designer, go to the properties window, click on the yellow bolt to get a list of events provided by the datagrid and double-click on KeyDown. The designer creates an event handler, subscribes it and jumps to the event handler in the code file. If you don't use a IDE, you have to insert the following code on your own.
this.dataGrid1.KeyDown += new KeyEventHandler(this.dataGrid1_KeyDown);
private void dataGrid1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Return)
{
}
}
www.troschuetz.de
|
|
|
|
|
Stefan,
First of all I would like to say thank you for your attention.
But when I run the application navigation is not working properly.
Suppose that I am editing the first column and first row (1,1).When I press the ENTER key then cursor is navigating to first column second row(1,2)..My purpose is just navigating the next cell.
Or if I am at the last cell (n,n) then I must navigate to (n,n+1)
....
|
|
|
|
|
As I said, I've never used the WinForm datagrid, so I can't help you with this one. Only wanted to show a way of detecting the keyboard input, so you can go on with the suggestion of the first poster.
Sorry and good luck!
www.troschuetz.de
|
|
|
|
|
I have two forms Form1 and Form2.
In form1 i have a grid control and a button. On button click form2 open. In form2 i have two textboxes & a button (Insert Value). I want when i click on form1 button form2 opens and i fill all values and then i click form2 button (Insert) all values insert in grid control and form2 close.
Does any body know how to do this?
MUHAMMAD WAQAS BUTT
|
|
|
|
|
MUHAMMAD,
From memory this is not really pleasant, But you need to create a new instance of Form1 to be able to programatically controll it and its values. Because the first instance of form1 has nothing to do with form2.
If ne one has a better solution please let me know, because i dont like the work around.
Thanks
Chris
|
|
|
|
|
MUHAMMAD,
Have u thought of using TAB pages?
Chris
|
|
|
|