|
Thanks that work out perfectly.
How now brown cow?
|
|
|
|
|
Can someone show me how to access User Account Information Via Win2000 domain?
I'm lost and my boss is riding me about it. Any help would be much aprecciated.
How now brown cow?
|
|
|
|
|
|
Ive been fiddling around with c# for a short ammount of time, but im creating a simple application that i need some check boxes to be checked by default, but as soon as i check them in visual studio and compile all the visual styles on all my buttons and other checkboxes dissapear, and i cant figure out why
any help would be appreciated
|
|
|
|
|
Can you give a *short* code/procedure example so that we might try to reproduce?
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
Create a new c# windows application
in main add
Application.EnableVisualStyles(); before
Application.Run(new Form1());
Then add a checkbox to the form, and set FlatStyle to "System"
compile the program and the checkbox will have windows xp themes, if you set the checkbox to be checked by default, then compile the xp theme is removed...
Do other people get the same problem?
The way i have got around it is to set the checkbox defaults when Form1 loads (Load event), but i would be interested in knowing what causes this problem.
Cheers
|
|
|
|
|
Hi~
I am writing a program (consist of a main exe and some plugin dll) and hope that I can load the different version of dll .net assmebly. I know that if I upgrade the plugin dll (while the main exe version is remained unchanged) which the version is not the same as the version in compile time will cause exception. However, is there any way to overcome the versioning problem? That means I can successfully load the application (.exe) everytime with the dlls which the version may be changed later.
Thanks
|
|
|
|
|
Please show me how to program an application client - server.
user user server application must be control the client application.
Thank in advanced.
Thanks
Rock Throught The Night
|
|
|
|
|
There are lots of different technologies you can use depending on your situation. What are you trying to achieve?
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Hi
(Excuse me. My english is very bad.)
I write a C#.Net program and add "Crystal Report" item to my project.(rpt File)
then create "Setup" for it.(Setup.exe , Setup.msi , Setup.ini)
...
When I install my program in another computer,when my program want to use (rpt file)
a message appear in screen:"Can not find KeycodeV2.dll or invalid Keycode". Why?
Please Guide me.
Thanks.
MMFT
|
|
|
|
|
Hi~
I am writting a windows service.
Can I set the properties such as log on identity in my new windows service in program? Then this property can be set automatically after installation of the windows service.
Also, can I write a UI for the windows service to call? For example, in the service solution, add a new project which contains a form. However, when I create a new instance of the form and show it on the service start (i.e inside the onStart() method, there are 2 statements : Form1 f1 = new Form1(); f1.Show(), the form has been shown but the form hang. The controls inside the form cannot be shown and the title of the form show that the form has no response. Is there anything goes wrong?
|
|
|
|
|
1) No, if you mean you want the installutil command to set the user stuff for you, you can't. Installshield, however, CAN do this for you if you write an install. I don't know whether the bundled Installer for VS.NET has this ability or not (but I doubt it).
2) Yes, you can put a form inside your service. However, there are a couple things you need to do. First, once "installed" go to Services, under Administrative Tools under Control Panel. Then go to your service and bring up the properties, go to the second tab and set the "Allow service to interact with desktop" option to enabled. Now, secondly, you OnStart needs to complete in short time. So, the best way to deal with this, is to put in a timer and then in the handler for Elapsed (or Tick or whatever) put in your form. Start the timer in Onstart and stop the timer once in the timer before showing the form. You should be able to continue normally.
|
|
|
|
|
Yes
Iam using package written by myself to install the service.
Can I set the property?
Also the form still cannot be shown normally
I set a timer and show the form after 10 sec after the service start.
Is there anything not right?
|
|
|
|
|
I tried a TON of different options myself and found NO WAY of installing a Windows Service automatically with those advanced options set (like user/password, etc.) EXCEPT by writing a full installation package in Installshield Developer. I actually had the company purchase Installshield for this purpose.
|
|
|
|
|
ohoh
Also the form still cannot be shown normally
I set a timer and show the form after 10 sec after the service start.
Is there anything not right?
|
|
|
|
|
Dis you set the "Allow service to interact with desktop" in the Properties for your service from within Control Panel/Administrative Services/Services?
Try this: When you create the form, instead of calling Show(), try this:
MyForm.ShowDialog();
MyForm.BringToFront();
|
|
|
|
|
Using ShowDialog() is ok
But why using Show() cause no response of the form?
Thanks
|
|
|
|
|
Hi all,
Is it possible for the following implementation ?
In all window applications, when the user select and right click some text
segment in the document window of the application, the context menu will have a menu item that is defined to be certain operation ? e.g like the "copy" operation for some text segment.
Thanks
|
|
|
|
|
Hi all,
I originally plan to write a https server from scratch in c# (coz I cannot
use those existing https server like IIS), but I find that the
https protocol itself is pretty complicated. So I may step back to implement some encryption measure on the message carried in the http protocol instead of using https server. And I would like to know are there any better method to have security measure on http transfer than implementing the encrytion measure by myself ?
thanks
|
|
|
|
|
Probably not. HTTPS is definately the best way to go. Barring that, however, you're going to need to write some encryption code. Check out:
http://www.mentalis.org/soft/projects.qpx
|
|
|
|
|
Hi,
I am trying to populate my datagrid with thread, since the data is quite large, so the user can still do something else while the data being populated in the background.
The data are retreived from SQL database.
So the form will begin populating datagrid when I click on Reload button.
This is what I tried :
<br />
private void btn_reload_Click(object sender, System.EventArgs e)<br />
{<br />
fthread_parts_daftar = new Thread(new ThreadStart(RefreshGridParts));<br />
fthread_parts_daftar.Priority = ThreadPriority.Normal;<br />
fthread_parts_daftar.IsBackground = true;<br />
fthread_parts_daftar.Start(); <br />
}<br />
<br />
private void RefreshGridParts()<br />
{<br />
ds_parts.Tables["tabel_parts_daftar"].Clear();<br />
partsDA.Fill(ds_parts, "tabel_parts_daftar");<br />
<br />
grid_partno.Refresh();<br />
<br />
fthread_parts_daftar.Abort();<br />
}<br />
This code gave me the following error :
An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an object.
When I removed the thread and just use fill command on the DataAdapter, it worked fine.
So I looked at the threading, and cannot find any mistakes on it.
I am a newbie in C#, and don't have many experience.
Please kindly help me to solve this problem.
Thank you very much in advance.
|
|
|
|
|
|
If child thread cannot fill datagrid, is there someway that I can popup a new window or form saying for the user to wait, while the datagrid is being filled?
|
|
|
|
|
New job, new surprises. This is everywhere in the C# apps here:
MyObject myObject = new MyObject();
if (!myObject.doSomething())
{
LogError(myObject.ErrMsg);
}
doSomething returns false when it encounters an error and saves the error message in the public property ErrMsg, which the caller will use to see the error.
What's wrong with that? Well I must admit I don't really know but it looks wrong to me. Isn't this what exceptions are for:
MyObject myObject = new MyObject();
try{
myObject.doSomething();
}
catch(Exception e){
LogError(e.Message);
}
When I mentioned it I was told throwing exceptions was too expensive. They do have some try/catch blocks but only for exceptions thrown by the .Net framework itself. All application errors are handled with this (at least for me) odd ErrMsg property.
How expensive is it to throw exceptions really? Is it reason enough to come up with a different error handling mechanism? Is it what they are doing such a bad thing that I should push to change it?
Cheers.
|
|
|
|
|
http://blogs.gotdotnet.com/cbrumme/commentview.aspx/d5fbb311-0c95-46ac-9c46-8f8c0e6ae561[^]
Short version, the CLR will always carry the baggage required to allow exceptions, and the cost of Exceptions is only high if they are likely to be thrown frequently inside tight loops. Otherwise, the potential cost of someone deciding they don't need to check the error code somewhere is much higher.
And seeing as you've just started, you should probably read that entire article, and present the most solid case you can, to impress your new employer.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|