|
If you're using this .DLL through Declare statements, you can't unload it. The .DLL is loaded into your process' addess space on startup and stays there, with it's file held open until after your application quits.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
This is how I declare it. Is there no way to unload this from the memory?
Dim F As Object
Set F = CreateObject("MyObject.MyClass")
Before running this code the DLL can be replaced easily.
Even when the object is out of scope I can't delete the DLL.
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Yep. You can't delete it until AFTER you're application terminates. Even if you're no longer using any objects in the .DLL. There is no way to unlock the .DLL so long as your code continues to run.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How can I specifically read a word placed between quotes ("word") from a line of text.
|
|
|
|
|
Dim first As Integer = Trim(TextBox1.Text).IndexOf("""") + 1<br />
Dim last As Integer = Trim(TextBox1.Text).LastIndexOf("""")<br />
<br />
Label1.Text = Trim(TextBox1.Text).Substring(first, last - first)
This will only work with one set of quotes, I'll work on a little parser and get back to you.
|
|
|
|
|
I would have thought that the easy way, would be compare....
the word you want to look for is "word"
the user types in "this word would be nice" includes the "word" you are looking for.
|
|
|
|
|
hello
I'm opens a form (Access 2003) using a tmptable and show the content of it correctly. but, I get the last line ( table.EOF line?) with an empty line in the form also.
when looking in the tmptable - the last line is empty too. how to avoid display this line?
thanks in advance
evyatar
|
|
|
|
|
How do I check to see if a text box is empty or has multiple blank spaces.
|
|
|
|
|
Try this:
<br />
If TextBox.Text <> "" Then<br />
'Code goes here<br />
End If<br />
|
|
|
|
|
this will remove all white space before and after.
If Trim(Textbox.text) <> "" Then
......
End if
|
|
|
|
|
Thanks AreJay this solved the problem.
|
|
|
|
|
Hi,
I want to determine from my vb.net code which background process(application) is running in full screen mode. I got all process details using the system.diagnostics...but how to go about determining whether the process is in full screen or not???
Thnx in advance
|
|
|
|
|
Try this:
<br />
If Me.WindowState = FormWindowState.Maximized Then<br />
'Code goes here<br />
End If<br />
|
|
|
|
|
actually let me explaina bit more, here is the scenario:
My application is running
In the background i have for example, msn messenger, corel draw, a power point presentation running...
usually a power point presentation runs on full screen.
so in my code, i need to determine which application OUTSIDE of my application is currently active IN full mode...i.e i want to determine that powerpoint is running....
thnx in advance
|
|
|
|
|
If it's not an app you write, you'll have to use the WIn32 API functions GetWindow, FindWindow, and/or FindWindowEx to get the window handle you're looking for, then call GetWindowPlacement[^] to get the current state of the window.
You can look on http://www.pinvoke.net[^] for examples on how to call these functions.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dear Sirs,
Could any one help me how to send a String from one application to other application in VB.NET.
Thanking You.
Hariram
|
|
|
|
|
This depends on the other applicaiton. You can't just "send a string" to an application. If it's not expecting it the way you're sending it, you may as well be talking to the wall.
You'll have to explain the situation in greater detail, like how the other app expects this string and what your trying to do with the string, to get any kind of an answer.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have a dll that defines public properties within a class. These will be set from an external application. Within that dll, I am creating another class, and want to either pass in the properties, or make them accesible from the new class. However, when I try to pass in class A to class B, I get into an infinite loop. I am also not able to access Class A's properties from within Class B. Class A is Public, class B is private. Is there something special I need to do to access Class A props from within Class B?
|
|
|
|
|
Good day everyone,
I need to update a record into the database Access via table adapter in VB.net 2005.
The dataset is updated, but the record in the database Access is not.
Could anyone knows how to fix this problem?
Please help.I'd appreciate it so much.
Thanks
(Student_Details:table name)
MyDataSet.Student_Details.Rows(2).Item(3) = "new password"
MyDataSet.GetChanges(DataRowState.Modified)
Student_DetailsTableAdapter1.Update(MyDataSet)
MyDataSet.AcceptChanges()
Me.Validate()
Me.Student_DetailsBindingSource.EndEdit()
Me.Student_DetailsTableAdapter1.Update(Me.MyDataSet.Student_Details)
-- modified at 11:11 Saturday 14th October, 2006
eric
|
|
|
|
|
How can i create file that contains Text and Picture in it...
And than read in vb.net picture in picturbox and text in text box and if something is changed than save it...
|
|
|
|
|
I'm writing an app in VB.net with .NET 2. The application has a main form plus two other forms. When I click Exit-button on the main form, I call Me.Close(). After that MainForm_Closing routine handles the shut-down procedures. Ultimately I call Application.Exit(). The problem is that although the main form dissapears, application (.exe) keeps reserving system resources (95%!). How to close the application completely? I think the problem is that the two other forms are not closed, but hidden.
|
|
|
|
|
on your form put button "Exit" in exit buton type like this:
Private Sub cmdEnd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEnd.Click<br />
Me.Close<br />
Me.Dispose<br />
End Sub
and if you have to save anny data before closing, do it in "Form close event"
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing<br />
'Saving data<br />
System.IO.File.Create(Application.StartUpPath+"\data.ini")<br />
End Sub
------------------------------------------------------------------
Just be shure that u dont type on some other button which is suposed to end aplication that you type "End". Allways use "Me.Close"
------------------------------------------------------------------
Hope it helps! :->
|
|
|
|
|
Are you holding an unmanaged resources open that you should have Disposed? Started any threads that you didn't stop? Used a COM component that you didn't shutdown?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Usually Application.Exit() is enough to close the process completely. If not, try to close all other forums with the .Close method.
|
|
|
|
|
Not exactly. If you leave running resources, like a thread not set as Background, it'll stay running and visible in TaskManager, regardless of how you exit the app.
If you don't do anything like this, leaving unmanaged resources orphaned, then Application.Exit will do what you expect it to.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|