Yeah, I don't think it's possible to overload a native method. and the only solution is to do a wrapper.
Donkaiser
Yeah, I don't think it's possible to overload a native method. and the only solution is to do a wrapper.
Donkaiser
Im using .net 2.0. googling around still haven't found anything yet.
Donkaiser
Sorry! it's for CF. this overload is missing. But my point is to see if it's possible to overload IDE methods.
Is it possible to overload a function from VS2005 IDE? If so, I want to overload graphics.drawline() which signature in CF is drawline(pen, int x1, int y1, int x2, int y2). I want to change it to drawline (pen, point A, point B). Any help?
Donkaiser
no they are locally called in my terminal. But I guess I solved the problem by setting up the timer inside the constructor. I guess setting up the timer inside a function it's not working. Donkaiser
well after the timer got fired, BlinkMode() never been called. that why it's weird. I see what you waant me to do but if the BlinkMode() never get called so do the Blinkinh(). Donkaiser
I just want to be more specific about what im doing. Im developping with CF 2.0 VS 2005 and C#. I have a class library which simulate a VT100 like terminal, and i added it as reference to my project. From my main project i call a method from that added class library. In this method, I process all the data that need to be printed on the terminal screen and then i set the timer like the code above which will trigger the BlinkMode method. while debugging, I can see that my timer went off but nothing from the BlinkMode() works. Donkaiser
Hello, I have setup a timer to simulate cursor blinking. My program has multiple threads. the thing is that my timer went off but it never calls the function delegate to the Tick events. Do you what is reason? why the tick event nevers calls the function to do my blinking? private System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer(); timer.Tick += new EventHandler(BlinkMode); timer.Interval = 150; timer.Enabled = true; //============================================================= // timer tick handler //============================================================= private void BlinkMode(Object obj, EventArgs ea) { if (!BlinkCursor) { if (curX < 19) // Don't show the cursor if it's at the end of the line { DrawChar('_', curX, curY); // Draw an underscore char at the current coordinate BlinkCursor = true; } } else { DrawChar(HiddenChar, curX, curY); BlinkCursor = false; } } Donkaiser
It's for pocket PC. console.beep() won't work. or prove me wrong. Donkaiser
I think I kinda get it how the process work to play a sound. I got this codes from VS2005 help. but when i passed my stream as a parameter a the button level, it doesn't find it. how do i get the right directory of the sounds sample? public class Sound { [DllImport("CoreDll.DLL", EntryPoint = "PlaySound", SetLastError = true)] private extern static int WCE_PlaySoundBytes(byte[] szSound, IntPtr hMod, int flags); private byte[] m_soundBytes; private enum Flags { SND_SYNC = 0x0000, /* play synchronously (default) */ SND_ASYNC = 0x0001, /* play asynchronously */ SND_NODEFAULT = 0x0002, /* silence (!default) if sound not found */ SND_MEMORY = 0x0004, /* pszSound points to a memory file */ SND_LOOP = 0x0008, /* loop the sound until next sndPlaySound */ SND_NOSTOP = 0x0010, /* don't stop any currently playing sound */ SND_NOWAIT = 0x00002000, /* don't wait if the driver is busy */ SND_ALIAS = 0x00010000, /* name is a registry alias */ SND_ALIAS_ID = 0x00110000, /* alias is a predefined ID */ SND_FILENAME = 0x00020000, /* name is file name */ SND_RESOURCE = 0x00040004 /* name is resource name or atom */ } public Sound(Stream stream) { //read the data from the stream m_soundBytes = new byte[stream.Length]; stream.Read(m_soundBytes, 0, (int)stream.Length); } public void Play() { WCE_PlaySoundBytes(m_soundBytes, IntPtr.Zero, (int)(Flags.SND_ASYNC | Flags.SND_MEMORY)); } } private void btnEmbedded_Click(object sender, System.EventArgs e) { Sound sound = new Sound (Assembly.GetExecutingAssembly().GetManifestResourceStream("SoundSample.chimes.wav")); // null exception error sound.Play(); } Donkaiser
Im developping for PPC with VS2005 and C#. how do we generate basic sounds like a beep in PPC? thank you Donkaiser
hello, I got this exception on the first line of this code in the designer: // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(3, 3); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(222, 94); Basically i just added a picturebox to contain a jpg image. this form is common to all the applications and they work fine with the others. but the app im working on throw me back the error message. Im using VS2005 CF .net 2.0 so do the other app (which are written by me too). So i don't get it. why the others are fine but this later doesn't work. Any suggestion? Donkaiser
Hello, I have 2 forms that i need to show the respective version in a dialog box or in another form. something like this: form1 version: 1.0.0.0 form2 version: 1.0.0.1 Cpyright.......... Im thinking to put in a class so that's any new form can use it. Any idea? Donkaiser
I have to have form2 inheriting all the methods and variable in form1. but I don't want to have the graphical stuff from form1. how to by pass that? because when i specify form2 inherit from form1 and run the program, it shows on the graphical components of form1 on form2. Im using C# with VS2005 Donkaiser
I try to implement double buffer but i can't get the handle of the SetStyle method this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); VS2005 give me the error saying that SetStyle and ControlStyles is not contained in the definition of the form. how can i get the handle on this function to use on a panel to prevent flickering? Donkaiser Donkaiser
I try to implement double buffer but i can't get the handle of the SetStyle method this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); VS2005 give me the error saying that SetStyle and ControlStyles is not contained in the definition of the form. how can i get the handle on this function to use on a panel to prevent flickering? Donkaiser
yes i main concern is flikering because at every update of my drawing the whole thing got redrawn. panel.invalidate() and panel.refresh() fliker the screen. Is there a solution for that of by the way im developing in the CF 2.0. so possibilities are very limited. Donkaiser
I want to use OnPaint to keep updating my drawings which mean i need to raise OnPaint event whenever i want to. so how can i raise an event? Donkaiser
I used the paint event of the tab. but my problem is that i need to update the drawing color according to my input data. how to raise the paint event again is still a mystery. I bypassed the problem with panel.invalidate() but now i have flickering problems. Donkaiser
What does it really mean when overriding the OnPaint event? example if possible. thank you Donkaiser