|
You never really explained what your problem was...
But I'm glad you found something that works for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi i want only doc files to open in windows form in uneditable mode.
Thanks
|
|
|
|
|
Hi there,
I would like to write a program for data socket with GPRS connection.
My smartphone, Dopod 585, is as the client and PC is the TCPserver.
To deliver string from smartphone and show it on PC is my current task.
However, I can do that via USB connection but failed in GPRS.
It seems to mean that both programs in client and server are correct but something wrong in GPRS connection.
Maybe I need to write a program in C# to start GPRS connection.
However I could not get any information about GPRS connection in the MSDN for C#.
Would you please do me a favor to give a example program or tell me what function or structure could accomplish GPRS connection? Thanks for your kindly assistance.
Sincerely yours,
Kuan-chu
-- modified at 3:28 Wednesday 14th September, 2005
|
|
|
|
|
How to let the user to input the URL of the target Web Server to access web service. (All the different Server have the same web service call)
Example.
User can input http://192.168.1.3/abc.asmx to use ABC web serivce
also, user can input http://192.168.1.6/abc.asmx to use ABC web service too
as both URL have the same web service
KT
-- modified at 23:20 Monday 12th September, 2005
|
|
|
|
|
The Client generated by WSDL or a WebReference has a Url property. If you set that before making any method calls then it will use that instead of the value from registration.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I am tryin to develop a app that will run in teh background on a system, it needs to be able to access a webpage (eg http://1.1.1.1/web/user/webDocBox/FileList.cgi), it then has to be able to retrieve the images stored on the web site, then be able to move to the next page of images (there are usually abotu 5 pages).
the problem im having is that all 5 (eg number) pages have the same URL address (the one listed above), and turning the page is controlled by a javascript function, i didnt write (and have no exp) the javascript function, and im having trouble being able to find a way to get the app to change the page, i have tried posting the javascript function with HttpWebRequest, but the only result i am getting is it simply changes to page 1, everytime.
If anyone can help me with this issue, id really appreciate it
I am tryin to developin useing a C#.NET windows application, is this possible, or do i need to make it a c# ASP.NET project?
(NOTE: THE URL USED ABOVE IS JUST AN EXAMPLE, ITS NOT THE REAL ADDRESS)
thanx in advance,
Thaynann
-- modified at 23:13 Monday 12th September, 2005
|
|
|
|
|
Fiddler[^] will probably help you out. It's a logging proxy that will let you capture your web traffic and replay it to make sure you get all the headers and post information correct. Once you have that it should be easy to translate it into httpwebrequest calls.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Thanx for the link, its alot better then TcpTrace (even though they both return the same data), my main problem is that when i want to turn the page of images (ie from 1/5 to 2/5) the URL stays the same, and im not sure how to set up a POST to be able to let me move through the pages, grabbing the URLs of the JPG files on each page (basic functionality). heres a sample POST that fiddler returns when i attempt to change pages (in its raw form)
POST /web/user/en/webdocbox/faxDocListPage.cgi HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
Referer: http://1.0.0.1/web/user/en/webdocbox/faxDocListPage.cgi
Accept-Language: en-au
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Host: 1.0.0.1
Content-Length: 612
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cookie: risessionid=171415779234873; cookieOnOffChecker=on
offset=24&resultRowBlockSize=12&matrixColSpan=4&show=thumbnail&displayedDocIds=30946&selectFlags=false&displayedDocIds=30944&selectFlags=false&displayedDocIds=30942&selectFlags=false&displayedDocIds=30940&selectFlags=false&displayedDocIds=30938&selectFlags=false&displayedDocIds=30936&selectFlags=false&displayedDocIds=30934&selectFlags=false&displayedDocIds=30932&selectFlags=false&displayedDocIds=30929&selectFlags=false&displayedDocIds=30927&selectFlags=false&displayedDocIds=30921&selectFlags=false&displayedDocIds=30919&selectFlags=false&orderBy_property=ReceivedDate&orderBy_descendingRequested=true&dummy=
Im not sure what the section at the bottom does, but it appears in every request i send to turn a page (although the values are different), i am very new to handling apps in regards to Web aspects and i am a little lost with all this.
any help that anyone can provide, will be greatly appreciated
thaynann
-- modified at 1:18 Tuesday 13th September, 2005
|
|
|
|
|
The section at the bottom is the post information. It is just like the informaton in the query string but it put in a different location on the request. The value of the content-Length must match the length of the post data. You are going to have to figure out what the next page is expecting based on the last page sent, which shouldn't be too hard since you have the javascript code, you just have to reproduce what it does in C#.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
thanx for your reply, i managed to figure out the POST data, i just simply have to grab the DisplayedDocIds values from the current page (they are hidden input vals, but do appear in the HTML code), then simply plug it into that data string, (i tried this in a test and also by using fiddler to compare 2 consecutive pages, and it works, should be a simple thing to implement, thanx for your help andy, ive been lookin for 4 days for an answer to this problem, with the info of wat the exact post data is, the rest should be easy to implement.
Thanx again
|
|
|
|
|
Hi All,
I am unable to close Microsoft Excel object from Task Manager.what i am doing as follows ************ Sample Code*********************
Excel._Application _excel = new Excel.ApplicationClass();
Excel.Workbook wsWorkbook = _excel.Workbooks.Open(@"C:\test.xls",0, false, 1, "", "", false, Excel.XlPlatform.xlWindows, "",true, false, 0, true, false, false);
Excel._Worksheet sheet = (Excel._Worksheet)wsWorkbook.ActiveSheet;
sheet.Activate();
((Excel.Range)sheet.Cells [1,2]).EntireColumn.NumberFormat =0;
((Excel.Range)sheet.Cells [1,2]).EntireColumn.AutoFit();
((Excel.Range)sheet.Cells [1,3]).EntireColumn.NumberFormat ="$#,##0.00";
((Excel.Range)sheet.Cells [1,3]).EntireColumn.AutoFit();
wsWorkbook.Close(true,missing.Value,missing.Value );
// _excel.Visible = true;
_excel.Quit();
MessageBox.Show("Done");
**************code end here*******************8
I am opening existing .xls file using C# and formatting some columns.
It doesn't release object from Task manager memory.
I used Excel.quit() and excel.close();
Please let me know why is object not realsed.
Thanks & Regards
Rao
|
|
|
|
|
Add this in the end to release the objects
wsWorkbook = null;
_excel = null;
|
|
|
|
|
|
[DllImport("user32.dll", EntryPoint="GetWindowThreadProcessId")]
public static extern uint GetWindowThreadProcessId(int Hwnd, ref int ProcessID);
private int importExcelProcessID = 0;
Do this in the beginning
Excel._Application _excel = new Excel.ApplicationClass();
GetWindowThreadProcessId(_excel.Hwnd, ref this.importExcelProcessID);
When the App ends do this
if (this.importExcelProcessID != 0)
{
Process.GetProcessById(this.importExcelProcessID).Kill();
}
|
|
|
|
|
Thank you ... But doesn't work...
Thanks & Regards
Rao
|
|
|
|
|
Thank you ...
Thanks & Regards
Rao
|
|
|
|
|
Does it work for you?
alam_pune
|
|
|
|
|
I am trying to create a child process and listen to it and talk to it.
I am using what I think is the standard model: I create the process with "UseShellExecute" set to false, and use a streamwriter and a streamreader to read and write.
The child process writes some data to the console (redirected to me), then waits for me to write back. If I don't write back, it sits there forever.
The problem I am having is that sometimes it writes a few K bytes of stuff at once. When it does this, the last few lines do not get written, and so I sit there forever in my process, waiting for the rest of the stuff to be written.
If it writes smaller amounts of stuff at one time, it seems to work fine. I only have problems when it starts writing lots of stuff pretty quickly.
The child process runs in other cases where it is called from processes (non-C# apps), and I am certain that I am doing a "fflush(stdout)" after ever write in there anyway (the child process is written in C, and it does all of its writing through one function, which has a "fflush(stdout)").
All of the reading is taking place inside a thread, but I don't think this is the problem because (apparently) nothing outside of the thread is touching the streamreader.
I'm at the point where I'm wondering if this is a known bug in streamreader? Does it barf if its buffer fills up?
Anyone have any ideas about how to do a workaround?
Thank you,
bruce
|
|
|
|
|
Are you trying to read standard error too? MSDN[^] says that this can be problematic, unless you're reading standard output and standard error on different threads.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
No, but thank you for the reply.
It's very simple. The thread sits there and does "ReadLine" from the stream buffer. When it gets a line, writes it to the console, and loops.
The stuff comes in pretty fast, but eventually the program will hang. If I enter the debugger, it's waiting for input, and if I drill down into the stream buffer, the buffer is full and the last thing I see displayed on the screen is the last thing in the buffer.
I am probably wrong, but here goes. I can imagine that most uses of this are done in one of two ways:
1) Continuous input.
2) Small hunks of input, which are fully processed and therefore never fill the buffer.
What I have is bursts of input, and then the child process will sit there and do nothing for a while. It would seem like a stream buffer should be used commonly enough that it should work correctly, but perhaps this way of doing input is rare.
If the stream buffer were my code, I'd assume I had a bug in the "block if buffer full" logic.
Thank you,
bruce
|
|
|
|
|
I have two forms:
Form1 - loads as startup form.
Form2 = Loads when I push a button on Form1
I set the BorderStyle of Form2 as a FixedToolWindow via code AND properties grid.
I set the height and width via code AND properties grid. The height is 528, and the width is 886.
Again, I set this twice. 1) in code on the Form Load. 2) in the properties grid
When I click the button on Form1 to launch Form2 it shows up full screen.
I have the StartPosition set to 'CenterScreen' and WindowState to 'Normal'
I also tried setting the height and width of Form2 after I created a new instance of it:
Form2 frm2 = new Form2()
frm2.height = 528;
frm2.width = 886;
frm2.Show();
Still goes full screen.
But, another twist. It only does it once. Like the first time I load the app and launch it this is what happens. If I close form2 and open it back up without closing the whole application, works fine.
Any suggestions?
Steve Welborn
Software Architect
|
|
|
|
|
Swelborn wrote:
Form2 frm2 = new Form2()
frm2.height = 528;
frm2.width = 886;
frm2.Show();
Can't work. The Show method causes the initialisation/load methods to be called, which will set the size. You need to set the size within the form, or after you show it. The nicest way would be to pass the desired size in the constructor, and use them when the form is first shown.
Swelborn wrote:
But, another twist. It only does it once. Like the first time I load the app and launch it this is what happens. If I close form2 and open it back up without closing the whole application, works fine.
Amusingly, when you create this form after the first time, .NET has already cached it, when you closed it last time, it was just hidden, so this init code will not be called again, instead the framework just shows the form that it was hiding when you tell it to.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks Christian for the info. I will place the information in the constructor and see what that does.
Steve Welborn
Software Architect
|
|
|
|
|
Hi
I need to a Form that accepts dropping files that are dragged from Windows Explorer and somehow handle the event when the file is dropped. Just like for example MS Word or IE accept dropping files and they open them.
How to do this? Thanks in advance , H.
|
|
|
|
|
Forget it, I already figured that out myself .
H.
|
|
|
|
|