|
How do I make my newly completed software a trial version based on number of loading period?
How do I make my newly completed software a trial version based on number of Days?
|
|
|
|
|
|
Am having problem creating a parameter oriented report using crystal report based on SQL Server 2000 and (C#.Net 2005). Such problems includes:
How do I prepare a report to print an employee's record based on the Employee Number?
How do I prepare a report to print employees records whose appointment date falls within a specific date range?
I shall appreciate your quick rsponse.
Thanks
Banjo
|
|
|
|
|
|
How can I insert and select an image from a sql database in my app.
Dad
|
|
|
|
|
simply take a column with type of varbinary or Image (i tried varbinary) and select and insert like other things
Select Image from Customer where Id = @Id<br />
Insert Into Customer (Image) values(@Image)<br />
Update Customer set Image = @image where Id = @Id
...
in ur application create an array of bytes and a memory stream
for displaying image select image and assign it to byte array
and write byte array to stream
MemoryStream m = new MemoryStream;<br />
m.Write(imageBytes);<br />
Image.FromStream(m);<br />
....
and for inserting just read image with binary reader into the array of bytes and insert into Db
may there was some type error sorry i don't write it in visual studio
I Wish the Life Had CTRL-Z
|
|
|
|
|
Hi Friends
Can u tell me how to download file(like txt,doc). In my project i am uploading and downloading Files. I completed uploading but i dont how to download. If i click download button in my form it has to open 'Save As' dialog box and then user have to give filename to save then it has to store.
How to do this one. Pls send me answer.
Thanks in Advance
Prabhakaran
|
|
|
|
|
Hi,
Here you have sample code to open a file using OpenFileDialog:
private System.Windows.Forms.OpenFileDialog openFileDialog;<br />
string sPath = "";<br />
DialogResult dr = openFileDialog.ShowDialog(this);<br />
<br />
if (dr == DialogResult.OK)<br />
{<br />
sPath = openFileDialog.FileName;<br />
}
|
|
|
|
|
When you say download are you saying you want to pull a file from a remote web server (http)? Or from a remote network share? Cause each one uses a different method to retrive the file. Or is the file local on the users system?
|
|
|
|
|
There are several articles here that provide a file downloader control.
Search[^]
Each one is a little bit different and provide for different features, but they all boil down to the same concept. Of course, I'm being a bit biased and will tell you to look at the article I wrote on it first.
An easy to use URL file downloader class for .NET[^]
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
I want to make a chat program that works over a lan but I don't know from where I can start.
Dad
|
|
|
|
|
|
I have created my own custom progressbar controls and i wish to assign them an icon for the toolbox.
I have read everything i found on the net including the super http://www.bobpowell.net/toolboxbitmap.htm[^]
The orginal idea was to assign as an icon the icon of System.Windows.Forms.ProgressBar but i have tried everything and I couldn't do it.
So i decided to add a new icon. That also didn't work. Finally i decided to use the ToolBoxBitmap("FILEONDISK") constructor but that didn't work also.
So two things are happening.
1)It doesn't work which is not probable
2)Something in testing is wrong.
My test procedure has been. Cleaning the project, building in debug and then in a designer of a form looking the toolbox.
Please if i'm doing something wrong tell me.
Also If someone has the solution to pute the .net controls icon in mine please also tell me.
Because it matters here are some details for the project
Default namespace: MyComponents.Windows
Assembly Name: MyComponents.Windows
The control is located in Controls\ProgressBar.cs in the project dir MyComponents\Windows.
Here is the class declaration
{<br />
[ToolboxBitmap(typeof(ResourceFinder), "System.Windows.Forms.ProgressBar.bmp")]<br />
public class ProgressBar:System.Windows.Forms.Control
ResourceFinder is an internal class outside Namespace declaration. As i have understood this should be sufficcient.
|
|
|
|
|
You need also the [ToolboxItem(true)] attribute.
In my tests for this I went crazy because it **seems** to work only if you reference the compiled dll and not with a reference to the project and this is not documented at all.
|
|
|
|
|
This is what I'm using and still it doesn't work.
<br />
internal class ResourceFinder<br />
{<br />
<br />
}<br />
namespace MyComponents.Windows.Controls<br />
{<br />
[ToolboxItem(true), ToolboxBitmap(typeof(ResourceFinder), "System.Windows.Forms.ProgressBar.bmp")]<br />
public class ProgressBar:System.Windows.Forms.Control<br />
In the same solution there is the GUI in another project. O compile the control and VS2005 populates automatically the Toolbar. But the icon is wrong.
|
|
|
|
|
Let's say that ResourceFinder is in the namespace MyDllNameSpace.Images, the default namespace of your assembly (see Assembly properties) is MyDllNameSpace, the bmp should be into Images subfolder (so that ResourceFinder namespace is equal to default namespace + bmp folder):
ToolboxBitmap(typeof(ResourceFinder), "ProgressBar.bmp")]
|
|
|
|
|
i am having a problem with a listview control not showing the color correctly. What is happening is when a form is closed over the listView control the font and color don't show properly. Its kinda hard to explain but Here[^] is a link to a pic of what is happening. The main form that the listview control is on does have the double buffer property set to true. I don't know of any other way to fix it. Any suggestions? thanks in advance
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Create a web service project, or create a web project and create a web service in it.
---
Year happy = new Year(2007);
|
|
|
|
|
I can not create new forms.What reaons could be ?It gives errors like these.
"
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.GetValueNames()
at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.AppendWindowPanes(RegistryKey parentKey, ArrayList windowPanes)
at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.GetRegisteredPanes(String extension)
at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.CreateWindowPane(DesignSurface surface)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.DeferrableWindowPaneProviderService.CreateWindowPane(DesignSurface surface)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.DeferrableWindowPaneProviderService.DeferredWindowPane.EnsurePane()
"
Thank you.
|
|
|
|
|
it would be better if you put here some code..
life is study!!!
|
|
|
|
|
hi all,
i have a multithread program that is used to parse certain xml file and then insert it into database and delete. the xml files comes continuously so i have a timer on every instance of which i check the directory so for each file in a directory i create a theread.
it all works fine as long a i get file of size 1kb but if the file gets larger then it takes time to inset intodatabse and hence to delete it so in another instance of time interval the same file gets repeated. the file can be of larger size up to 5mb now if i disable timer and then process it every things work fine but then other small file also gets stoped as larger files is being processed.
now what shall i do so that i may not have to disable timer and file doesnt get repeted.
public void CallOnCreated()
{
DirectoryInfo dirInfo = new DirectoryInfo(@"C:/datahandler1");
fInfo = dirInfo.GetFiles("*.xml");
threads= new Thread[fInfo.Length];
sFileNames=new string[fInfo.Length];
if(fInfo.Length!=0)
{
for(int i=0;i
|
|
|
|
|
you could rename the files to NewGuid() +".xml" and then act on them. If you control the code that puts them there add some uniqueness to the filename so that things don't get overwritten.
you could also load them into a queue such as MSMQ and act on them later.
HTH
Russ
|
|
|
|
|
It is very simple. First of all, use try catch finally block to handle exceptions. This is important if you want to use the solution suggested by me.
In the CallOnCreated function, stop the timer at first in the try block. Then your current code will be there. Then in finally block start the timer again. this is as simple as it sounds.
Now your code will look like this --
public void CallOnCreated()
{
try
{
<code>Timer1.Stop();</code>
DirectoryInfo dirInfo = new DirectoryInfo(@"C:/datahandler1");
fInfo = dirInfo.GetFiles("*.xml");
threads= new Thread[fInfo.Length];
sFileNames=new string[fInfo.Length];
if(fInfo.Length!=0)
{
for(int i=0;i
{
if(pics.BinarySearch(fInfo[i].FullName)<0)
{
pics.Add(fInfo[i].FullName);
}
}
foreach(string file in pics)
{
Console.WriteLine(file.ToString());
myFile myf= new myFile(file);
if(myf.isUsed())
{
continue;
}
try
{
clsCall objcall= new clsCall(file);
threads[i]= new Thread(new ThreadStart(objcall.getCallClass));
threads[i].Name="thread is " + sFileNames[i];
threads[i].Start();
}
catch
{
}
finally
{
<code>Timer1.Start();</code>
}
}
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I have a function which recursively reads the file names of all the MP3 files on a drive into a text array. The function works well as long as there is less than 16,000 files. On a drive containing 19,700 files the array stops being built at around 16,900 files. I have run the program on several machines with varied amount of ram and the array always stops at about 16,900. Is there some limitation on the size of an array in C# of which I am unaware.
|
|
|
|
|
Nope - I just ran the following test against an array list.
ArrayList list = new ArrayList();
for (int i = 0; i< 19000; i++)
{
list.Add(i);
}
Console.WriteLine("{0}", list.Count);
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|