|
Christian:
Thanks for you response. The enum.Parse was a good tip.
Thanks again.
Vern
|
|
|
|
|
Hey i have a datagrid that when a mouse is moved in the cell it is supposed to display the tooltip with information for some reason it isn't working. i tested it on a textbox and it works fine. But with the datagrid it is giving me major problems below is what i have
private void dgvCreditCards_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
{
ttInformation.SetToolTip(dgvCreditCards, "Help Me");
ttInformation.Active = true;
ttInformation.Show("This is a test", dgvCreditCards, e.RowIndex, e.ColumnIndex);
}
i even created the popup event for the Tooltip and set a break in it and it is actually catching. for whatever reason it just isn't working. Anyone know what i'm doing wrong?
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
If I remember correctly, there recently has been a discussion thread on a tooltip
that varried with the cells of the DataGridView. So I suggest you use the magic
"search comments" button with the appropriate keywords.
Luc Pattyn
|
|
|
|
|
Just thought of the question and since it is more of a programming question I'm posting it here and not the Lounge.
How would you take a transparent form and place it where the desktop icon set on-top of the form.
For example:
A simple clock app.
|
|
|
|
|
If the form is transparent why does it need to go "behind" anything?
I believe the Desktop is a ListCtrl window... use Spy++ on it. So I think it paints those icons.
led mike
|
|
|
|
|
It is transparent to allow the desktop image the show through but behind the desktop icons so that they are still able to be seen and used.
|
|
|
|
|
I have a datacolumn that is defined as decimal in a stored procedure with 28 digits (4 of them for decimals), is there a way I can get the 28 back from this as the length in any property or any other way ?
I need this dynamically, as I don't want to hardcode 28 in case the size increases/decreases.
I noticed on nvarchar fields the maxlength is set, but on decimal, datetime and int fields these are always -1.
Thanks
|
|
|
|
|
Either stop thinking of numbers as a sequence of digits or convert them to VARCHAR.
|
|
|
|
|
I don't think there is a convert to VarChar in C#.
|
|
|
|
|
I have crated a table called employee. My form contains a textbox with label 'fname' and a button (find). I have created a datset and datagridview.
When my forn load I can see all the data(of the empolyee table)in the datagridview. When a user enter text in textbox and presses 'find' button the datagridview must get refreshed and show rows where employee.firstname matches textbox.text
How do I pass textbox.text value to the sql querybuilder(like select * from where clause employee.firstname = ?????) which can be used by dataadapter.fill method
Waiting for response
Thank you
|
|
|
|
|
Look at database articles on CodeProject that discuss using SqlCommand object.
led mike
|
|
|
|
|
I have an application that runs in the background and pops up windows with reminders, thing is I don't want it to pop up the windows if I play a full screen game. How can I detect if a full screen application is running?
|
|
|
|
|
Don't, but take a look at Form.Activate
|
|
|
|
|
If you really want this (and I can understand some popups are annoying in the middle of
a game), you could use PInvoke to get at EnumWindows, and check if there is any main window
with a size equal to the screen size.
It may be insufficient for exact size match (e.g. a maximized window is larger than the screen,
just check it), and having multiple monitors might also complicate matters.
Two prototypes to get you started:
/// <summary>
/// Enumerate all windows, calling a delegate for each of them.
/// </summary>
/// <param name="ewp"></param>
/// <param name="lParam"></param>
/// <returns></returns>
[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall)]
public static extern int EnumWindows(LP_EnumWindowsProc ewp, object lParam);
/// <summary>
/// delegate used for EnumWindows() callback function
/// </summary>
public delegate bool LP_EnumWindowsProc(IntPtr hWnd, int lParam);
Luc Pattyn
|
|
|
|
|
How do I tell Visual Studio C# 2005 about a DLL supplied with my USB hardware (motor control - MotorBee). I need to be able to call the functions in the DLL. Is it so trivial that its obvious? (not to me!)
sysrev
|
|
|
|
|
See a previous message[^]
Plus:
chances are your USB dll is not a .NET dll but rather a native code dll.
In that case you dont need references and using, but you need PInvoke, i.e. the
techniques required to call native code.
Lots of examples are available on CodeProject. Prerequisite is some documentation
as to what functions are available in your USB dll.
Luc Pattyn
|
|
|
|
|
Thanks for pointing me in the right direction - I will investigate.
Is it only me or does anyone else find the Visual Studio help system difficult to get meaningfull answers from?
Ted Edwards
Ted Edwards
|
|
|
|
|
Well I am satisfied with Help/Index... which leads to the reference info,
although I often feel I would like each item to have an example;
and I am not impressed much by Help/Search... , IMHO it needs a better search engine.
A useful feature is Help/SyncContents: when in one of the reference pages, it leads
you to the matching location in the Content pane, so you can easily browse
neighbour information.
Luc Pattyn
|
|
|
|
|
It is mostly the search I have trouble with. The problem is really me in that I should learn C# and Visual Studio properly. I never seem to have time, always pressure to make something work "quick and dirty".
Ted
Ted Edwards
|
|
|
|
|
Hello
How can I handle .shp & .shx & .dbf files
in C#
THANKS for HELP
|
|
|
|
|
Hello
In vb6 function like
picturebox1.scale(20,50)-(128-208)
used to scale picturebox control or form
first point is the start position(topleft) and second point is the end position(bottom right)
I want to get the same in C#
THANKS for HELP
|
|
|
|
|
You can position and size your picturebox any way you want.
You can assign an image to the PB, and finally there is PictureBox.SizeModethat defines
what to do when picturebox and image happen to have different sizes.
When in doubt about some class, first thing to do is read the page(s) in MSDN, the help
information that is built in Visual Studio. (Menu Help/Index... or Help/Search...).
Luc Pattyn
|
|
|
|
|
how to create multiple instance of a windows service in the same server.I have to run 5 instance of a single windows service in the same server .Environment is .Net and c#
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
I am not sure this is possible.
Cant you organize a single service in such a way that it can serve multiple clients at once ?
Can you explain a bit what functionality you want to achieve ? This is likely to yield more
and better answers...
Luc Pattyn
|
|
|
|
|
Right. Other than that they each need a unique name. It can be done, but there is likely a better way.
|
|
|
|