|
Hi Guys,
I have an Installer object in a program, and i'd like to do some configuration to the installed files during the install process. In order to do this, i need the root directory of the installation, as specified when it prompts the user to enter the path of the install.
Is there any way to get this from inside the Installer? Or do i need to pass in a parameter or some kind of configuration setting?
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Have a look here[^]"> and here.[^]"> Probably it would be best to use the Installer class.
Moim Hossain
R&D Project Manager
BlueCielo ECM Solutions BV
|
|
|
|
|
In the AfterInstall event of an Installer class you can get it from here...
System.Reflection.Assembly.GetExecutingAssembly().Location
|
|
|
|
|
Hi all,
This should be simple, but I can't figure it out.
How do I check if an mdi child is already open?
Here's what my app does
1. User clicks on button1, child1.show()
2. User clicks on button2, child2.show()
3. If user clicks on button1 again, I want to have a msgbox saying child1 is already open. But I need to check first if it is open or not.
How do I do this?
Thanks a lot!!
lyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambo.
|
|
|
|
|
Check the MDIParent's MdiChildren property.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
How about something very simple, like setting a flag when you create an instance of the child form and show it? Then you code can just check that flag to see if the form is already open. When the form closes, reset the flag.
|
|
|
|
|
I suspect you're trying to ensure that you don't open multiple instances of the same mdi form i.e. you want to check if an instance is open and if it is not, you open it otherwise you show the already existing instance. If that is that case, lookup singletons
e.g http://msdn.microsoft.com/en-us/library/ms998558.aspx[^]
|
|
|
|
|
And why are you telling me this?? Try replying to the original poster next time and not someone else giving an answer. That way, he gets the email that says you replied to him. Right now, he doesn't know you replied at all.
|
|
|
|
|
No need to go ballistic. Twas just a mistake. I intended to reply to the original posting. Do you usually go off on simple things like that? Take a pill and chill!
|
|
|
|
|
If you think that was me going off on you, you haven't been around here long enough.
|
|
|
|
|
Example of two buttonclicks in the MDIParent:
private void button1_Click(object sender, EventArgs e)
{
bool open = true;
foreach (Form frm in MdiChildren)
if (frm.GetType() == typeof(Form1)) open = false;
if (open)
{
Form1 frmOne = new Form1();
frmOne.MdiParent = this;
frmOne.Show();
}
else
MessageBox.Show("Form1 is already open");
}
private void button2_Click(object sender, EventArgs e)
{
bool open = true;
foreach (Form frm in MdiChildren)
if (frm.GetType() == typeof(Form2)) open = false;
if (open)
{
Form2 frmTwo = new Form2();
frmTwo.MdiParent = this;
frmTwo.Show();
}
else
MessageBox.Show("Form2 is already open");
}
|
|
|
|
|
I want to assign a stored procedure for an sql datasource. The stored procedure belongs to different user-defined schema rather than the dbo. The stored procedure is being detected but but when I click test it says "Could not find stored procedure 'sp_name'".
|
|
|
|
|
Hey dude, are you aware you posted this in the .NET framework forum? Seems like it should be in one of the Database forums yes?
|
|
|
|
|
First i ve created .xsd file and then add to my project. After that add a crystal report. I am not getting any table in the Database field of the crystal Report and getting error "The Report has no Tables"
<pre> Public Sub sPrintProjectExpenseReport(ByVal Print As Boolean, Optional ByVal findstring As String = "")
Dim ObjDataAdapter As SqlDataAdapter
Dim ObjDataset As DataSet
Dim sql As String
Try
sql= "Select * from project"
ObjDataAdapter = New SqlDataAdapter(sql, ObjCon)
ObjDataset = New DataSet()
ObjDataAdapter.Fill(ObjDataset, "ProjectwiseExpenseReport")
''''export xsd
'ObjDataset.WriteXmlSchema(Application.StartupPath & "\ProjectwiseExpenseReport.xsd")
'MsgBox("Report Exported")
Dim ObjReport As New CRProjectwiseExpense
ObjReport.SetDataSource(ObjDataset.Tables("ProjectwiseExpenseReport")) '' error is here
If Print Then
ObjReport.PrintToPrinter(1, False, 0, 0)
Else
FrmCRViewer.ObjReportViewer.ReportSource = ObjReport
FrmCRViewer.Show()
End If
Catch ex As Exception
MsgBox(Err.Description, MsgBoxStyle.Critical)
End Try
End Sub
|
|
|
|
|
First assign the report like generate report by Datasource
then
Set all the data source by programmatic
it will start work
|
|
|
|
|
plz give a sample. how does this action should be done!!!
i can't get you.
sorry
|
|
|
|
|
is it possible ?
1)can i force stop CLR from doing something? whenever i need.
2) can i force to start clr to work?whenever i need
some one asked me the Question, plz don't tell what does clr do....
|
|
|
|
|
No, you cannot stop the .NET framework. This would even be dangerous, as it would halt the execution of all applications that are using the framework.
Can you tell us what you're trying to achieve? Perhaps there's an alternative method to reach that goal. If the target is a Windows Service, then yes - those can be paused, started and stopped.
I are troll
|
|
|
|
|
I'm trying to get the latest installed version of .Net on a given machine. I've tried a couple of different ways, but it keeps coming back with 2.0, which is curious since I'm running a WPF app on a machine that I *KNOW* has 3.5 SP1 on it.
How should I go about properly retrieving the .Net version?
What happens if a .Net app is run on a system that doesn't have the appropriate version of .Net?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
This registry key seems to have all the infor required - on this system anyway.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Davey's reply covers the first part of your question. More info about the entire detection process could be found here.
As for what happens, in general the program will crash on startup, normally with an incredibly useless message. If you have 2.0 and need 3.0 or 3.5 then it will sometimes crash saying it could not find PresentationFramework.dll or whatever WPF one it is looking for.
|
|
|
|
|
hi all,
m working with some datas from database. i had all the datas in datatable. i want to export this datas to a Excel file. when i tried to add reference Microsoft.Office.Interop, i dont found the reference. bcose of this i cannot use Excel.Application class. Do any 1 have an idea ?
Thanks in Advance..
|
|
|
|
|
Do you have Excel installed on your local machine?
I are troll
|
|
|
|
|
|