|
Hi,
I am Developing an windows application i want when ever my application runs then form opacity will increase slowly from 0 to 100% on timer tick.
Thanks & Regards
|
|
|
|
|
In the event handler of the timers tick event increase opacity of the form according to your needs. Make sure you don't increase it after you reach 100%
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hi, I'm developing a pocket pc(windows ce) application in visual studio with c#.
I build my forms controls(tabs,literal,textbox)from c# code (I parse an xml file and generate in on fly).
In whic mode i can put my objects in precise mode inside form?
For example:
literal -> textbox
literal -> combobox
literal -> textbox
ecc..
(2 cols and n rows ecc )
In compact framework i can't find Form.TablePanel.
There are other controls that allow it?
Suggestions?
Thanks!!!
|
|
|
|
|
Hi,
I want to do a peculiar thing..
I want to run my console application in my system tray..
Can anyone tell me how to do this?
(My console app is more than a normal console app, it does many things in background, so want to do this)
Thanks..
modified on Friday, May 23, 2008 4:15 AM
|
|
|
|
|
When i built a Setup Project(C#.NET), i get a setup.exe. After that , Explorer -> right click(on the setup.exe) -> Properties -> Version Tab.
There're some information within the version tab including File Version, Company, Product name, Product Version , etc.
- Could we change all of those information (Before rebuilding Setup Project) ? and How/Where to change it ?
Thank
^^
modified on Friday, May 23, 2008 3:43 AM
|
|
|
|
|
bug_aonz wrote: When i built an Setup Project(C#.NET),
Do you mean you created a C# project to create a setup program? Or do you mean you used the setup project template (which is language neutral, so C# really has nothing to do with it).
Since you indicated C# specifically and you posted this in the C# forum, I'm going to assume you wrote your setup.exe in C# rather than use the setup project template.
The values that appear in the properties are typically set in the assemblyinfo.cs file. There are a number of assembly wide attributes that are set in that file that will indicate the values that will appear in the properies.
|
|
|
|
|
Yes, I'm using C#.NET Setup Project to create a setup program.
I've already change some info in the assemblyinfo.cs . it've just shown in the properties of my application.exe file (executable file of my application) but it didn't change the properties of setup.exe.
Why?
^^
|
|
|
|
|
bug_aonz wrote: C#.NET Setup Project
That is still ambiguous because no such thing exists.
|
|
|
|
|
Ok.
If you were me, how could you have this thing(change properties of setup.exe) done on your own way?
thank for your answer
^^
|
|
|
|
|
Hi!
The setup.exe is just a bootstrapper for the actual msi file and you cannot modify its properties.
What you can (and should) modify are the properties of your msi file, although by default explorer shows the PackageCode (I think) as the version of your setup, not the Version property.
If you want the product version to be visible in the default file info, you could add it to your setup's title.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I have to write an application that read a file and performs some action on it..
The file can be quite be so i have to read Xsome bytes at a time and perform the action on it...
How many nbytes recommended to read in order to achive max performance?
Thnaks
|
|
|
|
|
I would say someting big, not something tiny. How big is the file ? Think about it in these terms:
1 - you don't want to do more IO than you need to
2 - the more you read at a time, the more memory you will use.
You need to find a balance.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I know that a Windows service can interact with the desktop by manually checking the "Allow Service to interact with desktop" option in the properties of the service..
What I want to know is that how can we do it programmatically?
|
|
|
|
|
Hi,
You can do it easily using ServiceInstaller's Committed event like this :
private void MyServiceInstaller_Committed(object sender, InstallEventArgs e)
{
// Allow automatic interaction
ConnectionOptions options = new ConnectionOptions();
options.Impersonation = ImpersonationLevel.Impersonate;
ManagementScope mgmScope = new ManagementScope("root\\CIMV2", options);
mgmScope.Connect();
ManagementObject wmiService = new ManagementObject("Win32_Service.Name='" +
MyServiceInstaller.ServiceName + "'");
ManagementBaseObject InParam = wmiService.GetMethodParameters("Change");
InParam["DesktopInteract"] = true;
ManagementBaseObject OutParam = wmiService.InvokeMethod("Change", InParam, null);
}
|
|
|
|
|
Dear All,
(C# VS 2005)
I need a function to determine
If OS used is windows 2003 or 2008 ??
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
System.OperatingSystem osInfo =System.Environment.OSVersion;
I believe there's a name property, but also, you should be able to find out what the major and minor versions for both those OSes are ( although I confess that googling didn't get me those numbers in a hurry, but older samples that only go to vista )
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello I have read this exmple
http://www.codeproject.com/KB/system/osversion_producttype.aspx[^]
and read GetOSName()
else if(osInfo.Version.Minor == 2)
{
osName = "Windows Server 2003";
}
I dont know if u put
else if(osInfo.Version.Minor == 3)
{
osName = "Windows Server 2008";
}
is this right ???????????????????????????
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
|
I am trying to retrieve a website's favicon using the following script...
public String FaviconPath(csExWB.cEXWB web)
{
string Host = web.LocationUrl;
IHTMLElementCollection collect = web.GetElementsByTagName(true, "link");
foreach (IHTMLElement element in collect)
{
if (element.getAttribute("rel", 2).ToString().ToLower() == "shortcut icon" ||
element.getAttribute("rel", 2).ToString().ToLower() == "icon" ||
element.getAttribute("type", 2).ToString().ToLower() == "image/x-icon")
{
if (element.getAttribute("href", 2) != null)
{
return element.getAttribute("href", 2).ToString().ToLower();
}
}
}
if (Host.EndsWith(".com/") || Host.EndsWith(".net/"))
{
return Host + "favicon.ico";
}
return null;
}
public Image SiteFavicon(csExWB.cEXWB web)
{
string iconPath = FaviconPath(web);
Stream myStream = null;
WebRequest requestImg = WebRequest.Create(FaviconPath(web));
requestImg.Timeout = 10000;
WebResponse response = requestImg.GetResponse();
if (response.ContentLength > 0)
{
myStream = response.GetResponseStream();
}
Image i;
i = Image.FromStream(myStream);
Program.Cache.Insert(FaviconPath(web), i, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes( 60 ));
if (i != null)
return i;
else
return Phoenix_Explorer.Properties.Resources.defaultpic;
}
and am wondering why i still cannot achieve a website's favicon unless the site URL ends with ".com/" or ".net/". Is this script wrong in any way?
And also, i was wondering how i would get the website's hostname ( like the property in the Microsoft Webbrowser control ) as i am using the CsEXWB control ( http://www.codeproject.com/KB/miscctrl/csEXWB.aspx )
and i currently doesnt have any properties or methods to get the host.
Also, is there a common IHTMLelement used to store the site's homepage?
|
|
|
|
|
Please help!
I keep getting the following error message:
Cannot implicitly convert type XAPI to XAPI. An explicit convertion exists (are you missing a cast?)
I have declared a variable of type XAPI.
My line of code looks like this:
T = AccpacObject.OpenView("SomeValue", "SomeValue");
Illegal Operation
|
|
|
|
|
I'm not sure how you've set up this variable of yours. But did you try to just cast it for now:
T = (XAPI)AccpacObject.OpenView("SomeValue", "SomeValue");
The only way i can see this happening is if you have two classes in two different places with the same name, and it won't convert between them because they're not actually the same class (even if they contain exactly the same stuff).
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Do you have more than one XAPI class ? What is AccpacObject ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I think AccpacObject.OpenView returns a object of type interface and you have to cast it to class type.
|
|
|
|
|
On Pete's recommendation I'm having a play with MoQ. Just for S&G I have an IPerson which defines FirstName, LastName, and DateOfBirth and a Suspect class which implements IPerson.
Now, I want to (for arguments sake) "test" something on this class, namely that if I set FirstName to something, it returns what what it was setup with:
var mockery = new Mock[Suspect]();
mockery.Expect(x => x.FirstName).Returns("Martin");
Assert.AreEqual("Martin", mockery.Object.FirstName);
The test fails because mockery.Object.FirstName returns null.
However this test (based on the interface) passes:
var mockery = new Mock[IPerson]();
mockery.Expect(x => x.FirstName).Returns("Martin");
Assert.AreEqual("Martin", mockery.Object.FirstName);
Why does this pass? What am I missing? Why can't I mock concrete classes, rather than interfaces, especially if a class doesn't implement an interface?
*Note - Ignore the square brackets, they're supposed to be < and > symbols but they ain't working for me!
|
|
|
|
|
martin_hughes wrote: Why can't I mock concrete classes
Try this:
"I've seen better looking asphalt functions!"
Or in a high-pitched whiny voice:
"Look at meeeeee! I'm concreteeeeeete! Neener, neener!"
"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
|
|
|
|