|
Actually you do both, call the Dispose() method and set the variable to null. Dispose will tell the instance to release the resources it holds while setting the variable to null will release the reference to that instance.
Calling Dispose will release the resources when YOU want it to and not when the garbage collector gets around to calling Dispose for you. When you set your variable to null, the reference to that instance is dropped and, since you already called Dispose, the garbage collector only has to free the memory that the instance occupied. When you do both Dispose and null, you release resources and memory much quicker than if you waited for the GC to get around to it.
RageInTheMachine9532
|
|
|
|
|
I have been experimenting with Web Service Extentions WSE 1.0 (v1.0.2312) and initially fine until I tried to send an attachment back to the client. From the messages it appears the responce SOAP message and attachment are being correctly generated but I am missing something in being able to recive the response. The error message is:
Client found response content type of 'application/dime', but expected 'text/xml'.
I see not place to change the content type of either what the server is sending back (well yes but see below) nor what is valid for the receive.
Some notes the Service now has the Microsoft Web services
using Microsoft.Web.Services;
using Microsoft.Web.Services.Dime;
The web.config has the extentions defined
<system.web>
<webservices>
<soapextensiontypes>
<add type="Microsoft.Web.Services.WebServicesExtension, Microsoft.Web.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" priority="1" group="0">
.....
The stub code in the client does not have the Microsoft.Web.Service defined
The clint code does have the Microsoft.Web.Service defined.
When I look at the WSDL I see nothing that would indicate the client should expect one content type over another. I actually expected this but then I should be able to accept (or limit) valid types in some definition on the client.
I do not see where to set what the response type should be. I can set it on the server but when I add the attachment it corrects that, which I think it should be doing but would like to override it (I am sure I would have a reson some time.)
I do think that I should be able to specify on the client what is correct.
Any helpful hints?
I do not mind getting old. It beats all the other options that can think of.
|
|
|
|
|
Ok, Found what I was skipping.
In the proxy class / what I called the stub above it does need the Microsoft.Web.Service defined and
the base class must be changed from:
public class WSE1 : System.Web.Services.Protocols.SoapHttpClientProtocol
to:
public class WSE1 : Microsoft.Web.Services.WebServicesClientProtocol
both of these are manual edits and I expect will be destroyed if you reimport the WSDL.
Life is agian good.
I do not mind getting old. It beats all the other options that can think of.
|
|
|
|
|
Can ianybody tell me how i use tapi v3.0,for communicating b/w 2 computers connected to LAN via networks cards.because the samples i saw requires modem,but can 2 computers communicate using tapi and have only network cards.please give me some application for this.
mughalali
|
|
|
|
|
What do you mean by "communicate"? What do you want to send between the machines?
RageInTheMachine9532
|
|
|
|
|
simple data,i want client-server prog, exchange data with the help of TAPI technology.i also donot know much about tapi and its capabilities.please give some sample code which exchange data b/w 2 computers using TAPI
mughalali
|
|
|
|
|
I doesn't sound like you know what TAPI is. TAPI is for Telephony. This means Internet phone calls, multicast streaming audio/video, Interactive voice response systems, ... It's not used for transferring general data between a client and server. You still haven't said what kind of data your trying to transfer...
RageInTheMachine9532
|
|
|
|
|
Actually i want to transfer images from client to server,till now i used TCPListener and TCPClient classes in C#.means i use simple socket programming,but i read some where that tapi uses H.323 protocol which is faster for transfering video/audio streams. My question is that can H.323 protocol be used for transferring images from client to server.give me any sort of help
mughalali
|
|
|
|
|
H323 is used for audio/video calls, like a video telephone. Each endpoint is a client AND server, both sending and receiving audio/video.
I've asked you this before, but you have yet to give a straight answer...What are you doing? Are you looking to RECORD audio/video to a file on a server...??? Or what?
RageInTheMachine9532
|
|
|
|
|
I am doing Final year project on Remote Desktop Sharing, For this i transfer images from client to server.Till now it is successful but very slow because images are transfered via sockets(TCPListener and TCPClient classes).I donnot want to transfer any kind of audio or video but i want fast transfer of images from client to server and i have read that TAPI v3.0 uses H.323 protocol which is very fast for transfering audio/video streams, can images be transfered(JPEG IMAGES)using H.323 protocol, or if there any other way of transfering images from client to server in quick time,then tell me.please help me in any way.
mughalali
|
|
|
|
|
How close are you to finishing your year? Your going to have to rewrite both your client and server to accomodate the H.323. TAPI is used for video conferencing also, so yes, you could use it for your application, but it should have been chosen up front during the design process. Now you have a rather large rewrite on your hands...
RageInTheMachine9532
|
|
|
|
|
my 2cts opinion :
The "word" you said is C#. To communicate it has to marshal with the non managed DLLs and APIs and so on. It's simply slowest than in stright C. Don't touch to H323, codecs etc. for an exact(loseless) data transfer. Rewrite your application in stright C. After all, the Citrix and TerminalServers and Vnc's and etc. are running perfect via the sockets.
|
|
|
|
|
Looking for code to pass information from Form2.textbox1 back to Form1.label1
Process - Press Form1.button1 to show Form2,
Enter information into Form2.textbox1,
Press Form2.button1 to display information from Form2.textbox1 to Form1.label1.
Thnaks in Advance!
Form1 consists of <startup form="">
Label1
Button1
For2 consist of
textbox1
Button1
|
|
|
|
|
Pass an instance of Form1 to constructor of Form2 when instanciating, something like this:
Form2 frm2 = new Form2(this);
Then in Form2 , you have access to all public and internal variables of Form1 , so you can define a property of your Lable1 in Form1:
public string MyLable{
get{
return this.Lable1.Text;
}
set{
}
this.Lable1.Text = value;
}
and in Form2 , when the user clicks on Button1 , do this:
frm1.MyLable = TextBox1.Text;
frm1 is a variable of type Form1 that holds a refrence to Form1 which has been passed to constructor of Form2.
abcdabcdabcdabcda
Don't forget, that's Persian Gulf not Arabian gulf!
Why do we close our eyes, when we dream?, When we cry?, When we imagine?, When we kiss?, Its because the most beautiful things in the world are unseen
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
Google on "Mediator pattern" and "MVC" (or "Model-View-Controller"). If you learn how to use these patterns, you'll never get stuck like this again; your code won't need tricks like passing a form to another form. I recommend "Design Patterns" by the Gang of Four.
I'm not saying maysam's advice is bad, but as you construct more and more complicated GUIs, you'll find that it's harder and harder to deal with the complexity you create by hard-wiring things together. Design patterns are over-applied and otherwise screwed up by morons who haven't taken the time to really learn how to use them, which has given them a bad rap. In my experience, though, Mediator and MVC are the most important things to know when programming client-side rich GUI applications. Everything else is a little bit of learning involving threads that's easy to accomplish, and rote memorization of properties of controls and the like.
|
|
|
|
|
Im creating a desktop ticker in C# that I wont to be displayed running along active applications, on the right hand side of the screen.
My question is that when I launch my ticker, how do i adjust currently running apps (e.g. IE/Notepad ..etc) so that they maximize around my ticker, so that my ticker occupies the left part of the screen.. Thx
|
|
|
|
|
I am creating a base form that has a private datagrid that is bound to a dataset. This datagrid uses the paint event as well. I have another form that is inheriting this base form (both forms are in the same project folder). Everything runs perfectly. But, when I bring up the child form in design view, I get the message "DataGrid received an exception at design time. Please reset the DataSource and DataMember property on the grid". Has anyone encountered this message? Also, does anyone know a good reference for design time exceptions? Thanks.
|
|
|
|
|
I've managed to redraw the layout of a form to the desired effect (by rebuilding the region) but so far have been unable to figure out how to add a border around it. Is there an easy way? Would anyone have any brief examples?
Cheers.
|
|
|
|
|
This is pretty vague. What region? Do you mean you've masked the window frame, thus creating a non-rectangular region? Please be more specific.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Yes, sorry. That is exactly what I meant. I've basically masked the original form such that the form now has rounded corners. Nothing amazing I know but i'm just learning. The form has border style set to none and then rounded. The only problem is that if this form is on top of another one then it all just blends in and looks as one. I thought if I could draw a border around the rounded form then it would make things look more separate. Ta.
|
|
|
|
|
You would have to draw them yourself. The only APIs for helping you draw rectangular regions (see the ControlPaint class - even the Windows APIs only help you do the same).
Typically, you make a non-rectangular client area using an image. You could do the same here. Either use or generate an image (if you generated an image, you could use the SystemColors read-only properties to generate an image using the system colors) with an alpha channel and rounded edges. You set that to the Form.BackgroundImage property and set the TransparencyKey if you want to clip a certain color. You could also use an image without an alpha channel (or even with, it just wouldn't make any difference in this case) and use the same region to clip (not mask) the area you want, having rounded, 3D corners within that region. This would work on all .NET-supported Windows platforms, perhaps even some Mono platforms (depending on what window manager / toolkit is used for Windows Forms). Using the alpha channel or color key only works in Windows 2000 and newer.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hi, I use the crystal report in .net environment.
I have 2 questions:
1)If a report has many detailed records so that they go beyond one page. I want the header (Group By section) to show on the top of both pages. How can I do it?
2)I want each group to start a new page, so I checked New page after choice + Suppress blank section choice in the group footer section, but emputy page will still be there at the end of the report, how can I eliminate the emputy page?
|
|
|
|
|
Chris# wrote:
1)If a report has many detailed records so that they go beyond one page. I want the header (Group By section) to show on the top of both pages. How can I do it?
This content should go in the "Page Header" section.
Chris# wrote:
I want each group to start a new page, so I checked New page after choice + Suppress blank section choice in the group footer section, but emputy page will still be there at the end of the report, how can I eliminate the emputy page?
Experiment with "New Page Before", try it in different sections, I think it will give you the desired effect.
HTH
R.Bischoff .NET, Kommst du mit?
Great Freeware -> Abilon - Rss Reader | Zip Genius | SmartFTP
|
|
|
|
|
create a fillschema a dataset
I create a SYBASECOMMANDBUILDER (from DDTEK Sybase Driver)
I create a row from the dataset
I fill the row with data
I add the row back to the datatable
[rowstate is now UNCHANGED]
I make a change to the newly added row
[rowstate is still UNCHANGED]
Of course the following update command returns zero, since there are no rows that do not have a status of "UNCHANGED". Can someone explain to me what I did wrong? datarow adds and changes should change the rowstate to Added and Modified respectively. Thanks in advance
Have a blessed day in Messiah EYAWHOOSHUA!
|
|
|
|
|
Make sure you don't call AcceptChanges on either the DataSet or the DataTable . To note, a DataAdapter will call this after updating your data store (ex: database).
Microsoft MVP, Visual C#
My Articles
|
|
|
|