|
|
Hi,
I am working on windows application which store data in xml and put media elements(like images) in folder. I am making zip file of xml and media element folder. Now I need to send this zip file on web server where my web application will unzip this file and will put xml data to sqlserver and place media elements to specific directory.
My question is, How I can send zip file to web application, I have considered FTP but it is not safe because it needs username and password, is there any other solution, if yes then please help me.
Thanks
navees
|
|
|
|
|
Create a webservice method that accepts a byte[] as a parameter then just call the method with the zip as a byte[]. Then just rebuild the zip on the webservice side.
|
|
|
|
|
how do i sort information in a listbox by name (that is, alphabetical order)? im doing c# programming n using microsoft visual studio .net 2003.
|
|
|
|
|
Hi,
You can use the Sorted property of the list box to do this. Set the value of this property to "True".
Thanks and Regards
Pani.
|
|
|
|
|
hi.. im new to c#.. got to do a project to display data (that was downloaded from another PC to my PC) on bar graphs like those u can find in www.advsofteng.com/gallery_bar2.html > graph titled 'Product Revenue For Last 3 Years'.. i nid the codes to produce such a graph and which reflects my data on the graph..
In order for the graph to b displayed, i nid to let user click on tree view (on the tree view there's medicine 1, medicine 2 and medicine 3).. Under each of the medicine, user shd b able to click on any of the months (jan to dec) and a graph will display the date and time of medicine taken for dat particular month..
If the patient did not take medicine on certain dates eg. 2 july and 6july, it shd reflect bars on all the dates except on 2july n 6 july.
thz a lot! any help is appreciated..
ps: im using microsoft visual studio .net 2003
|
|
|
|
|
i have created an on screen Virtual keyboard
what i did was i found the handle for the web browser form and directly used the send keys fn:-
IntPtr webHandle = FindWindow("WindowsForms10.Window.8.app3", "Web Browser");
if (webHandle == IntPtr.Zero)
{
MessageBox.Show("Form is not running.");
return;
SetForegroundWindow(webHandle);
SendKeys.Send("{a}");
}
The problem is that no keys are going inside WebBrowser control.
Please help me urgently.
Thankyou
Arun Appukuttan
|
|
|
|
|
That isn't enough, you need to get the handle to the textbox you want to send text to. You might try EnumChildWindows where you pass it the handle to the browser control. You might also consider calling SendMessage and passing it WM_SETTEXT (0x000C) with the handle to the textbox instead of using SendKeys.
[DllImport("user32.dll")]
static extern bool EnumChildWindows(IntPtr hwndParent, EnumWindowsProc lpEnumFunc, ref IntPtr lParam);
|
|
|
|
|
Hi everybody!!
I 've a problem about ListView In my Windows Form Application. I 've created a song playlist editor that use list view to display the songs and I have move up and move down button for move the song up and down in the list view. But when I push the move up or move down button the row selection will disappear because it lost focus.
Does anyone know how can I preserve the row selection of list view because it doesn't have SetSelected method like ListBox Control?
Thank you and sorry for about my English.
|
|
|
|
|
takkung wrote:
Does anyone know how can I preserve the row selection of list view because it doesn't have SetSelected method like ListBox Control?
Yep, set the ListView.HideSelection[^] property to false.
|
|
|
|
|
I already set ListView.HideSelection but I can't presserve highlighting from a selected item. I think when I select an item and I push Move Up button then the listview control need to be repaint the control because the items in the listview control has changed so the highlighting will be disappear.
The problem is how can I preserve the highlighting at the item that I 've moved up or moved down so I can continue to move that item up or down again and so on. In Listbox control there 's SetSelected method so it can highlight the moved up/down item but in ListView it doesn't have SetSelected method.
this is my code( Move up button click event handler )
int curIndex = this.listSelectedSongs.Items.IndexOf(listSelectedSongs.SelectedItems[0]);
ListViewItem aboveTmpItem = (ListViewItem)this.listSelectedSongs.Items[curIndex-1].Clone();
ListViewItem curTmpItem = (ListViewItem)this.listSelectedSongs.Items[curIndex].Clone();
this.listSelectedSongs.Items[curIndex-1] = curTmpItem;
this.listSelectedSongs.Items[curIndex] = aboveTmpItem;
|
|
|
|
|
I 've already set ListView.HideSelect = false but it can't preserve the highlighting. I think because when I select an item
and push move up/down button the items in ListView.Items has changed and ListView Control will be repaint so the
highlighting will disappear.
The problem is I want the highlighting is preserve at the selected item event through it has moved up or down.
In ListBox control there 's SetSelected method to select an item to highlight but in ListView Control there is no such method.
Thank you very much.
|
|
|
|
|
Ok, I am with you now. I have actually run into this problem before. I solution is to perform the redrawing of the selected ListViewItem yourself.
|
|
|
|
|
I'm doing some graphics work, using Bitmap objects, and a timer that calls the form's Refresh() method. This works, but it updates the entire form, and it flickers. I know it's possible to avoid this, but I'm not sure where to start. Any clues?
Thanks in advance,
Justin Clayden
===================================
| Justin James Clayden \
| Director, Cool Fusion Multimedia \
| mailto:justy@coolfusion.com.au \
| http://www.coolfusion.com.au \
| http://www.arch.usyd.edu.au/~jcla8108 \
=========================================
|
|
|
|
|
Use double bufferring.
Thanks
Alam
Live Life King Size
|
|
|
|
|
iam developing server \client applications and i ask if this code can work on the real internet network or not
here is the code for my file transmission server listening thread.
<br />
Socket ServSock = new Socket(AddressFamily.Internetwork,Sokettype.Stream,ProtocolType.Tcp);<br />
IpHostEntry iphost = Dns.Resolve(Dns.GetHostName());<br />
IpAddress thisip = iphost.AddressList[0];<br />
IpEndPoint myendpoint = New IpEndPoint(thisip,(Int32)7291));<br />
ServSock.Bind(myendpoint);<br />
ServSock.Listen(-1);<br />
This Code will get the local ip address of the computer it is running on and connected to the internet and listens for any Clients' Socket Requests and with small other portions of codes it will accepts the client connection in this part there is the main server that will be running on any webserver like any dedicated webserver so the above code will be run when one user A wants to send a file to the other user B the main server on the webserver will send to B the ip address of the networkstream of A so B will begin to initialize an ipendpoint for this client A on B's Client Application as follows.
<br />
Socket clientSock = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);<br />
IpHostEntry remoteiphost = Dns.Resolve("A's Ipaddress that sent by the main server");<br />
IpAddress remoteA = remoteiphost.AddressList[0];<br />
IpEndPoint Aendpoint = new IpEndPoint(remoteA,(Int32)7291);<br />
clientSock.Connect(Aendpoint);<br />
if(clientSock.Connected)<br />
{<br />
}<br />
The Question is:
----------------
Can the server and client be connected to each other even if these users using dialup connection or both using Dsl or one differs than the other in the type of connection .....? Cause i tested it on my local pc and it works and i tested it over real network in too many computers connected together in internal network as in cybers but can be connected also over the internet ?
Please Help me .
Miss With The Best And Die Like The Rest
|
|
|
|
|
Can somebody tell me what is the benefit of using events?
Are there any performance gains? What is the point?
|
|
|
|
|
In what regard ?
There are no performance gains, there is a loss, in terms of a lookup being required to find the method to call.
The reasons are:
1/ Events in general are the model that make software like Windows possible. An event is the only way to have a button, for example, and run some code if it is clicked.
2/ If you mean delegates in general, they allow different classes to communicate, and provide things like a callback mechanism from one class to another, so for example, in my C# paint program, an instance of the tool class, which is a specific drawing tool, can fire an event to let the main code know that a drawing event has occured, and to send the details so it can be added to the event list ( the code uses a list of drawing actions to facilitate easy undo/redo ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
hi Nick. You're a C# MVP ? Will I see you in Seattle ?
This guy probably didn't read your link, he asked another question of me today, then got really rude because I gave an MSDN link that didn't include full cut and paste code for what he was trying to do.....
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Does anyone know of a control or method for creating an options dialog like that used by visual studio? Basically there's a treeview on the left side of the dialog and depending on what you select it displays the panel that's associated to that node. I tried to implement this with a tabcontrol in vs2005 but there's no way to hide the tabs at the top. Can I just override that pain event?
Thanks,
Rob Tomson
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
Use a big panel with user controls inside, and just show the user control for the selected tree item.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
If you want to integrate with Visual Studio, you should check out the Visual Studio Extensibility Center/[^], there is all kinds of documentation for writing add-in's for Visual Studio there.
|
|
|
|
|
I have singleton server object that is published:
RemotingServices.Marshal(myObject, "myObj.rem");
And that object is connected to by clients:
IServerObj = RemotingServices.Connect("tcp://.../myObj.rem");
My question is, should I connect to IServerObj one time only and keep it alive until the client closes? Or is it better to connect to the IServerObj each time the client wants to communicate with it?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
I see it going both ways..
Leaving the connection open with clients that use it once in the morning and don't touch it again may not be the best choice.
Making connections as neccessary could result in a number of hits on the server depening on your clients usage.
I would probably look at keeping the connection open for a timed period then terminate it on expiration.
|
|
|
|