|
Hi.
Select the last row you want to be fixed, then select Window...Freeze Panes from the menu bar
Regards, Graham.
|
|
|
|
|
Has anyone implemented a TreeListView using the Infragistics Controls? Specifically I am using the NetVantage 2005 Volume 3.
I am looking for something like
http://www.codeproject.com/cs/miscctrl/treelistview.asp[^]
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
The UltraTree has support for multi-column nodes. That will provide the functionality of the TreeListView and more.
Josh
|
|
|
|
|
In my project I have 2 use the methods from a Win32 API on WinForm.
I want to use P/Invoke to reference these methods.
In order to keep the API method calling code seperate from my WinForm can I define all the P/Invoke commands in other class and then refertence these methods through the intermediate class. Or is it must to have the p/invoke command in the same class where i am going to use them.....
The methods mechanism may look like the following:
My WinForm -- (MyClassObj)--> MyClass (contains methods that call API methods through p/invoke)
MyClass ------- (P/Invoke )----------> API
Any suggestions wherther it is possible or not. What should I do?
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
In my .NET port for a product that I sell I use a class with all of the P/Invokes in it. There are some examples of these classes online with MOST of the normal ones.
Steve Maier, MCSD MCAD
|
|
|
|
|
a pinvoked method is called just like a normal one. You can call it directly or put it in a wrapper as you choose.
|
|
|
|
|
Have I look at pinvoke.net [^] for the actual code to dump into VB or C# to use the p/invoke function.
As this is just normal code you can put it anywhere you like, even in seperate assemblies and referencing them.
For example to use MessageBox from user32.dll:
using System;
using System.Runtime.InteropServices;
public static class PInvokeHelper
{
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int MessageBox(IntPtr hWnd, string text, string caption, uint type);
}
public class TestInvoke
{
public void SayHello()
{
PInvokeHelper.MessageBox(IntPtr.Zero,"Hello, World!","Hello",0);
}
}
Hope this helps.
Graham.
|
|
|
|
|
yep! thats nice 1, this really solved my problem.
Kind Regards...
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
Does any body has information how to get The P/Invoke Wizard
By: Paul Yao
The Paul Yao Company
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
|
Seriously, did you even try?
Google "P/Invoke Wizard", and it's in the very first link.
--
I've killed again, haven't I?
|
|
|
|
|
I am writing a diagnostic tool for our application. This tool has to find and display if our website is added as a trusted site to internet explorer or not.
How can I find this? Can I find this from registry or somewhere else?
|
|
|
|
|
Is there any way to produce a new color by mixing two or more colors?
If yes then how do I mix two or more colors such that the new color is no way near the input colors (colors to be mixed)
By near I mean the new color must not be lighter or darker (intensity) color of the input colors.
Thank You.
|
|
|
|
|
|
I have main form that loads other UCs.
When I load certain UC, it loads data for that UC.
On each UC, I have buttons (eg. delete, add etc.).
I want that when I click on add button to add some data, automatically after adding that certain data, UC control reloads.
|
|
|
|
|
At first, what ASP.NET or WinForms platform do you use?
|
|
|
|
|
It's Windows Application.
|
|
|
|
|
Hello Everyone,
How can one detect if a printer is connected to the system or not.
I used the class System.Management.ManagementObjectSearcher class as follows :
System.Management.ManagementObjectSearcher searcher =
new System.Management.ManagementObjectSearcher("SELECT * FROM Win32_Printer");
the searcher.Get()returns printer objects even when not conneted to a printer. It detectes all printers that are installed on my computer.
and when the user clicks on Print (when offline) it throws an exception. How can I prevent this.
Can someone help me on this.
Thank you
-ZS
|
|
|
|
|
|
Hi,
I have generated a report using Crystal reports. The crystal reportviewer displays the report.
so as to automatically print the report i have a statement :
crystalReportViewer1.PrintReport();
When this statement is executed the Printer dialog box appears. How can this be disabled using c#.
Thanks for your help in advance.
-jzelma
|
|
|
|
|
Hi,
I am going to develeop an SMS module for PDAs. It will receive and send SMS messages. I will use OpenNETCF.Phone.Sms while developing this module.
I am looking for code samples and all kinds of sources that I can use.
Regards,
Sedso
|
|
|
|
|
I am writing a diagnostic tool for our application. This tool has to display the list of various .NET Framwork versions installed.
How can I do this? Can I find this from registry or somewhere else?
|
|
|
|
|
The following will add the SDK versions to a combo box named cboSDK and the Framework versions to cboFramework.
<br />
using Microsoft.Win32;<br />
<br />
GetRegValues("SOFTWARE\\Microsoft\\.NETFramework");<br />
<br />
<pre><br />
private Boolean GetRegValues(string cregPath)<br />
{<br />
RegistryKey rkeyMachine = Registry.LocalMachine;<br />
RegistryKey rkeySub = rkeyMachine.OpenSubKey(cregPath, RegistryKeyPermissionCheck.ReadSubTree);<br />
if (rkeySub == null)<br />
{<br />
MessageBox.Show("The registry key " + cregPath + " could not be opened.", "Registry Problem");<br />
return false;<br />
}<br />
else<br />
{<br />
string cValue = "";<br />
try<br />
{<br />
string cLeftValue = "sdkInstallRootv";<br />
foreach (string cvalueName in rkeySub.GetValueNames())<br />
{<br />
if (cvalueName.StartsWith(cLeftValue))<br />
{<br />
cValue = rkeySub.GetValue(cvalueName).ToString();<br />
if (cValue != string.Empty)<br />
{<br />
cboSDK.Items.Add(cvalueName.Replace(cLeftValue, "Version ") + " - " + cValue);<br />
}<br />
}<br />
else<br />
{<br />
if (cvalueName == "InstallRoot")<br />
{<br />
cValue = rkeySub.GetValue(cvalueName).ToString();<br />
if (cValue != string.Empty)<br />
{<br />
string[] cDirectories = System.IO.Directory.GetDirectories(cValue);<br />
<br />
foreach (string cDir in cDirectories)<br />
{<br />
if (System.IO.File.Exists(cDir + "\\ilasm.exe"))<br />
cboFramework.Items.Add(cDir);<br />
}<br />
}<br />
<br />
}<br />
}<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.ToString(), "Error");<br />
return false;<br />
}<br />
finally<br />
{<br />
if (rkeySub != null)<br />
{ rkeySub.Close(); }<br />
<br />
}<br />
}<br />
return true;<br />
}
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
At least I'm pretty sure there isn't a sql problem, the stored procedure works fine in query analyzer, but when I attempt to use it in my program it throws a SqlException:
Line 1: Incorrect syntax near 'NIDB_NIDBArticle_Search'.
Here is the SP:
<br />
CREATE PROCEDURE dbo.NIDB_NIDBArticle_Search<br />
(<br />
@term varchar(100)<br />
)<br />
AS<br />
SELECT<br />
a.article_id AS [ID],<br />
a.main_entry AS MainEntry,<br />
auth.last_name + ', ' + auth.first_name AS Author,<br />
ed.last_name + ', ' + ed.first_name AS Editor,<br />
a.assigned_word_count AS AssignedWordCount,<br />
s.status AS CurrentStatus <br />
FROM<br />
ARTICLE a<br />
JOIN [USER] auth ON a.author_id = auth.user_id<br />
JOIN [USER] ed ON a.editor_id = ed.user_id<br />
JOIN ASSIGNMENT m ON a.article_id = m.article_id<br />
JOIN LK_STATUS s ON m.status_id = s.status_id<br />
WHERE<br />
a.main_entry LIKE '%' + @term + '%'<br />
And here is the method, throws the exception when it attempts to fill the DataTable
<br />
public static DataTable Search(string term)<br />
{<br />
SqlCommand cmd = new SqlCommand("NIDB_NIDBArticle_Search", conn);<br />
SqlParameter parm = new SqlParameter("@parm", SqlDbType.VarChar);<br />
parm.Value = term;<br />
cmd.Parameters.Add(parm);<br />
SqlDataAdapter ad = new SqlDataAdapter();<br />
ad.SelectCommand = cmd;<br />
DataTable dt = new DataTable();<br />
ad.Fill(dt);<br />
conn.Close();<br />
<br />
return dt;<br />
}<br />
Any suggestions? I usually use Enterprise Library but for some reason I kept getting an infinite loop when I try to use it in this Windows form.
|
|
|
|
|
Set the CommandType property of the command to CommandType.StoredProcedure.
---
b { font-weight: normal; }
|
|
|
|