|
i wouldn't jump the gun and say there is a memory leak
a good thing to know about the grabade collector in .net is that it collects garbage when it wants to
an easy way to see this for yourself is to sequencially create and destroy let's say 100,000 objects.
open the task manager to watch the memory status as the code runs for whatever time it takes him (i would even put it in a never ending loop just for the sake of the example)
the loop should be something like
{
CreateObject();
DestroyObject();
}
you will notice how the memory starts to fill up, and then just when you think the system is about to die, you'll see how in a second it all comes back to normal - that's the garbage collector waking up and doing it's job
Let me know if it is a leak or just the garbage collector so i'll know whether to use the tcpClient.
Fade (Amit BS)
|
|
|
|
|
Hi! How can i find all types in solution, which contains more than one assembly, in a design-time?
|
|
|
|
|
Use the Class View pane or open the Object Browser (shortcut is ctrl-alt-j).
There's also a nice tool called Relector, but has nothing to do with VS.NET
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Good day all.
Using the Text property in the Form design. I created a text line with the Ampersand in the text. The designer does not display the symbol, nor does running the app.
Thank you in advance for any assistance on this problem.
Have a great coding day.
Regards,
Tony D. Abel
|
|
|
|
|
The ampersand is used to specify the letter that will be the keyboard shortcut for the control.
For example, if you have a label "&Name" prior to a TextBox , pressing Alt+N will set focus to that TextBox .
To display an Apersand, then, I think (not really sure, I would have to try that) doubling it will do. Eg. "First && Last Name" will display "First & Last Name."
Hope that helps!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Good day Luis.
Thank you for addressing this problem.
Yes dual ampersands in the text string displays the ampersand.
Colin Angus Mackay assisted me with this solution.
|
|
|
|
|
I'm trying to develop a control (client-side) to embed as an object on a Web page.
There is no problem if I do like this :
<br />
<object classid="UserControl.dll#UserControl.UserControl1"><br />
</object><br />
But now, I would like to put the assembly UserControl.dll in a .CAB. I've tried to do like this :
<br />
<object classid="UserControl.dll#UserControl.UserControl1"<br />
codebase="UserControl.cab"><br />
</object><br />
but it doesn't work. I know it's possible with control ActiveX, but I don't know if it's possible with .NET.
So, is it possible ? If yes, how ?
Thanks in advance,
Didier
|
|
|
|
|
No, with .NET you cannot put your dlls into a CAB.
Regards,
Frank Hileman
check out VG.net: www.vgdotnet.com
An animated vector graphics system integrated in VS.net
|
|
|
|
|
Hello,
i'm developing a Client/Server application and i've to create a Administration Form that opens only when the client is logged like administrator.
When i click on the admin button the client request authorization to the server. the server checks if it's an admin and if another admin is logged with admin panels opened, after that sends him a message telling him he can or cannot open the admin form.
On the receive of the message i try to open the form but doesnt work. In a modal way the form appears but nothing is displayed in it and i cant close/do nothing. using the form in a modeless way with .Show() only it's the same. So i've tried to make it mdi child of the main form but the program says it cannot make the form parent of something that is in another thread.
Is there a way to solve this problem?
Thank you very much
|
|
|
|
|
The windows forms will behave abnormally when you try to access them forom a different thread then they are, and as you are probably getting the communication message on another thread you cannot directly control the forms
BUT!
the .net developers have been kind enough to porvide us with the 'Invoke' method, which is a member of each and every control (forms, buttons etc.)
this allows you to tell the control (form for this matter) to do something in it's own thread
what you need to do is to create a method (sub) that creates the new form and assigns it to a variable, that method should be located in your startup form, or any other form you want to use.
<br />
private AdminFormMember as AdminForm<br />
<br />
Private Sub CreateNewForm() <br />
AdminFormMember= New SocketControlForm()<br />
<br />
AdminFormMember.Show()<br />
End Function<br />
and Create a delegate to it like so
<br />
private delegate sub CreateNewFormDlg()<br />
and call it from your code when you want to create to new form using the 'Invoke' method, like so:
<br />
If (OpenAdminForm = True) then<br />
' Creating a delegate instance<br />
dim CreationDelegate as new CreateNewFormDlg()<br />
' invoking it from the main form's thread !<br />
MainForm.Invoke(CreationDelegate)<br />
<br />
end if
That's it, not too complicated and it works, trust me
Fade (Amit BS)
|
|
|
|
|
Hi!
Does anybody know how to get local time for arbitrary location?
The OS surely has ability to calculate it, but I can't find how to use it.
If I only could create a TimeZone object for any given location... But I can't.
So is there another way to get what I want?
|
|
|
|
|
Is there anyway this can be done?? I know that u cant set the backcolor to transparent because he doesn't support it. But it there a way around to do this?
|
|
|
|
|
See the SetStyle method. Pass the ControlStyle.SupportsTransparentBackColor to the method. This allows you to set backcolor to Color.Transparent
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
i have a small .net class i wrote that is simply a "com wrapper" to access the fileopendialog.
i am using it for an application that have jscript as an embedded scripting engine.
on my machine i had to use regasm xxx.dll from the dll directory to get it to work - this is fine
however i CANNOT get this to work on any other machine.
i have:
installed the .net framework on the client machines
tried running the .reg file resultant from regasm xxx.dll /regfile on the machines
tried running regasm xxx.dll as i did on my machine
|
|
|
|
|
i figured out that i also needed to run regsvr32 /n xx.dll on it.
|
|
|
|
|
Does anyone know of an IE Toolbar written for .NET?
|
|
|
|
|
Good day all…
I am experiencing a problem in using the Form Icon property. I have created a custom icon for my app and cannot display the icon (in the design view) by setting the property using the browse function. It displays properly in the properties view but not on the title bar. I get a default icon (on the title bar) of which I cannot determine its origin. This icon is not the system default icon.
Thank you very much in advance for your assistance
Have a great coding day.
Regards,
Tony D. Abel
|
|
|
|
|
Hi there -
following problem:
i programmed a udp server, that sends serveral udp packets by broadcast in a while loop.
my udp clients take this packets asynchronously.
unfortunately, my server is much faster than the clients, so it sends more udp packets that could be accepted by the clients. i developed a kind of speed synchronysation between server and clients, but anyway it does not guarantees that at some times, there are too many udp packets for the clients to handle. so my guess, the udp packets are stored in kind of buffer on the windows client systems. but that's what i do not want. but i have no idea to either tell the client pc to drop udp packets that are older then e.g. 1 second nor do i know how to tell a udp packet not to be stored in a buffer.
can anyone give me a hint?
thanks.
tom
|
|
|
|
|
Hi
i use this code to retrieve my image field from sql server
(my file isn't picture !!!)
***********
Dim MyData() As Byte
MyData = Ds.Tables(mytable).Rows(0).Item(myfield) 'For Example
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream("c:\mkh.xml", FileMode.OpenOrCreate, FileAccess.Write) 'in this line get error
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Ds = Nothing
************
but it doesn't work and give me this error in ASP.Net(With Vb)
<<access to="" the="" path="" "c:\mkh.xml"="" is="" denied.="">>
i get this code from microsoft msdn and alot of furoms !!!!
then why doesn't work??
MkhProgrammer
|
|
|
|
|
Hello,
This shouldn't be hard, but I can't seem to figure it out. I have a simple setup project created using vs.net "Setup and Deployment Projects". I added a single dialog to the default UI with 4 text boxes. The property names associated with the text boxes are EDITA1, EDITA2, ...etc.
I build the project and then attempt to modify the default value of EDITA1 from the command line by entering the following:
msiexec /i Setup1.msi EDITA1="My Val"
This runs setup, however the text box associated with this property comes up empty. I'm expecting that "My Val" would appear in the text box.
What am I missing?
Thanks,
-saed
|
|
|
|
|
Hi
can anybody tell me:
how can i make an exe file that get <<cmd parameters="">>?(like c:\myexefile.exe -p1 -p2 ...)
Best Regards
MkhProgrammer
|
|
|
|
|
|
Hi
can i change caption of msgbox buttons?
for example instead of ok i want use "Trust" !!!
Best Regards
MkhProgrammer
|
|
|
|
|
Hi
can anybody tell me that:
1)How can i retrieve a binary field (image field) that stored in SqlServer2000 with Vb.Net and save
it again in my hard disk that i have again that file?
2)can SqlServer itself convert image field to file with its store procedures?
3)can sqlserver run an exe file on local computer from its storeprocedure?
Best Regards
MkhProgrammer
|
|
|
|
|
Hi Evrybody,
I got A question for you all.
At some point in my project i want to automate the creation of my application.There are three source files which need to be processed to create the finished program.
How do i create a batch file which will compile the programs to build the required assemblies and the executable.
i know it has got something to do with nmake command.Can somebody please explain me this command and the procedure.
Thank you
Ankit
|
|
|
|