|
hi!
whenever an click event of any control occurs in my C# asp.net web application(visual studio.net 2003), form load is called again and all controls are initialized. Like i m using check box in my grid and want to capture my check state against any button click. But when i click button then form is again loaded and all check boxex became converted in their default state(which is unchecked).
therefore the following condition in my button click event alwayx bacame false coz at that time no check box is in checked state.
the condition is
if(checkbox.checked)
i have many other problems also due to this from loading against any event. Therefore can u tell me how to stop this loading every time.
|
|
|
|
|
Hi,
Are you controlling if the PageLoad is from a postback (IsPostBack porperty)?
|
|
|
|
|
Check whether viewstate is disabled at any level.
Control/Page/Web.Config
|
|
|
|
|
Hi,
I have a C# appln, which contains a explorer style Tree view. Whenever any folder or file is created in the Windows Explorer externally, my application Tree view has to update. Is there any windows file system refresh event or message is there to call my method to update Treeview.
I hope you understand what I mean.
Thanks in advance...
Best Regards,
Sunil Jampa.
|
|
|
|
|
|
Hello,
// Create a new FileSystemWatcher and set its properties.
FileSystemWatcher watcher = new FileSystemWatcher();
watcher.Path = args[1];
/* Watch for changes in LastAccess and LastWrite times, and
the renaming of files or directories. */
watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
| NotifyFilters.FileName | NotifyFilters.DirectoryName;
// Only watch text files.
watcher.Filter = "*.txt";
// Add event handlers.
watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.Created += new FileSystemEventHandler(OnChanged);
watcher.Deleted += new FileSystemEventHandler(OnChanged);
watcher.Renamed += new RenamedEventHandler(OnRenamed);
// Begin watching.
watcher.EnableRaisingEvents = true
Regards ,
nishu
|
|
|
|
|
Hi Nishu,
Thanks for the reply!
Actually, whenever any file or folder is created/deleted in any drive irrespective of path in the Windows explorer, my method has to update for that event.
Here Path you mentioned is particular to a specified directory, if i am right. But external changes to the Windows explorer, I dont know which file/folder in which directory, it was changed.
How can I update my Tree view, if any Windows Explorer File System refreshes. I need a standard File System Refresh done by windows explorer.
Thanks again in advance...
Best Regards,
Sunil Jampa.
|
|
|
|
|
Hello,
This is the only way I can think of right now ,but I think you should select path as a root path for each drive that will take care of all the events unde.Have you try that.??
Regards ,
nishu
|
|
|
|
|
hi,
i am creating a editor in RichTextBox.
I want to create a pop-up menu when user clicks the Mouse Right button for copy,cut,paste.
can any one help me
Thank you
Prasad
|
|
|
|
|
Hello,
Use contexMenu from form controls.
Regards ,
nishu
|
|
|
|
|
hi,Nishu
wheather it is control in c#.
may i know the syntax pls
With Regards
Prasad
|
|
|
|
|
Hello,
Ya dear just drag and drop from form controls.
ContextMenuStrip
or create new
ContextMenuStrip cmenu = new ContextMenuStrip();
Regards ,
nishu
|
|
|
|
|
hi,Nishu..
I created a object of context menu
then how to add edit main menu to that one?
Thank You
Prasad
|
|
|
|
|
hi,
whenever i compile a project i want a form to be in the same position,when it is loaded.
User should not be able to move the Form at run time.
I set the Locked property to True still it can be moved at runtime.
Pls help me
Thanks
Prasad
|
|
|
|
|
Lock property works only in designer.
If you want to set the location, then get the event "LocationChanged" from the form, and every time the form moved, then set the location back to default location.
For example :
private void Form1_LocationChanged(object sender, EventArgs e)
{
this.Location = new Point(10, 10);
}
|
|
|
|
|
hi,
Thank you it is working
With Regards
Prasad
|
|
|
|
|
If you reset the location in the locationchanged event then you can see the form is moving to new position and then resetting to old position. But ideally form should not move at all at first instance. This could be obtained by trapping the windows message for form move. Try following code and it will not allow the form to move at first instance. However pls test the things after adding this piece of code..
protected override void WndProc(ref Message m)
{
const int WM_NCLBUTTONDOWN = 161;
const int WM_SYSCOMMAND = 274;
const int HTCAPTION = 2;
const int SC_MOVE = 61456;
if((m.Msg == WM_SYSCOMMAND) && (m.WParam.ToInt32() == SC_MOVE))
{
return;
}
if((m.Msg == WM_NCLBUTTONDOWN) && (m.WParam.ToInt32() == HTCAPTION))
{
return;
}
base.WndProc (ref m);
}
|
|
|
|
|
hi,
may i know what are these code and which event should i add these code
what m indicates
pls.
With Regards
Prasad
|
|
|
|
|
C#
Visual studio 2003
Os: XP
I have put 3 gif file in a ImageList.I want to place the
picture from ImageList and put over the picturebox.
I can place the picture and display
the picture is ok.But In the ImageList all are Animated
file that file is not animated in the picture box.the probelm
is only taking the picture from the ImageList.Anybody help me.
I hope to get soon.
MaxWorld Technology Pvt
|
|
|
|
|
Hi,
Is not the better solution, but try to put the images in a label control.
|
|
|
|
|
This is my first time posting to something like this so bare with me.
I am using Visual Studio 2005 and C#. I've looked everywhere and I can't seem to find a way to do what I want. The goal is to be able to access a GIF file's color table. I'm trying to reduce the number of colors in that image and the best way to do that I am assuming is by accessing the color table and taking the top X number of colors and applying that to the image. I have the applying part working, but the problem is getting those colors to begin with. Currently I am going through the entire image(which is required for my purposes to be 2400 px by 2400 px) and finding the color of other pixel on every other line. This takes a little time and isn't quite as accurate as I would like.
Thanks!
|
|
|
|
|
hi every one..
i'm presently doing a project to fetch the information about a particular url,
if the particular site is working fine then i have to get the information lik ok, and how long it takes to load the page..
if any error is occured then i want the info of wat kind of error has occured..
so plz send me the code and hepl me... i need this to be done using the c#.net..
bye.
vijay
vijay
|
|
|
|
|
Hello,
For that you should send http get to that perticular URL and check the timmings for the http reponse from that perticulatr URL.From that you can actually retrieve the information you want.for code you have to do implement for your self , or find some similar kind of tools from the web
Regards ,
nishu
|
|
|
|
|
actually i don kw how to check the particular timing that take for the url.. how to get that info
|
|
|
|
|
Hi all,
I have been working on an application that records audio off of a soundcard. I use the winnm.dll to give my application this functionality.
The problem I am encountering is when I call WaveInOpen, it is giving me an error 4, meaning MMSYSERR_ALLOCATED. I cannot find any rhyme or reason why I am receiving this error message.
I am not doing any TAPI or modem functionality, just using functionality that I discovered on the internet for recording of sound from the soundcard. The WaveInOpen call is a standard call.
One rather funky situation that I have encountered is on the lower end soundcards, I am not receiving this error. On higher-end cards ($300+), I am receiving this error.
I am running XP, written in C# with VS2003.
Any suggestions?
|
|
|
|