|
Here is a basic subclassing class in C#:
class SubClasser : System.Windows.Forms.NativeWindow
{
public SubClasser(IntPtr formhandle)
{
base.AssignHandle(formhandle);
}
protected override void WndProc(
ref System.Windows.Forms.Message m)
{
base.WndProc(ref m);
switch(m.Msg)
{
case WM_HSCROLL:
break;
case WM_VSCROLL:
break;
}
}
}
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
Scrolling support in WinForms is not too good.
If the scrolling is not good in WinForm, then what can I use? Or I need to make a newcontrol?
I use autoScroll in my Form, because I don't want to waste much time on calculation. I've tried to use hScrollBar and vScrollBar, but the interface looks not beautiful as autoScroll bar.
Any idea for me??
|
|
|
|
|
I have a class library version 1.0. I want it to GAC(Global Assemly Cache).Now how can I use it in my application?I can't use object which exist in it,I have to first Add reference to the local compy of it,then if I delete dll file in my debug directory,because another version is exist in GAC I can use the version in GAC.HHow can I use that vversion from the begining.
My second question is I have careated version2.0 and v3.0 and put them in GAC,the question is how can I force my application to use my desired version?
Mazy
No sig. available now.
|
|
|
|
|
Regards,
We have developed a multimedia software using C# which uses a .mdb (MS-Access file) as database. When burning the whole project on the CD, the program coulden't access the database so we had to to install the .mdb file on the user's system HDD and that works.
But I still wonder why it was not possible to read our database on the CD and if it is anyway to do so. perhaps C# needs to write some temporary files beside the .mdb file to work with or what?
Thanks for any note and help,
-nSun
---
"Art happens when you least expect it"
|
|
|
|
|
nSun wrote:
perhaps C# needs to write some temporary files beside the .mdb file to work with or what?
Yes,there is a lock file that should be written near .mdb file but I don''t think this is specific to C# only.
Mazy
No sig. available now.
|
|
|
|
|
Yes, the Jet database engine, which Access DBs are based on, create a *.ldb database lock file. But this has nothing to do with whether or not you use C#.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I'm not experienced in Access so don't quote me - but...
Is it possible to open the database as a shared connection - would this remove the need to write the lock file.
Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript)
tatham@e-oddie.com
+61 414 275 989
|
|
|
|
|
Hi,
If you choose "Read Only" AND "Open Exclusive" together, Access won't create
the *.ldb file if it isn't already there.
Another option is to get any "ldb" file, and copy it into the CD as well... not very clean solution, but it seems that it works fine
Good luck
Braulio
|
|
|
|
|
Hi,
Have you tried to set "Exclusive Access" and login to the database with an user that only has "Read Data" access ?
Tools >> Security >> User and Group Accounts
Tools >> Security >> User and Group Permissions
HTH
Braulio
|
|
|
|
|
It is possible to open an Access database which resides on a CD, but you must open it as Exclusive, Read-Only. This prevents the ldb file from being created.
|
|
|
|
|
Thanks all for helps.
-nSun
---
"Art happens when you least expect it"
|
|
|
|
|
|
Hi,
It would be a good idea if you include some Doc or Pdf with some snapshots... just download the Zip... and put the exes in a local computer... just look like a virus or something like that
Greetings
Braulio
|
|
|
|
|
|
Hi!
I'm trying to print the values in my DataSet.
It has a single row in it. I used this CommandText: "Select NAME from Authors"
Now the query returns all the names.
Now, I want to print the values in the dataset and I want to use foreach because I do not know how many names I might get. But the problem is, what do I use to traverse my set? I used this ff code but it generates an error:
DataRow dr = dsDBData.Tables[0].Rows[0];
foreach (DataColumn dc in dr)
{
MessageBox.Show(dc.ToString());
}
Please help.
"To teach is to learn twice"
|
|
|
|
|
daljv wrote:
foreach (DataColumn dc in dr)
Change it to something like this:
foreach(DataColumn in dr.Table.Columns)
Mazy
No sig. available now.
|
|
|
|
|
You have more than one row and DataRow object doesn't contain Columns objects. See help on Data namespace. Should be:
foreach(DataRow dr in dsDBData.Tables[0].Rows)
{
MessageBox.Show(dr[0].ToString());
}
Hi,
AW
|
|
|
|
|
A.Wegierski wrote:
DataRow object doesn't contain Columns objects
DataRow.Table.Columns
Mazy
No sig. available now.
|
|
|
|
|
Thx
Hi,
AW
|
|
|
|
|
I have a data grid I have extended.
in the paint event a need to draw a red line through each row that contains a void. how would i from
DataGrid.BindingContext loop through each one. one by one
nicl
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Does anyone have a link ro what not to override this method
I need to customize the row header icon and draw a line through the row if the void property is true
and ideas?
nbick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I use OnPaint in DataGrid to autosize one of their columns. It works unexpectedly good ... with some exceptions (not Exceptions). In some cases it gives neverending loops. Now I'm working on it.
Hi,
AW
|
|
|
|
|
it would be much easier to override SetValueAtRow and caluclate the column width there inside the column class
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Dear to all programmers,
I do have a problem here... regarding about Network Management Tools.
I do have question whether C# can be use to create an application that will manage the Network Side (as a tools). Is it possible??
And also i want to know whether i can using Java Language to create the NMT.
Any recommend using what software to develop in the most quick time around a month?
Thanks
|
|
|
|
|
hi,
how can i make a combobox un-editable?
that means the text value can only selected inside collection items. user can enter other value in the combobox at runtime.
how can i do that? i can't see any property related to this!
thanks,
jim
|
|
|
|