|
Found a site that could help me.
|
|
|
|
|
Hopefully the site you found is good.
Otherwise, here's the conversion produced by Instant C# (I added class headers, etc. to get it into somewhat compilable VB format first):
internal class UIController
{
public delegate void ExitApplicationEventHandler();
public event ExitApplicationEventHandler ExitApplication;
public void ExitApp(object sender, System.EventArgs e)
{
if (ExitApplication != null)
ExitApplication();
}
}
internal class WinForm
{
private UIController controller;
private void FormLoad()
{
this.controller = new UIController(this);
controller.ExitTheApp += new System.EventHandler(this.FormMainExit);
}
private void FormMainExit()
{
this.Close();
}
}
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Instant Python: C# to Python converter, VB to Python converter
|
|
|
|
|
Thnx alot Mr.Roel
I found ur help on click once is useful, but here i have a doubt about my current Error: INVALIDDEPLOYMENTEXEPTION, saying "Application in not installed"
Here i have taken a button[Update] and when user clicks the buttion the functionality should checks the updated version and if available it should download the latest version for that my code is,,
in Buttion
private void button1_Click(object sender, EventArgs e)
{
if (ApplicationDeployment.IsNetworkDeployed)
{
ApplicationDeployment appDeploy = ApplicationDeployment.CurrentDeployment;
bool update = appDeploy.CheckForUpdate();
if (update)
{
UpdateCheckInfo updateInfo = appDeploy.CheckForDetailedUpdate();
string version = updateInfo.AvailableVersion.ToString();
bool updateRequired = updateInfo.IsUpdateRequired;
string minVersion = "";
if (updateInfo.MinimumRequiredVersion!=null)
minVersion = updateInfo.MinimumRequiredVersion.ToString();
bool updateAvail = updateInfo.UpdateAvailable;
long footprint = updateInfo.UpdateSizeBytes;
StringBuilder sb = new StringBuilder();
sb.AppendFormat("Update Version: {0}\r\n", version);
sb.AppendFormat("Minimum Version: {0}\r\n", minVersion);
sb.AppendFormat("Update Required: {0}\r\n", updateRequired);
sb.AppendFormat("Update Available: {0}\r\n", updateAvail);
sb.AppendFormat("Update Footprint: {0} bytes\r\n", footprint);
MessageBox.Show(sb.ToString());
if (updateAvail)
{
bool updated = appDeploy.Update();
if (updated)
Application.Restart();
}
}
else
MessageBox.Show("No updates are available.");
}
else
{
MessageBox.Show("This application was not launched using ClickOnce. Cannot perform update.");
}
}
in PageLoad
private void Form1_Load(object sender, EventArgs e)
{
if (ApplicationDeployment.IsNetworkDeployed)
{
ApplicationDeployment appDeploy = ApplicationDeployment.CurrentDeployment;
this.label1.Text = appDeploy.CurrentVersion.ToString();
appDeploy.CheckForUpdateProgressChanged += new DeploymentProgressChangedEventHandler(appDeploy_CheckForUpdateProgressChanged);
appDeploy.CheckForUpdateCompleted += new CheckForUpdateCompletedEventHandler(appDeploy_CheckForUpdateCompleted);
appDeploy.UpdateProgressChanged += new DeploymentProgressChangedEventHandler(appDeploy_UpdateProgressChanged);
appDeploy.UpdateCompleted += new AsyncCompletedEventHandler(appDeploy_UpdateCompleted);
}
}
}
Hope You got me,
please help me thnx in advance
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
Dear All,
i have developed a desktop based application using C#.NET, which require access to some USB based devices.
I have to use this application on target PCs in which the USB port is disabled by the system administrator.
From the application, i wants to enable & disable the USB drives programatically, so that no other application can use the USB ports, as per configured by the system administrator.
ie, enable the USB port before the application require access to the USB port it & disable it after the use.
I need to achieve the same when the application is running in a login, who doesn't have administrative rights.
Is it possible to achieve the same using .NET framework?
Do any one knows how to implement the same. If so, please inform me.
Best Regards,
Abhilash Chandran
|
|
|
|
|
|
Thank you for ur reply.
But, my requirement is slightly different.
My application has to run on a system in which the USB ports are disabled by the system administrator.
From my application i have to enable the USB drive, so that only a particular USB device must be able to use the USB drive. My application uses this USB device & finally when the application finishes using the USB device, i have to disable the USB drive again from the application.
All the above actions i have to perform in a non adminisrator login.
If you have any information regarding the same, plz let me know
Best Regards,
Abhilash
|
|
|
|
|
Hey,
I'm looking for a good free tool that can generate API docs for mij C# code in VS 2005 (FrameWork 2.0)
NDoc doesn't supports this
thx!
|
|
|
|
|
Take a look at this CP article: Sandcastle Help File Builder[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi All,
I require help with docking windows form right above task bar
Thank you!
"Mess with the Best, Die like the rest"
|
|
|
|
|
Have you read up on SHAppBarMessage ?
|
|
|
|
|
How can i rename a file on ftp with .net1.1 ?
|
|
|
|
|
use the ftp 'rename' command
|
|
|
|
|
where is ftp namespace?!!
what is its dll? and who could i Add it?
|
|
|
|
|
|
I am doing a project in .net c# 2.0 with sqlserver2005
i have a listbox in the form in which i need to display some data from database.
i need to get the loginnames of those clients who have levelid= 2 and 3, and who r logged in.
For levelid and logindatetime are stored in 2 different tables 'login' and 'dealerlogin' respectively.
Now to get his data i queried (in sqlserveranalyzer):
select loginname from login as a, dealerlogin as b where ((b.levelid = 2) or (b.levelid = 3)) AND ((a.logindatetime is not null) and (a.logoutdatetime is null))
But there is some error. There is some problem in joining the 2 diff. clauses of 2 diff. tables.
How can i do this?
Hope to get a reply.
regards nekshan.
|
|
|
|
|
How are the two tables related? You are missing a part of your where clause, the part where you must specify a.[Some Column] = b.[Some Column]
|
|
|
|
|
Can you please give me a regular expression in c# to remove single line comments from a string and its urgent
Criteria
a. // text --- Should be removed
b. file:///text.txt -- should be retained
c }//abc -- hear //abc should be removed
Thanks in Advance
Thanks and Regards
Irsh
|
|
|
|
|
Is there any way to get the country names in dot net using the system time zone. Or else, is there any other way to generate the country names.
Regards,
LEE
|
|
|
|
|
Application.CurrentCulture.DisplayName
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
To use this wat namespace we need to specify
Regards,
LEE
|
|
|
|
|
System.Globalization.CultureInfo.CurrentCulture.DisplayName;
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Hi Friend'z...
I want to update the database table from datagrid itself placed on form. how can i do that?
I placed one datagrid,one button for showing table data in datagrid, one update button for updating database.
what i mean is after the table is shown in datagrid, if we change the data in datagrid, then by clicking the update button, the database table should be updated.
pl help me friend'z.......
|
|
|
|
|
update the data source....
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
if u don't know the answer shut up & keep quiet ok? mind it.
|
|
|
|
|
tamimi-code,
i mean to say u only. ok shut up.
|
|
|
|