Please can you show a sample code.
Manu_81
Posts
-
creating dynamic classes -
creating dynamic classesHi, I am getting the name of the class from database as string. I want to create object for this class dynamically. how do I do it?
-
tab char\t doesnt work...
-
tab charHow can I insert a tab into the Text attribute of the Label of Winform? For example aaa: uuuuuuuu bbbbb: yyyyyyyyyyyy So in order to display aaa : uuuuuuuu bbbbb : yyyyyyyyyyyy you must fill a tab character in. "aaa: uuuuuuuu" will be the text attribute of the Label. Any help will be highly appreciated. -- modified at 13:55 Tuesday 9th May, 2006
-
tooltipHi, I have a dataset with some values from DB. I want to show the dataset as tooltip to a particular control, say a list box. How do I do that. Thanks in advance.
-
querying registryHi, I want to query, modify and write a REG_MULTI_SZ values from Registry.Can anyone pleeeease show me some code samples. Thanks in advance.
-
setup projectHi, I am creating a setup project in Visual Studio. Apart form installation, I also want to run a batch file during setup. How do I do that? Thanks in advance.
-
setup projectHi, I am creating a setup project in Visual Studio. Apart form installation, I also want to run a batch file during setup. How do I do that? Thanks in advance.
-
creating a setup appHi...Thanks for your reply. I'll try that... Will it also install .net framework if the system does'nt have one???
-
creating a setup appHi, I have my C# exe and some Dlls to go along with that. I need to create a setup app that installs these files. I went to the documentation of Visual Studio Setup Project and saw how to do one. Apart from this, my setup app should also look for .net framework in the system, and if its not there install the .net framework too. How do I do that. Any ideas?? Thanks.
-
extending desktop windowHi, I am working on a project in win32 that involves multiple monitors. Usually as soon we connect a new monitor, we would go the desktop properties, settings to extend the window desktop to the new monitor... I want to do this through my program. My scenario is, the users connect and disconnect monitors on fly while executing my app. I dont want the users to go and manually extend the desktop for the monitors they plugin. Any ideas... Thanks in advance.
-
creating dialogsApart from the blocking call, I also call various other functions from the dll and display the return results to the user. So if I do thread, that would be like updating the UI inside this thread, which I dont want to do. I also want to avoid thread for this, as my app uses some threads in different places. I just dont want to use so many threads in my app... So there is no way to get around this??? -- modified at 15:49 Tuesday 28th February, 2006
-
creating dialogsHi, In my WinForm App, I have a blocking call to dll that takes a while to return. I want to indicate the user to wait, probably by showing an animated gif or progress bar. I dont want to go into threading. Is there any other way to do this. I created another form that looks like small dialog with the animated gif and text box.I changed the FormBorderStyle property to FixedDialog. I called it from my form as
WaitDialog WaitD = new WaitDialog(this); WaitD.Show(); ////blocking call to DLL... WaitD.Dispose();
What happens is, it shows the wait form, but none of its controls ( the animated gif and text box) is shown. I get a blank white boxes in their places. What should I do. Any ideas. Thanks in advance. -- modified at 15:10 Tuesday 28th February, 2006 -
device notificationHi, In my app, I want to be notified for device changes. I tried to register for notification using RegisterDeviceNotification() function. But this function takes window handle as its first param. But my app is console app. How do I have to do this. I also wanted to receive WM_Device messages. Can I create a handle to WinMain and use RegisterDeviceNotification() and have a callback window procedure using this handle?? How to do that. How to create a handle to winmain?? If not can I create an invisible window and handle the messages. How do I create an invisible window?? Thanks a lot in advance.
-
SetupDiRemoveDevice()Hi, I am trying to remove a device using the fn,
bOk = SetupDiRemoveDevice(hDevInfo,devinfoData[n1]);
as soon as I do this, (I think there are some bugs in its driver) it gets to the found new hardware wizard, and recreats the registries ( for I want to remove that device and delete the registries). How do I overcome this. I know we can tell device manager to send me all the devices messages so that when I get new hardware message, I can ignore it. Can anyone help me how to do that? Thanks in advance. -
.NET Framework 2.0Hi, I am using Visual Studio .NET 2003 with Framework 1.1. I downloaded and installed Framework 2.0. Now how do I direct Visual Studio to use Framework 2.0. It is still using framework 1.1. Thanks.
-
animated gifHi, In my winform, I have a blocked call to dll that takes a while to return. I wanted to show to the user a progress bar like to indicate that some process is going on behind and they should wait until its finished. So, I added an aminated gif image to indicate the progress. But the animation won't happen when the call is blocked and until it returns. This is because its on the same thread. I know threading will solve my problem, but I dont want to put the blocking code inside another thread since it involves lot of UI updates. Is there any way to put the animated gif inside another thread and make it to animate while the dll code is executed, or alltogether different solution to make this thing work. Thanks in advance.
-
thread safe callsHi, I posted this message earlier and some one posted a link to an article. It helped, but still I am confused how to do it in my scenario. I have a HomeForm (main form which has main()). In one of its meathod I have
PrimeInfoThread pTh = new PrimeInfoThread(this.pictureBox1,this.panel4,this.button1,this.button3,this.SLabel); Thread t = new Thread(new ThreadStart(pTh.ThreadProc)); t.Start();
PrimeInfoThread is another class as followspublic class PrimeInfoThread { private System.Windows.Forms.PictureBox hPic ; private System.Windows.Forms.Panel hPan ; private System.Windows.Forms.Button but1 ; private System.Windows.Forms.Button but2 ; private System.Windows.Forms.Label slab ; // The constructor public PrimeInfoThread(System.Windows.Forms.PictureBox hP, System.Windows.Forms.Panel hpanel, System.Windows.Forms.Button b1, System.Windows.Forms.Button b2, System.Windows.Forms.Label Sl) { hPic = hP; hPan = hpanel; but1 = b1; but2 = b2; slab = Sl; } public void ThreadProc() { EnumGetEDID InitEnumObj = new EnumGetEDID(); InitEnumObj.AppInitEnum(slab); hPic.Hide(); hPan.Hide(); but1.Show(); but2.Show(); } }
In threadProc I call another class EnumGetEDID and call AppInitEnum(slab) where I pass the label. Inside AppInitEnum() I do 'slab.Text' to set the text values. Now how do I make this Thread safe. Can anyone show it in my code. Thanks a lot. -
thread safe callsprivate void HomeFrom_Activated(object sender, System.EventArgs e) { PrimeInfoThread pTh = new PrimeInfoThread(this.pictureBox1,this.panel4,this.button1,this.button3,this.SLabel); Thread t = new Thread(new ThreadStart(pTh.ThreadProc)); t.Start(); //t.Join(); } ... public class PrimeInfoThread { private System.Windows.Forms.PictureBox hPic ; private System.Windows.Forms.Panel hPan ; private System.Windows.Forms.Button but1 ; private System.Windows.Forms.Button but2 ; private System.Windows.Forms.Label slab ; // The constructor public PrimeInfoThread(System.Windows.Forms.PictureBox hP, System.Windows.Forms.Panel hpanel, System.Windows.Forms.Button b1, System.Windows.Forms.Button b2, System.Windows.Forms.Label Sl) { hPic = hP; hPan = hpanel; but1 = b1; but2 = b2; slab = Sl; } public void ThreadProc() { EnumGetEDID InitEnumObj = new EnumGetEDID(); InitEnumObj.AppInitEnum(slab); hPic.Hide(); hPan.Hide(); but1.Show(); but2.Show(); } }
I have the above code where I modify my form controls in another thread. Is is safe to do like this. How to do this using thread-safe calls/delegates. Thanks. -
device manager refreshBut that's not I want. I am not plugging in any devices to watch for WM_DEVICECHANGE message. I just want to force a device manager refresh ( just as we do manually in the control panel-device manager-scan for hardware changes but programatically) -- modified at 17:46 Tuesday 31st January, 2006