|
It matters when u pass such parameter into function. Simple types - like int or string will be passed as a copy, so it means that whatever u change in this parameter in this function, wont be reflected in a real variable, that u passed in this function.
|
|
|
|
|
There are at least 3 types of parameters to a function, not two.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
|
I don't know the absolute definition for structured programming but it goes something like this. Structures can represent both data and programming technique. Data structures are a definition of what something should look like, for example an employee has a name, an address, an age, a gender. These attributes could all be defined in a data structure. Structured programming may take the approach that each section of the program handles specific functions. For example you start off by defining all of your data structures, followed by methods, followed by the main program. You will use coding standards such as specific error handling etc.
Object Oriented programming takes all of the above and encapsulates methods and data into an object. It's main purpose is to "hide" methods and data for the sake of easier access. It's secondary function is to allow for code reuse.
Search the internet for "Gang of Four" "Design Patterns" etc.
|
|
|
|
|
Hi all,
i am working on a desktop application and want to create an oval shaped form.
I read about this in an article and worked as mentioned in that.
i.e. create an image, set the FormBorderStyle to None,
set the transparency key and all those stuffs,
But this doesn't work on 32 bit VGA monitor settings
and if i set the VGA to 16 bit still the shape is not displayed clear
i.e the Borders display some part of the form.
Any ideas about this will be appreciated.
Thanks & Regards,
Pramod
|
|
|
|
|
Please search www.windowsforms.net, You'll find a free library for shapped forms. I have also used it in some of my projects. The correct keyword to search this will be Region Control or Region Master Controls. Of you cant find it. Feel free to conact me at
rizwansharp@hotmail.com
Cheers!!!
|
|
|
|
|
Hi,
I want to send the message to specific users on the network.
Through the active directory, i am getting the all the users on the Domain.
But at that time i don't know the information regarding is he login or not?
Or in what machine he is loggein?
Can i do this?
|
|
|
|
|
You can use windows' net view command with Process class of .Net to dump the all compter's list on the network.
Then use the run the net send command with the help of Process Class to send message to any specific computer.
If you face any problem. Feel free to contact me @ rizwansharp@hotmail.com
Cheers!!!
|
|
|
|
|
I am wanting an XML output from a query of an SQL: database.
My initial idea was to do this via a dataset... but I wasn't sure if .NET or MSSQL had some whizz-bangery built in that alowed you to get XML direclty out of XML?
Any suggestions on the best method of achiving this ?
|
|
|
|
|
|
Depends on your usage. You could use a simple FOR XML cluase on your query. If you wanted to control the output based on a schema then it gets a little more difficult. I think using a DataSet would be the easiest to implement though. Again depending on your usage.
|
|
|
|
|
Hello, I have a big problem to print an html file directly to the printer. I
use an "AxSHDocVw.AxWebBrowser" object. Briefly, this is my code:
AxSHDocVw.AxWebBrowser myBrowser;
...
//this set of instruction prepare my document in html to be printed
string HtmlFileName = "Test.html";
Object o = new Object();
o = System.Reflection.Missing.Value;
myBrowser.Silent = true;
myBrowser.Navigate(HtmlActualFileName, ref o, ref o, ref o, ref o);
// when it is ready the callback goes here
private void myBrowser_DocumentComplete(object sender, System.EventArgs e)
{
myBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref o, ref o);
}
When i call it (ExecWB) it generates an exception "Trying to revoke a drop
target that has not been registered".
Someone know how I can solve this problem, or if there is a quicker o
simpler method to solve it?
Thank you,
Regards,
SD3
|
|
|
|
|
Hi!
All I want is to create a BHO (Browser Helper Object) which among the other things it does, it displays something onto the IE's statusbar. The problem is how to access the rest fields of the IE's statusbar.
IWebBrowser2 gives only access to StatusText which is the first field from the 7 (as I can see in my IE).
I want to add a small icon to a statusbar field and when clicked do some stuff.
thanks,
eLefas
-- modified at 5:27 Tuesday 18th July, 2006
|
|
|
|
|
Hi!
I've got a windows service that can be configured to use an access DB (for smaller installations) or a SQLServer DB (for larger installations).
The problem I'm facing at the moment is that usually after a (re)boot the SQL Server service isn't up and running completely at the moment my service is started.
Since my service is checking some values from the database on statup, it's choking regularly because SQL Server hasn't started my database yet.
Is there a way to influence the order in which services are started?
I've already tried to set my service's dependencies to make it depend on SQLEXPRESS, but to no avail. Looks as if SQLEXPRESS is already started, but my database hasn't been started yet.
Setting the options to restart the service after a failure doesn't work either - it only restarts the service when I shut it down via taskmanager for example, but not if the initial start of the service failed because the database wasn't available yet.
The problem occurrs with SQL Server 2005, I couldn't experience this behaviour with SQL Server 2000. Seems as if SQLServer 2000 started faster so the problem couldn't arise.
Any other idea what I could try?
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Here's a snippet of some code I use to make sure sql server is running (actually msde, but same diff) locally ... maybe it will help:
private void CheckLocalDBService()
{
ServiceController[] services = ServiceController.GetServices() ;
foreach ( System.ServiceProcess.ServiceController cont in services)
{
if (cont.ServiceName.ToUpper().CompareTo("MSSQLSERVER") == 0)
{
SplashScreen.SetStatus("Found SQLSERVER service") ;
if (cont.Status != ServiceControllerStatus.Running)
{
SplashScreen.SetStatus("attempting to start SQLSERVER service") cont.Start() ;
cont.WaitForStatus(ServiceControllerStatus.Running,new TimeSpan(0,1,0)) ;
if (cont.Status == ServiceControllerStatus.Running)
{
_hasLocalMSDE = true ;
SplashScreen.SetStatus("SQL Server Service successfully started") ;
}
}
else
{
_hasLocalMSDE = true ;
}
}
}
}
|
|
|
|
|
Thanks, I'll try this approach.
I thought adding a dependency from SQL Server to my service would eventually have the same effect, but unfortunately, this didn't work. The SQL Server Service had been started before my service was started (the event log entries prove this), but my database wasn't available yet...
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi,
I would like to know if it is possible to save a hashtable or an arraylist in the settings file?!
Thanks
|
|
|
|
|
May i know why u need this.
instead of u can serialize the hashtable object into some XML. and deserialze it whenever u need it.
|
|
|
|
|
Yes, you're right. But I wanted to use the settings file, because I already used it for other user settings and I thought it would be simplier to use only one config file!
|
|
|
|
|
A specified logon session does not exist. It may already have been terminated
this is the message that I am receiving when I am trying to map the other server. What usually is the solution or workaround for this one. I am stuck with it.
Any advice or ideas will help a lot.
Thanks
Dabuskol
|
|
|
|
|
Hi, all!!!
I created a simple WebBrowser, and now I need disable right mouse clicking, copy and select text in this WebBrowser.
If somebody knows how do it, please help me...
Thank's
|
|
|
|
|
Chek if there is a context menu property associated with the browser control. If yes, set the context menu property to null.This will disable right clicks
|
|
|
|
|
hi all,
my local ip is: 10.0.0.9 which i can find easily with reading some documents.
but i want to find how i will learn my outer ip ? (the ip i used when i surf the internet which is: 81.215.85.166 for my pc)
thanks in advance,
bye.
|
|
|
|
|
First of all never post valid ip addresses in the public domain, it can lead to some nasty things.
Since your using an router you'd have to either connect to the router and read the ip address from there or use a web site such as MyIPAddress.com to find it out.
You'd have to use an HTTPWebRequest to get the information, and then weed out your IP.
Unless anyone knows of a different way.
|
|
|
|
|
Look for a network class DNS. some of the methods are gethostbyname etc. You'll see one in there for retreiving your ip address.
|
|
|
|