|
Dionne wrote:
but the only problem left is that the Handle that ShowWindow is looking for is the MainWindowHandle and when an app is minimized to the system tray and hidden the MainWindowHandle is 0.
That doesn't make any sense, the Handle or HWND for the application doesn't get set to 0 when the application is minimized and hidden. You can prove this simply by the following, you will see the Handle is still there:
using System;
using System.Timers;
using System.Drawing;
using System.Windows.Forms;
public class test : System.Windows.Forms.Form
{
Button b;
System.Timers.Timer t;
public test()
{
InitializeComponents();
}
public void InitializeComponents()
{
b = new Button();
b.Text = "Hide Me";
b.Click += new EventHandler(bClick);
t = new System.Timers.Timer();
t.Elapsed += new ElapsedEventHandler(elapsed);
t.Interval = 3000;
t.Enabled = true;
this.Controls.AddRange(new Control[] {b});
}
private void bClick(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
this.Visible = false;
this.ShowInTaskbar = false;
}
private void elapsed(object source, ElapsedEventArgs e)
{
MessageBox.Show(this.Handle.ToString());
}
[STAThread]
public static void Main()
{
Application.Run(new test());
}
}
- Nick Parker My Blog | My Articles
|
|
|
|
|
Yes that makes perfect sense
[STAThread]
static void Main()
{
string strSystemMutex = Process.GetCurrentProcess().ProcessName;
bool firstInstance;
Mutex mut = new Mutex(true, strSystemMutex,out firstInstance);
if (firstInstance)
{
try
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}
catch {}
finally
{
mut.ReleaseMutex();
}
}
else
{
try
{
Process[] processes =
Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
foreach (Process proc in processes)
{
if (proc.Id != Process.GetCurrentProcess().Id)
{
WinMSG.ShowWindow(proc.Handle,3);
System.Environment.Exit(0);
}
}
}
catch{}
}
}
try this your test and run a multiple instance you'll see what i mean. proc.Handle is not the right parameter and proc.MainWindowHandle is 0
|
|
|
|
|
You might want to take a look at this article[^] by Chris Anderson.
From my experience the next thing you'll want is to delegate commandline options to the running instance, and that's something that can be achieved really easily using the ApplicationFramework provided by Chris.
A few little caveats, though:
When using .NET 1.1 you'll have to modify the code to include the required typeFilterLevel property for the channel used or else you'll get security exceptions.
You should add an InitializeLifetimeService() override returning null or else you won't be able to activate your previous instance after 2 minutes.
If you plan to use remoting in your application yourself you should remove the channel property bindTo = "127.0.0.1" (all three in UserApplicationContext.cs) or you'll get strange errors when handling remote events.
Regards,
mav
|
|
|
|
|
hi,
now i am devloping an report using crystal report in my application. i need to print in preprinted sheet. i need to set fixed width for details section and after the fixed size then print goes to next new page. any one help to me.
thanks in advance
Have A Nice Day!
Murali.M
|
|
|
|
|
Hi,
I have a WindowsForm, which has a groupBox and has multiple CheckedListBox Controls. I want to clear all selected check items dynamically, instead of doing it individually. I want to get all the controls from the groupBox first, which also has other controls, then get the CheckedListBox controls and clearing it, if selected.
I wrote this code, but it is not working, its not coming out of the loop. Any help, will be really appreciated.
foreach(Control ctrl in this.groupBox1.Controls)
{
if(ctrl is CheckedListBox)
{
CheckedListBox cb=(CheckedListBox)ctrl;
for(int i=0; i<=(cb.CheckedItems.Count-1); i++)
{
cb.ClearSelected();
}
}
}
abhi
|
|
|
|
|
Hmm, that is rather strange. Here is a quick work around.
private void ClearSelected()
{
CheckedListBox clb = null;
foreach(Control c in grp.Controls)
{
if(c is CheckedListBox)
{
clb = c as CheckedListBox;
if(clb != null)
{
foreach(int index in clb.CheckedIndices)
clb.SetItemChecked(index, false);
}
}
}
}
- Nick Parker My Blog | My Articles
|
|
|
|
|
Consider that you might have nested controls, that a CheckedListBox may not be a direct child of a GroupBox . Consider a generic recursive loop like so:
void ClearSelected(ControlCollection controls)
{
if (controls == null || controls.Count == 0) return;
foreach (Control control in controls)
{
if (control is CheckedListBox) ((CheckedListBox)control).ClearSelected();
ClearSelected(control.Controls);
}
} This will encounter any CheckedListBox at any depth in the parent/child hierarchy of controls.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
ISA? How old is this machine?!
Anyway, you're going to have to write your own devices drivers, in C++, to communicate with the hardware. C# is NOT good at this part! You can use C# as a higher level controller, providing a user interface to the functions of the board.
Like leppie said, you'll need the Windows Driver Development Kit. Start here[^]!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi!
simply can't find a way to get the drive roots in c#. would be great if you could help.
thanks
thomas
|
|
|
|
|
.NET Framework 2.0 will add a new class, System.IO.DriveInfo , which can do this easily.
For now with .NET Framework 1.x, there are several ways. One is to use WMI with the System.Management namespace like so:
using System;
using System.Management;
class Test
{
static void Main(string[] args)
{
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("select * from Win32_LogicalDisk");
ManagementObjectCollection objects = searcher.Get();
if (objects != null)
{
foreach (ManagementObject obj in objects)
Console.WriteLine(obj.Properties["DeviceID"].Value);
}
}
} You could also P/Invoke several native APIs, like GetLogicalDrives :
using System;
using System.Collections;
using System.Runtime.InteropServices;
class Test
{
static void Main(string[] args)
{
uint drives = GetLogicalDrives();
byte[] buffer = BitConverter.GetBytes(drives);
BitArray bits = new BitArray(buffer);
for (int i=0, j=65; i<bits.Count; i++, j++)
if (bits[i])
Console.WriteLine((char)j + ":");
}
[DllImport("kernel32.dll", SetLastError=true)]
static extern uint GetLogicalDrives();
} There's many ways, but I hope these two alternatives for .NET 1.x point you in the right direction.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
|
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Does anybody know any example code of populating windows treeview control with hierarchical dataset?
I prefer C# but vb will also do it.
I found couple samples on this side, but one uses classes, and another delegate. Both seem overkill.
My hierarchy is 3 levels deep, and the number of rows are limited. I can afford to load the treeview at the form load time.
I have been putting together following pieces, but it failed to load the tree in the relationship I want.
Thanks for any help!
private void Form1_Load(object sender, System.EventArgs e)
{
string sSQL;
SqlCommand cmd = sqlCnPubs.CreateCommand();
cmd.CommandType=CommandType.Text ;
sSQL = "Select ID, Segment from Prod_Segments";
cmd.CommandText=sSQL;
SqlDataAdapter daSeg = new SqlDataAdapter();
daSeg.SelectCommand=cmd;
DataSet dsProd=new DataSet();
daSeg.Fill (dsProd, "Segments");
sSQL = "Select ID, Catagory, SegmentID from Prod_Catagories";
cmd.CommandText=sSQL;
SqlDataAdapter daCat = new SqlDataAdapter();
daCat.SelectCommand=cmd;
DataSet dsCatagories=new DataSet();
daCat.Fill (dsProd, "Catagories");
dsProd.Relations.Add("SegtoCat", dsProd.Tables["Segments"].Columns["ID"], dsProd.Tables["Catagories"].Columns["SegmentID"]);
foreach (DataRow rowSeg in dsProd.Tables["Segments"].Rows)
{
TreeNode nodeSeg = new TreeNode();
nodeSeg.Text=rowSeg["Segment"].ToString();
nodeSeg.ImageIndex=0;
tvwProd.Nodes.Add(nodeSeg);
foreach (DataRow rowCat in rowSeg.GetChildRows("SegtoCat"))
{
TreeNode nodeCat = new TreeNode();
nodeCat.Text=rowCat["Catagory"].ToString();
tvwProd.Nodes.Add(nodeCat);
}
}
|
|
|
|
|
Make sure that an enforced DataRelation or an assumed relationship exists in a DataTable within your DataSet , like ParentID -> ID. For the top-level rows, ParentID (in this example) should be NULL.
To begin, find the rows with a NULL ParentID using DataTable.Select('ParentID = NULL') . That gives you a DataRow[] array. For each DataRow you add a TreeNode to TreeView.Nodes and then pass DataRow.GetChildRows using a DataRelation (best way of doing it), or dynamically construct another WHERE clause to pass to DataTable.Select like I did above (except replacing NULL with the current row's ID).
In a recursive method you add a TreeNode for each row and repeat the steps above, passing them to the same method. This is recursion.
The way you're doing it is not recursive and will only work for a level or two. Besides, you shouldn't do this in the Form.Load event handler. This can be a very expensive call and the form will be delayed. Users expact fast results and will think your application has hung and will most likely try to kill it or just stop using it. Consider starting a new thread (and be sure to use Control.Invoke ) that does this so the form can load, optionally with user feedback like a ProgressBar while processing results.
Take a look at http://www.codeproject.com/script/comments/forums.asp?msg=745216&forumid=1649#xx745234xx[^] where I've explained this before in this forum.
Below is something similar to a method I used before to add TreeNode s to a TreeView safely. You should read the documentation for Control.Invoke in the .NET Framework SDK for more details:
private delegate int AddTreeNodeCallback(TreeNode node);
private void SafeAddTreeNode(TreeNodeCollection nodes, TreeNode node)
{
if (treeView1.InvokeRequired)
{
AddTreeNodeCallback cb = new AddTreeNodeCallback(nodes.Add);
treeView1.Invoke(cb, new object[] {node});
}
else nodes.Add(node);
} I really do recommend starting this in another thread and using this method to add the TreeNode . Since you can easily get the row count from your DataTable , you could easily update a ProgressBar , but you should use Control.Invoke still. Always use Control.Invoke when communicating with a control created on a different thread.
Finally, try to avoid refering to DataColumn s and DataRelation s by their string name. This is very expensive as many lookups are required. Use either an integer index or the actual DataColumn or DataRelation object, which is trivial when using a typed DataSet (from using xsd.exe or VS.NET to create a new DataSet schema, which is available when you right-click on a project and select Add->Add New Item->DataSet). You can also programmatically create one and refer to the two classes I mentioned above that you programmatically added to the named DataTable , which you add to a named DataSet . This results in much faster code.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
public ArrayList strline=new ArrayList();
strline.Add("I found a reason for me. To change who I used to be. A reason to start over new. And the reason is you.");
strline.Add("Anger dwells only in the bosom of fools - John F. Kennedy.");
I hoped this could be work. but it didn't.
I want to replace string[] with readed Line by Line in txt file.
and I know how to read line by line but string[] Length is fixed as initial.
so I tried apple ArrayList in string[] but it's not easy to me.
How can we treat this?
Help me please.
Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.
|
|
|
|
|
Try using System.Collections.Specialized.StringCollection instead. Otherwise you can just returned objects from the ArrayList to string manually, string myStr = (string)myArrayList[0];
Does that answer your question?
Judah Himango
|
|
|
|
|
Hello buddie,
I load one UserControl for example c1.ascx file using LoadControl() method into a placeholder everything is ok.
I load another one as c2.ascx using LoadControl() in the first one (c1.ascx) now all eventhandlers in c2 class except Page_Load() are disabled!!!
Why is that? an ASP.NET bug or something notable can solve it?
Thank u
- Den 2 Fly
---
"Art happens when you least expect it."
|
|
|
|
|
This is the C# forum. You should post your question here[^].
Charlie
if(!curlies){ return; }
|
|
|
|
|
|
I have a display (kind of NUnit stuff) with two RichTextBox displays.
Left one is test results / right box is original results showing green or red.
What I want to do:
If someone scrolls either window up or down the other window scrolls in concert as well.
Has anyone successfully attempted this?
Thanks,
Michael
This signature left intentionally blank
|
|
|
|
|
It's possible and quite easy. There are serveral articles here on CodeProject that describe this in various languages, and if you click "Search comments" you can search this message board where we've discussed this before as well.
One such article is Scrolling Around with the RichTextBox Control[^]. It's in VB.NET but mostly calls to the BCL and P/Invoke method (PostMessage , to be exact). You handle the scrolling events (or notification message sent to the native window handle (HWND ), which does make things easier) and post them to the message queue for another RichTextBox . Keep in mind that almost all the Windows Forms controls are just encapsulating native Common Controls, so windows messages are still sent/posted and handled by a window procedure (defined as Control.WndProc ).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Thanks Heath. This was more exciting than synchronized swimming. For those searching messages...here is the C# converted solution.
using System;
using System.Collections;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System;
using System.IO;
using System.Data;
using System.Text;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using TestMultiScroll;
namespace TestMultiScroll
{
public class Form1 : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components = null;
public System.Windows.Forms.RichTextBox RichTextBox1 = null;
public System.Windows.Forms.RichTextBox RichTextBox2 = null;
public System.Windows.Forms.RichTextBox RichTextBox3 = null;
private const int WM_HSCROLL = 0x114;
private const int WM_VSCROLL = 0x115;
private const int WM_MOUSEWHEEL = 0x20A;
private const int WM_COMMAND = 0x111;
private const int WM_USER = 0x400;
private const int SBS_HORZ = 0;
private const int SBS_VERT = 1;
private const int SB_THUMBPOSITION = 4;
private Subclass sClass1 = null;
private Subclass sClass2 = null;
private Subclass sClass3 = null;
public Form1()
{
InitializeComponent();
}
protected void Dispose(bool disposing)
{
if (disposing)
{
if ( !( (components == null)))
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.RichTextBox1 = new System.Windows.Forms.RichTextBox ();
this.RichTextBox2 = new System.Windows.Forms.RichTextBox ();
this.RichTextBox3 = new System.Windows.Forms.RichTextBox ();
this.SuspendLayout();
this.RichTextBox1.Location = new System.Drawing.Point (24, 24);
this.RichTextBox1.Name = "RichTextBox1";
this.RichTextBox1.Size = new System.Drawing.Size (128, 128);
this.RichTextBox1.TabIndex = 0;
this.RichTextBox1.Text = "RichTextBox1";
this.RichTextBox1.WordWrap = false;
this.RichTextBox2.Location = new System.Drawing.Point (160, 24);
this.RichTextBox2.Name = "RichTextBox2";
this.RichTextBox2.Size = new System.Drawing.Size (128, 128);
this.RichTextBox2.TabIndex = 1;
this.RichTextBox2.Text = "RichTextBox2";
this.RichTextBox2.WordWrap = false;
this.RichTextBox3.Location = new System.Drawing.Point (296, 24);
this.RichTextBox3.Name = "RichTextBox3";
this.RichTextBox3.Size = new System.Drawing.Size (128, 128);
this.RichTextBox3.TabIndex = 3;
this.RichTextBox3.Text = String.Empty;
this.RichTextBox3.WordWrap = false;
this.AutoScaleBaseSize = new System.Drawing.Size (5, 13);
this.ClientSize = new System.Drawing.Size (448, 174);
this.Controls.Add(this.RichTextBox3);
this.Controls.Add(this.RichTextBox2);
this.Controls.Add(this.RichTextBox1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
this.Load += new System.EventHandler (Form1_Load);
this.RichTextBox1.VScroll += new System.EventHandler (RichTextBox1_VScroll);
this.RichTextBox2.VScroll += new System.EventHandler (RichTextBox2_VScroll);
this.RichTextBox3.VScroll += new System.EventHandler (RichTextBox3_VScroll);
this.RichTextBox1.HScroll += new System.EventHandler (RichTextBox1_HScroll);
this.RichTextBox2.HScroll += new System.EventHandler (RichTextBox2_HScroll);
this.RichTextBox3.HScroll += new System.EventHandler (RichTextBox3_HScroll);
}
#endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(System.Object sender,System.EventArgs e)
{
sClass1 = new Subclass(RichTextBox1.Handle);
sClass2 = new Subclass(RichTextBox2.Handle);
sClass3 = new Subclass(RichTextBox3.Handle);
this.sClass1.NativeWindowsEvent += new Subclass.WindowsEventHandler (sClass_WindowProcedure);
this.sClass2.NativeWindowsEvent += new Subclass.WindowsEventHandler (sClass_WindowProcedure);
this.sClass3.NativeWindowsEvent += new Subclass.WindowsEventHandler (sClass_WindowProcedure);
for (int i = 0; i <= 100; i++)
{
if (i % 4 == 0)
{
RichTextBox1.AppendText(" this is a longer string to force HScroll " + i + System.Environment.NewLine);
RichTextBox2.AppendText(" this is a longer string to force HScroll " + i + System.Environment.NewLine);
RichTextBox3.AppendText(" this is a longer string to force HScroll " + i + System.Environment.NewLine);
}
else
{
RichTextBox1.AppendText(" this is a string " + i + System.Environment.NewLine);
RichTextBox2.AppendText(" this is a string " + i + System.Environment.NewLine);
RichTextBox3.AppendText(" this is a string " + i + System.Environment.NewLine);
}
}
}
public void sClass_WindowProcedure(ref Message uMsg)
{
switch (uMsg.Msg)
{
case (WM_VSCROLL):
if (uMsg.HWnd.Equals(RichTextBox1.Handle))
{
ThumbScrollHandler(RichTextBox1, new RichTextBox[] {RichTextBox2, RichTextBox3}, ref uMsg);
}
if (uMsg.HWnd.Equals(RichTextBox2.Handle))
{
ThumbScrollHandler(RichTextBox2, new RichTextBox[] {RichTextBox1, RichTextBox3}, ref uMsg);
}
if (uMsg.HWnd.Equals(RichTextBox3.Handle))
{
ThumbScrollHandler(RichTextBox3, new RichTextBox[] {RichTextBox1, RichTextBox2}, ref uMsg);
}
break;
case (WM_HSCROLL):
if (uMsg.HWnd.Equals(RichTextBox1.Handle))
{
ThumbScrollHandler(RichTextBox1, new RichTextBox[] {RichTextBox2, RichTextBox3}, ref uMsg);
}
if (uMsg.HWnd.Equals(RichTextBox2.Handle))
{
ThumbScrollHandler(RichTextBox2, new RichTextBox[] {RichTextBox1, RichTextBox3}, ref uMsg);
}
if (uMsg.HWnd.Equals(RichTextBox3.Handle))
{
ThumbScrollHandler(RichTextBox3, new RichTextBox[] {RichTextBox1, RichTextBox2}, ref uMsg);
}
break;
}
}
private void ThumbScrollHandler(RichTextBox sender, RichTextBox[] receivers, ref Message uMsg)
{
sClass2.NativeWindowsEvent -= new Subclass.WindowsEventHandler(ref sClass_WindowProcedure);
foreach (RichTextBox receiver in receivers)
{
Message msg = Message.Create(receiver.Handle, uMsg.Msg, uMsg.WParam, uMsg.LParam);
sClass2.SendWndProc(ref msg);
}
sClass2.NativeWindowsEvent += new Subclass.WindowsEventHandler(ref sClass_WindowProcedure);
}
private void RichTextBox1_VScroll(object sender,System.EventArgs e)
{
VerticalScroll(RichTextBox1, new RichTextBox[2] {RichTextBox2, RichTextBox3});
}
private void RichTextBox2_VScroll(object sender,System.EventArgs e)
{
VerticalScroll(RichTextBox2, new RichTextBox[2] {RichTextBox1, RichTextBox3});
}
private void RichTextBox3_VScroll(object sender,System.EventArgs e)
{
VerticalScroll(RichTextBox3, new RichTextBox[2] {RichTextBox1, RichTextBox2});
}
private void RichTextBox1_HScroll(object sender,System.EventArgs e)
{
HorizontalScroll(RichTextBox1, new RichTextBox[2] {RichTextBox2, RichTextBox3});
}
private void RichTextBox2_HScroll(object sender,System.EventArgs e)
{
HorizontalScroll(RichTextBox2, new RichTextBox[2] {RichTextBox1, RichTextBox3});
}
private void RichTextBox3_HScroll(object sender,System.EventArgs e)
{
HorizontalScroll(RichTextBox3, new RichTextBox[2] {RichTextBox1, RichTextBox2});
}
private void VerticalScroll(RichTextBox sender, RichTextBox[] receivers)
{
int position = GetScrollPos(sender.Handle, SBS_VERT);
foreach (RichTextBox receiver in receivers)
{
PostMessageA(receiver.Handle, WM_VSCROLL, SB_THUMBPOSITION + 0x10000 * position, 0);
}
}
private void HorizontalScroll(RichTextBox sender, RichTextBox[] receivers)
{
int position = GetScrollPos(sender.Handle, SBS_HORZ);
foreach(RichTextBox receiver in receivers)
{
PostMessageA(receiver.Handle, WM_HSCROLL, SB_THUMBPOSITION + 0x10000 * position, 0);
}
}
[DllImport("user32.dll")]
private static extern int GetScrollPos(IntPtr hWnd, int nBar);
[DllImport("user32.dll")]
private static extern bool PostMessageA(IntPtr hwnd, int wMsg, int wParam, int lParam);
}
public class Subclass : System.Windows.Forms.NativeWindow
{
public event WindowsEventHandler NativeWindowsEvent;
public delegate void WindowsEventHandler(ref Message uMsg);
public Subclass(IntPtr pWindowHandle):base()
{
base.AssignHandle(pWindowHandle);
}
protected override void WndProc(ref System.Windows.Forms.Message uMsg)
{
base.WndProc(ref uMsg);
if (NativeWindowsEvent != null)
NativeWindowsEvent(ref uMsg);
}
public void SendWndProc(ref System.Windows.Forms.Message uMsg)
{
base.WndProc(ref uMsg);
}
}
}
This signature left intentionally blank
|
|
|
|
|
Many thanks for converting it,
http://www.codeproject.com/vb/net/VbNetScrolling.asp?df=100&forumid=83108&select=939107
Thanks again, for the work theRealCondor.
progload.
|
|
|
|
|
I have a component in which the ErrorProvider is defined upon initialization of the component as:
<br />
valueErrorProvider = new System.Windows.Forms.ErrorProvider();<br />
valueErrorProvider.SetIconAlignment (this, ErrorIconAlignment.MiddleRight);<br />
valueErrorProvider.SetIconPadding (this, 2);<br />
valueErrorProvider.BlinkRate = 1000;<br />
valueErrorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.AlwaysBlink;<br />
<br />
components = new System.ComponentModel.Container();<br />
tltpInternal = new System.Windows.Forms.ToolTip(components);<br />
tltpInternal.ShowAlways = false;<br />
tltpInternal.InitialDelay = 250;<br />
tltpInternal.AutoPopDelay = 5000;<br />
tltpInternal.Active = false;
To set/clear the message I use the following:
private void SetErrorMessage(string msg)<br />
{<br />
this.valueErrorProvider.SetError(this, msg);<br />
tltpInternal.SetToolTip(this, msg);<br />
tltpInternal.Active = (msg.Trim().Length > 0);<br />
tltpInternal.ShowAlways = (msg.Trim().Length > 0);<br />
}
The problem is that the ErrorProvider symbol does not always show. The Tooltip is always populated as expected, the symbol just doesn't flash. If I select a different application and then go back to the application with the error, it begins to flash as expected.
Is there something I need to call to ensure the ErrorProvider will display?
|
|
|
|
|
hai
i am doing a project in which i need to trap the active window title after any event like mouse click, minimize,alt+tab,etc. I tried to use the cbt hooks but could not install a global hook. i learnt that i need to give the final parameter of SetWindowsHookEx as 0. But even then i could not install it. please help me.Urgent.
Advance Thanks to u.
|
|
|
|
|