|
Hi, and thanks for your interest. I tried your suggestion but when I tried to build the control I received an error 'RadioButtonRocLib.RadioButtonRoc.onclick(System.EventArgs)': no suitable method found to override".
|
|
|
|
|
correct code is:
<br />
protected override void OnClick(System.EventArgs e)<br />
{<br />
}<br />
Here 'OnClick' 's 'O' and 'C' character should be in upper case. I don't know why it is not shown correctly.
|
|
|
|
|
Hi,
I have a little problem with a networkapplication i'm creating at the moment. I'm making a program where a windows service (in C#) sends information (username etc) to a java server. I have done some research allready for getting the current username in Windows:
WindowsIdentity temp = WindowsIdentity.GetCurrent().Name;
Now my problem is that i don't receive a logonname on my java server. Instead of that i get the following:
NT AUTHORITY\Lokale service
I tried some other examples (importing dll's etc) for getting the username but always gets the same reply. I really dont know how i can solve this. Does anyone has an idea what went wrong? You would help me alot...
Greetings
Steven Bruneel
|
|
|
|
|
VampireLord wrote: NT AUTHORITY\Lokale service
That is the log on name. It is a limited internal one that windows uses. Your windows service must be running in it. ASP.NET, for example, uses it on certain editions of windows.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Is there any way to get the 'real' windows login name then? Because it's that one i need to be send to my server.
I made my service in Microsoft Visual Studio .NET 2003 and installed it with the tool included in this program. The service is indeed set as 'Local' but i just don't get it why the username is "Local Service" then, it should be the name from my windows account no? *confused*
|
|
|
|
|
VampireLord wrote: Is there any way to get the 'real' windows login name then?
That is the "real" windows account name. I don't think you could login with it. What you are seeing in the Services applet is the friendly name
VampireLord wrote: The service is indeed set as 'Local' but i just don't get it why the username is "Local Service" then, it should be the name from my windows account no?
If it is "Local Service" then the real name should be NT AUTHORITY\LocalService
Find the service, right click select "properties". Go to the "Log On" tab and see what real account name it is using.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Ok, i tried something else now. In the properties of my service (called NWDUpdate) there was a property where the service signed on with the "local service"-account. I switched this to local systemaccount but i still get not the thing i want.
The thing i get now is "NT AUTHORITY\SYSTEM" as user. Isn't there any way to get just my logon name in windows then?
|
|
|
|
|
VampireLord wrote: The thing i get now is "NT AUTHORITY\SYSTEM" as user
That user is quite a dangerous one to use. It has more privileges that the Administrator account. If your service could be compromised....
VampireLord wrote: Isn't there any way to get just my logon name in windows then?
You can elect to run a service under any account you want. But, as Michael also pointed out, Windows Services are run without user interaction. Most services start up before the user even gets a chance to log on.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Because a Windows Service can run when there is no interactive user logged on, then you have to jump through a few hoops to find the currently logged on user.
This[^] may be of some use.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
I tried this now but it still gets me "SYSTEM" instead of my current name i logged on with Don't have any problems with getting computer name etc.. Just need to get my current logonname in Windows in stead of "SYSTEM".. *sigh* ;(
|
|
|
|
|
hi, i am facing this trouble (pretty obvious tho')
im working with a xmldocument, the trick is this is coming with some empty attributes
i want to browse for the empty attributes and to get rid of them
this is the example of what do i receive
and under is what ive tried
it does only displays the name of the empty attribute
but do not know how to erase that from the node
SO MANY THANKS IN ADVANCE, PEOPLE !!!
===========================================================
NOW IS LIKE :
example attrib1="" attrib2="yes" attrib3="no" attrib4=""
node attribX=""
-----------------------------------------------------------
SHOULD BE LIKE :
example attrib2="yes" attrib3="no"
node
===========================================================
<br />
XmlDocument xmlDoc = new XmlDocument(); <br />
xmlDoc.Load("nuevo.xml");<br />
XmlNodeList nodes = xmlDoc.SelectNodes("//@*"); <br />
foreach(XmlNode node in nodes) <br />
{ <br />
if (node.Value.ToString() == "")<br />
{<br />
Console.WriteLine(node.Name.ToString());<br />
}<br />
}<br />
Console.ReadLine();<br />
-- modified at 13:21 Saturday 12th November, 2005
|
|
|
|
|
|
ok my problem is..
when i enter this code inside the load event it returns the name of the form opened before this form..
private void editForm_Load(object sender, System.EventArgs e)
{
MessageBox.Show(ActiveForm.Name.ToString());
}
which returns AdminPanel ( which is the previous form ) but what i want is to see editForm ( which is the form i'm currently opening )
i know its because the form is loading and thats why the currently activeform is AdminPanel but i need to see editForm because:
i have a listbox which gets data from mssql and puts the data to listbox, and someforms of i use are inherited from editForm so while this editForm is loading i want to fetch the data from the unique table so i can see the datas in the listbox after the form is loaded
so my code should be something like this..
private void editForm_Load(object sender, System.EventArgs e)
{
Classes.editClass eC = new HalkDanisv03.Classes.editClass(); // create new object
if(ActiveForm.Name.ToString() == "editEmployee")
{
eC.getStaffUsername(xList,"employeeinfo"); // employeeinfo is the name of the tablename
}
else if(ActiveForm.Name.ToString() == "editManager")
{
eC.getStaffUsername(xList,"managerinfo"); //managerinfo is the name of the tablename
}
}
any help would be great..
thx guys..
good coding
|
|
|
|
|
Would this.Name not work?
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
it works thx so much
|
|
|
|
|
FYI, your form isn't "active" until AFTER the Load event completes.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hye,
for personnal need i started a free Imap library, you'll find it at http://xemail-net.sourceforge.net/ .
This library is functionnal under Linux platform (Mono ) beacause I use Mono.Security to manage Certificats in Ssl connection. So If you use Windows please Help me to port this library to Windows.
Thx
eskan.
|
|
|
|
|
Hi
In VB 6 I used to export crystal report to almost any type
This sample “export report to txt file”
Dim myExportFile As String
myExportFile = App.Path + "\temp.xls"
Report.ExportOptions.DiskFileName = myExportFile
Report.ExportOptions.FormatType = crEFTText
Report.ExportOptions.DestinationType = crEDTDiskFile
Report.ExportOptions.RTFExportAllPages = True
Report.Export (False)
But in Visual Studio 2003 I can't Export to plain txt file
Check out this code,
// Set the Export type, this can be:
// PDF, Excel, Word Doc, RTF Doc,
// HTML 3.2, HTML 4.0 or CrystalReport no txt file
// The path/location where the exported file will be saved
string exportFilePath = MY_PATH+"\\RPTFOH\\Report1.DOC";
// Create an instance of the untyped report object
ReportDocument oRpt = new ReportDocument();
// Load the report from disk
oRpt.Load(@"C:\Test\RPTFOH\Report_1.rpt");
// Set the options for saving the exported file to disk
DiskFileDestinationOptions oDest = new DiskFileDestinationOptions();
oDest.DiskFileName = exportFilePath;
// Set the exporting information
ExportOptions oExport = oRpt.ExportOptions;
// Set the destination options
oExport.DestinationOptions = oDest;
// Set the location, this can be:
// DiskFile, ExchangeFolder, MicrosoftMail or NoDestination
oExport.ExportDestinationType = ExportDestinationType.DiskFile;
// Set the Export type, this can be:
// PDF, Excel, Word Doc, RTF Doc,
// HTML 3.2, HTML 4.0 or CrystalReport
oExport.ExportFormatType = ExportFormatType.WordForWindows;
// Call the Export method to export the report
oRpt.Export();
Please it's urgent,
I need to export Report to txt file.
Thanks in advance.
|
|
|
|
|
Hi!
Because one of the export formats is RTF you could use this to create an rtf file. This file can be read by a RichTextBox and saved as plain text.
Hope this helps,
mav
|
|
|
|
|
Dear Sir and Madam,
In asp.net How to allow user go to a page
when user enter url pattern like the example below?
http://PageToGo.Lantip.com
Thank You.
|
|
|
|
|
Assuming you're not talking about a static hyperlink on a page, but some user-editable URL, and you're okay with a PostBack, then you could do something like:
Response.Redirect(userUrl);
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Can anyone help. Is it possible to obtain the filename of a program that starts your application? i.e. I have written a front end program for AutoCAD and have associated my app with the AutoCAD .dwg file extension. What I want to do is let the user click any drawing file, which will launch my app instead of AutoCAD, let them select options from my app then click a 'go' button to continue to load the drawing. How do I get the file name of the dwg that they clicked in the first place though? I have tried Application.ExecutablePath but this just returns the file name of my app, this is the only thing that prevents my app from working and I can't find an answer on MSDN. It must be possible because apps like word, excel and AutoCAD display the filename that started the app. Please help!!!!!!!!
|
|
|
|
|
You must first disassociate AutoCAD and associate your application with that extension. The recommended way is to use the Win32 API to do that, alternatively, you can do it by manipulating the registry.
The registry setting will be
HKEY_CLASSES_ROOT
.dwg
Default AutoCADXYZ
AutoCADXYZ
shell
open
command
"<AutoCAD Path>" "%1"
Put your application path instead of AutoCAD Path and you should be done.
As you can see, the filename will come in as a command line argument to your application.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks, how do I assign that command line filename to a variable in my application then, so that I can launch AutoCAD with that filename?
|
|
|
|
|
You get command line arguments as parameters to Main, so you can simply assign them to variables there.
static void Main(string []args)
{
string fileName = args[0];
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|