|
Richard W Allen wrote: ChartGraphics.Dispose();
You shouldn't be disposing objects you didn't create by calling 'new' on them
|
|
|
|
|
leppie wrote: You shouldn't be disposing objects you didn't create by calling 'new' on them
right, especially if you add "... unless you obtained them from a method with Create in
its name, as in CreateGraphics".
|
|
|
|
|
leppie wrote: You shouldn't be disposing objects you didn't create by calling 'new' on them
Many many thanks - that did the trick!!
|
|
|
|
|
I'm new to C# and use VS Express 2005 and SQL Express 2005.
Question:
1. I have added Employee.mdf database via Project->Add new item->SQL database
2. Using the following, but see strange things:
SqlConnection sqlcon = new SqlConnection(connectionstring);
- If I use connectionstring as:
"Data Source=.\\SQLEXPRESS;Initial Catalog=Employee;Integrated Security=true; User Instance=True"
I get error like: User domain/user passoword failed! No remote access etc strane errors
- If I use connectionstring as:
"Data Source=.\\SQLEXPRESS;AttachDbFilename=\"C:\\Documents and Settings\\user\\My Documents\\Visual Studio 2005\\Projects\\MyDatabase\\MyDatabase\\Employee.mdf\";Integrated Security=True;User Instance=True"
Then it works fine!
But in every book I see, they give the above 1st case but it does not work for me? Any idea? Is it fine to explicitly using the database path in C# project?
|
|
|
|
|
|
How to setup user in SQL with WIndows login credentials?
|
|
|
|
|
Hi,
Mmm wasnt sure what to put in the subject lol anyways,
Im busy with a web app and one of my pages contain quite a few controls for input.
There are a few conditions of when certain controls need to be visible or not.
Can anyone please give me some advice or suggestions on how to write proper code in working with conditions in this situation instead of hardcoding everything in a messy way.
Please let me know if I didnt explain properly.
Thanks
|
|
|
|
|
This is not the web dev forum, but you can set the Visible property of your control to false and true as you please.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Will the conditions be known only at runtime?
I recently finished working on web app that needed to be used by different companies with specific controls that could be visible depending on who the company was. The route chose was to create an xml file using control "id" & "visible" as fields. Before rendering the page I call on the xml, loop through the controls collection & set their visible properties. Bit of an ugly hack but it works pretty well.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
Hello everyone,
I have an Windows Application which loads images from a remote database into a Datatable. The images from the DataTable are then used for Button images. I was wondering if it is possible to Fade in and Fade out the images when are going to be displayed as the button image?
Thank you very much and have a great evening.
Khoramdin
|
|
|
|
|
I think the neat solution for this is creating a custom control which allows transparancy. You can then create a paint event which will draw the image on your control, and use transparancy to create the fade effects.
|
|
|
|
|
I think the neat solution for this is creating a custom control which allows transparancy. You can then create a paint event which will draw the image on your control, and use transparancy to create the fade effects.
Or ofcourse use the Picturebox control and create / use the opacity property
|
|
|
|
|
Hello,
A quick and dirty solution, would be placing a boarderless Form over the Image and play around with the Opacity property in combination with a timer.
All the best,
Martin
|
|
|
|
|
This is trivial in WPF (it can even be done from markup if you prefer), but then it obviously requires .NET 3.0. You can easily create a custom button control in WPF and host it in the WinForm application using ElementHost. If .NET 3.0 is not an option, lower the expectations of how fancy the UI will be - WinForm is terribly outdated.
|
|
|
|
|
hello iam a fresher
my problem is if i click previous button first time it is going to next question after clicks the previous button it is going to previous question . for example at 8th question i clicks on previous button it is going to 9th question then second time i clicks on previous button it is going to 8 th question then 7th then 6th then 5th...........
<pre>
{
if(dg1.CurrentPageIndex < 1 )
return;
else
if (dg1.CurrentPageIndex > 0)
{
dg1.CurrentPageIndex -= 1;
SwitchLebel(dg1.CurrentPageIndex);
}
</pre>
is it correct or not
srinivas
srinivas
|
|
|
|
|
the code in your snippet is redundant,
if (dg1.CurrentPageIndex > 0)
{
dg1.CurrentPageIndex -= 1;
SwitchLebel(dg1.CurrentPageIndex);
}
will perform tha same task; anyway, I cannot see errors inside.
What about SwitchLebel (maybe the error is there...)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
srinivassam wrote: is it correct or not
Since you're asking here, probably not.
Did you look inside SwitchLebel ? (It should have been SwitchLabel )
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
How to view XSD file in a tree structure?
How to save a tree stucture to xsd file?
dji67ik
|
|
|
|
|
I tried to get the windows time (W32Time) from the services through the ServiceController class but i am unable to get only one service sot i tried to get through the process class but it is giving the length of the array is 0 when i used GetProcessesByName("W32Time").
Can you help me to get only that service alone.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Maybe the servicename is diffrent from the name listed in the Services window from Windows. You'd better list all services first and then find out which name to use for the service you want.
|
|
|
|
|
I looked in the properties of the service and they have specified "W32Time" as the service name.
I tried with the same.
Otherwise can you give me how to extract only one service from the services
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
there is a service named "w32time"
|
|
|
|
|
Luc Pattyn wrote: there is a service named "w32time"
I know it pa, but i want to get on;y that service alone not other services i.e is requirement
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi friends!,can you tell me how can I use directory searcher..
Hi,Im Razana
|
|
|
|
|
Hope the Article by Nikita D. Sinelnikoff here[^] in CP will help you.
Regards,
Satips.
|
|
|
|