|
No, you can't. The .EXE file remains locked open so long as the code in it is loaded into a process. You'll have to quit and have an external process delete this .EXE.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
is there a way that you could build an exe file into memory as a separate process and then have it wait for the parent process to die off and then delete it then end and kill itself from memory?
|
|
|
|
|
Well, you can load a new Assembly from an array of bytes, documented here[^]. The bytes can either be sourced from emitted code or from data in a file.
The problem is creating an entirely new Process out of that Assembly. I don't know how you can get from a loaded assembly to a whole new process.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi folks,
I'm in the process of writing an application to check for the existance of files and their sizes to replace a program we have at work which doesn't work (and which the source code has been lost).
Now I've recently started using Visual Basic 2005 Express Edition. I have a little bit of experience of VB6 but I'm struggling to get my head around the way some of the things are done in VB.Net.
The program is a console program which is supposed to sit in the background until a certain time and then start performing commands. I would like to add a couple of forms that can be used while the console application is running.
I found an example of code on a web site (can't remember the source sorry) which shows the form I want but then transfers execution to that form and stops running anything in the console window. The code I have is below...
<br />
Application.Run(New Form1())<br />
Now I would like the form to show on the screen and be active but also have things running in the background. I guess it would be classed as having two tasks running at once.
I'm just wondering if anyone knows how I can acheve this?
The idea is the end user can use things on the form while other tasks run on the console window in the background. At the moment though I can only have the console window doing something OR the form active, not both at the same time.
Sorry if this is a bit vague. I've spent the past hour searching Google but I can't seem to find anything obvious.
Could anyone suggest anything?
Regards,
Rob
|
|
|
|
|
You'd have to launch your forms on their own seperate threads. But, if you're going to use forms, you'd be better off starting from a Windows Forms app and including support for a console, instead of a Console app written trying to do forms.
It's easier to launch the Console portion of your app on it's own thread than it is to launch the Forms portion.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ahh I see. Is it easy to open a console window from a Windows Forms app?
Thanks for the advice. Luckily I haven't got very far yet with the app so I'll start again with a new Windows Forms app.
Regards,
Rob
|
|
|
|
|
Try reading this[^] article for an example.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am written a program in VB.NET 2005 and have used Crystal Reports XI release 2 Developers Edition for reports. All working as expected.
My problem is that when I include the Crystal Reports Merge Modules into my Install Sheild project, package up and the run the MSI on a PC, the installer creates several folders in the root directory contain several files that relate to Crystal Reports.
These folders include html, css, images, js and prompting and seem to relate to some web functionality of Crystal. (Not that I require any web front end to my project).
Surely they should not install to the root folder? Can anyone point out my mistake?
Thanks
Steve Jowett
|
|
|
|
|
i maked visual basic component with a component class i add a texbox and modify some properties a methods and know i wan to know how can i make a .dll from this component because i want to add it to my tool tabs. ????
Mago R. Vasquez (Gbyte)
|
|
|
|
|
Did you build it as part of a windows class library?
If so, locate "Build" on the VS menu bar, click on it & then click on "Build solution". You'll find the dll in the solution bin folder.
|
|
|
|
|
How Can I Get Cpu Name???
|
|
|
|
|
FriendlySoluations wrote: How Can I Get Cpu Name???
Me.Text = System.Environment.MachineName
Hope this helps
clanguage
|
|
|
|
|
I think he mean the name of the actual CPU, not the name of the machine in which the CPU resides.
|
|
|
|
|
Colin Angus Mackay wrote: How Get Cpu Name
You might be right. I never thought about the chip.
clanguage
|
|
|
|
|
WMI... Alway's slow but.. somthing like this..
Imports System.Management
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ConfigNamespace As String = "\\.\root\cimv2"
Dim query As String = "select * from Win32_Processor"
Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher(ConfigNamespace, query)
Dim collection As ManagementObjectCollection = searcher.Get
For Each item As ManagementObject In collection
For Each prop As PropertyData In item.Properties
Try
Console.WriteLine(prop.Name + ":" + prop.Value.ToString)
Catch gExVar As Exception
End Try
Next
Next
End Sub
|
|
|
|
|
How can i use the project(Windows Application) made by vb.net(use Ado.Net) depend on SQL Server2000 in client pc without install SQL Server2000 in the client pc?
In other words I want ask if there is any way in which we will not install SQL Server2000 on client pc and the program will run properly?
|
|
|
|
|
you just need to change the connection string for the server. So save your connection string in app.config file and use that. or read it from any XML or text file from client machine
|
|
|
|
|
If your application is written dependant on an SQL Server backend, you'll still need an instance of SQL Server running somewhere, either one on the client PC or one on another server. On the local machine, you can install the desktop version of SQL Server. For SQL Server 2000 it's called MS Desktop Engine, or MSDE[^]. For SQL Server 2005, its called SQL Server Express[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
In .net 2005 we have a class "Compression" which performs single file compression and decompression
Is there a way in which i can compress and decompress more than 1 file at once just like WINZIP and WINRAR.
or is there another way in .net to compress and decompress multiple files in a single file.
|
|
|
|
|
You have to supply your own wrapper around a file with multiple compressed streams, otherwise known as a ZIP file. You can find an example of such here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I need an suggestion, I am trying to send an mail (client will send mail in this format) from Outlook express in an specified format as,
Client Name : client name
Urgent : Yes
Date_planning[dd/mm/yyyy] : 29/08/2006
Analyses : Any text
In my application i am reading that mail and has to split it into four coloums i.e client name,Yes,29/08/2006,Any text.... seperatly, finally i will store it in the database with field names as cliend_id, status,date_plan,analysis.
I am using asp.net to split this and i am using ":" as starting index "&vbcrlf" as ending index such i am reading the in between string. But when i implement it i am facing an problem, it's the whole body content is coming as string and storing in the first coloum itself i.e as "Client Name.................. Any text"
So i cant able to split it, can any one suggest an way to send the mail such that i can seperate easily, else how to spli the recived mail.
plz guide me.............
Thanks in advance
Regards
Exelio
|
|
|
|
|
hi
first split the string with "vbcrlf" ,so you will get an array like thins :-
strArray(0)="Client Name : client name"
strArray(1)="Urgent : Yes"
strArray(2)="Date_planning[dd/mm/yyyy] : 29/08/2006"
strArray(3)="Analyses : Any text"
.
.
.
strArray(n)="anything..." as mush as you have lines.
then loop through the strArray and split each row with ":" and you will get new array like this :
strNew(0)="Client Name "
strNew(1)=" client name"
strNew(0)="Urgent "
strNew(1)=" Yes"
hope this will help you
Tamimi - Code
|
|
|
|
|
hi,
Thanks for your reply, i too tried this way first but there was an problem, when analysis contains more than one line like:
Client : volf
Urgent : Yes
Date plane [mm/dd/yyyy] : 10/10/2006
Analyse : This is the test mail from client regarding the template testing in oour test server
then it treates the next line as seperate one. But the second line is the continuation of the first line.
Plz suggest me how to over come this problem..........
by
Exelio
|
|
|
|
|
hi
i just want to say if you know in advance that there are 4 column exactly
then, starting from the 4th Iteration Consider all thr rest lines as part of the analyse column.
feel free to ask again
Tamimi - Code
|
|
|
|
|
Hi,
Ya your right, I too said this my PL, but my bad time he didn't accept this. I has to try for some other options.
Thanks very much
Bye
exelio
Know is Drop, Unknown is Ocean
|
|
|
|