|
Hi.i am C# beginner,i have created two folders for my project so other folder is for classes and the other one is for my forms so i am trying to use my classes from another folder but i can't see them.
|
|
|
|
|
You have to devine your namespaces.
using xxx.Yourfoldername;
All the best,
Martin
|
|
|
|
|
What do you mean you can't see them? Make sure of the the namespace for the classes.
|
|
|
|
|
|
When you create a folder and then create a class inside it, Studio appends the folder to the default namespace i.e. Project.Folder . That's why they likely have different namespaces. Change the namespaces or use using statements as mentioned above.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
I'm really piggybacking on what everyone else has said, but I had this issue when I started coding as well, and a visual image helped me out.
Basically, think of it as a tree. Unless you provide links across the branches(using *), all you can reference is what's above you.
--Project1
--Class1
--Class2
--Project2
--Form1
--Form2
You need to do one of two things:
Edit the namespace for each project (can be done through project->properties). Chaning it this way should recursively edit the namespaces of your files. (It does in VS.Net 2005)
or
add "using Project2;" to Project1's classes, and "using Project1;" to Project2's classes.
|
|
|
|
|
|
I used a progressbar in my form and want to show it's value on a lable by this code :
for(i=0;i<100;i++)
{
for(j=0;j<100;j++)
{
}
progressbar.value = i;
lable.Text = i.tostring()+"%";
}
but lable's text doesn't change in progress and just in the end of loop(i) shows the 100%.
any suggestion? thanks.
erfan
-- modified at 7:42 Tuesday 18th July, 2006
|
|
|
|
|
Try to run your procedure in other thread.
This article will help you to do it.
My english is not so good. Please, correct my errors.
Best regards, Alexey.
|
|
|
|
|
Hi,
just a short hint. Maybe it is not the best possibilty (running an own thread is much better), but try to use
Application.DoEvents()
after you reset the text of the label to its new value.
Regards
Sebastian
|
|
|
|
|
This is due to UI doesn't get time redraw its area
do this
<br />
lable.Text = i.tostring()+"%";<br />
this.Refresh();<br />
|
|
|
|
|
It is enough to refresh the label.
label.Text = i.ToString() + "%";
label.Refresh();
|
|
|
|
|
thanks.
this is working.
erfan
|
|
|
|
|
hi all,
i store date as text format in ms access. (for example: '18.07.2006' is stored in a text field in my database)
but when i want to do some search according to date i want to use records in that field as date ???
i convert data (user entered dates to compare with the dates in my database in order to do some search) entered in textboxes into datetime but dont know how to tell the my program to behave as if the dates (which hold in text fields) in my database also are 'date'.
hope that i am clear enough.
thanks in advance and bye.
|
|
|
|
|
|
Hello there,
I'm looking for a method to convert an object to Guid type and vise versa.
Thanks.
|
|
|
|
|
???
object can be everything. but guid is only a number with a format
"{15B37BBE-CE65-4a4c-83BD-79906975D223}".
What kind of object do you want to convert ?
|
|
|
|
|
hi frnds i need a windows application project on hr/payroll in C#
if any one can help me
|
|
|
|
|
|
Try to write the software of your own.
|
|
|
|
|
Are you asking for someone to write it? Email me, we'll discuss contract terms
|
|
|
|
|
Best Regards,
Apurva Kaushal
|
|
|
|
|
I do have an hourly rate.
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
|
|
|
|
|
hello,
I'm french so excuse my english
I am developping an application which can take photos from a webcam with WIA
and send it to a ftp.
but I saw one big bug => all photos taken from webcam have been saved to
svchost
svchost become big => more than 100mo if I let the program run
I don't know how to release memory
I have tried to release memory :
-----------------------------------------------------------------------------------------
item.ExecuteCommand(WIA.CommandID.wiaCommandDeleteAllItems);
item = video.Device.ExecuteCommand(WIA.CommandID.wiaCommandDeleteAllItems);
-----------------------------------------------------------------------------------------
and to capture some image :
-----------------------------------------------------------------------------------------
item =
video.Device.ExecuteCommand(WIA.CommandID.wiaCommandTakePicture);
imagefile = item.Transfer(WIA.FormatID.wiaFormatBMP) as
WIA.ImageFile;
imagefile.SaveFile("./" + bmpf);
imagefile = null;
-----------------------------------------------------------------------------------------
item as WIA.Item
imagefile as WIA.ImageFile
video as AxWIA.AxVideoPreview
thanks
I hope you able to help me
|
|
|
|
|
How about item = "" or item = null?
|
|
|
|