|
You can also replace colors using the ImageAttributes and ColorMap classes.
Example replaces red->yellow, blue->magenta.
<br />
Graphics g = Graphics.FromImage(im);<br />
ImageAttributes attr = new ImageAttributes();<br />
<br />
ColorMap[] remap = new ColorMap[2];<br />
<br />
remap[0] = new ColorMap();<br />
remap[0].OldColor = Color.Red;<br />
remap[0].NewColor = Color.Yellow;<br />
<br />
remap[1] = new ColorMap();<br />
remap[1].OldColor = Color.Blue;<br />
remap[1].NewColor = Color.Magenta;<br />
<br />
attr.SetRemapTable(remap);<br />
g.DrawImage(im, new Rectangle(0, 0, im.Width, im.Height), 0, 0, im.Width, im.Height, GraphicsUnit.Pixel, attr);<br />
|
|
|
|
|
I want one program logic for finding the total number of occurance of specific string in files which are in specified directory.
Program will return the total number of occurances file wise.
|
|
|
|
|
|
hello frns..
pls help me on encription/decription.. i want to encrypt/decrypt a message.i am using asp.net 2005
|
|
|
|
|
Look at the System.Security.Cryptography namespace.
---
b { font-weight: normal; }
|
|
|
|
|
what are the methods,classes used for login page witch contains user name, possword.
|
|
|
|
|
hi there
I want to select a row from my datagrid but he returns me the following error.
what exactly is this error and how can i solve it?
I use visual C# 2005
'System.Windows.Forms.DataGridView' does not contain a definition for 'CurrentRowIndex'
int rowIndex = dBANBM_T075_BORGTOCHTDataGridView.CurrentRowIndex;<br />
{<br />
CustomRow(this, new CustomRowEventArgs(testdb1DataSet, dBANBM_T075_BORGTOCHTDataGridView, rowIndex));<br />
|
|
|
|
|
hi,
Datagridview dont have a currentRowIndex property
it has to be rewritten like this .
int rowIndex = dBANBM_T075_BORGTOCHTDataGridView.CurrentCell.RowIndex
or you can rewrite
CustomRow(this, new CustomRowEventArgs(testdb1DataSet, dBANBM_T075_BORGTOCHTDataGridView, dBANBM_T075_BORGTOCHTDataGridView.CurrentCell.RowIndex));
good luck
Where there is a will,there is a way.
|
|
|
|
|
i thought i doen's excist.. but it's so strange.. 'cause a normal datagird had the currentrowindex. what is so different to a datagrid or datagrid view.
i put your code in my project..
<br />
int rowIndex = dBANBM_T075_BORGTOCHTDataGridView.CurrentCell.RowIndex<br />
and he give's me the following error:
(There is no row at position 3.)
my code to read the row into a textbox =
<br />
testdb1DataSet DSet = e.DSet;<br />
DataGridView grid = e.Grid;<br />
int row = e.Row;<br />
<br />
textBox1.Text = e.DSet.Tables[0].Rows[e.Row]["T075_BORGTOCHTNUMMER_1"].ToString();<br />
|
|
|
|
|
hi,
my previous reply for that particular error message.
if you want to get a value from gridview you could use something like this
textbox1.Text = myGridView[RowIndex]["T075_BORGTOCHTNUMMER_1"].Value.ToString();
the error mentioned in your last mail related to your dataset not with datagridview...
good luck.
Where there is a will,there is a way.
|
|
|
|
|
i really feeling noob right now .. but..
The name 'RowIndex' does not exist in the current context
code =
<br />
testdb1DataSet DSet = e.DSet;<br />
DataGridView grid = e.Grid;<br />
int row = e.Row;<br />
<br />
textBox1.Text = grid[RowIndex]["T075_BORGTOCHTNUMMER_1"].Value.ToString();<br />
think i should use something like
<br />
int RowIndex = CustomRow;<br />
but then i get the error:
No overload for method 'this' takes '1' arguments
|
|
|
|
|
hi ,
textBox1.Text = grid["T075_BORGTOCHTNUMMER_1",row].Value.ToString();
sorry man, i wrote just on the fly..didnt check the syntax.
good luck.
Where there is a will,there is a way.
|
|
|
|
|
eh it works great..
<br />
textBox1.Text = grid["dataGridViewTextBoxColumn1", row].Value.ToString();<br />
i used this and it works!
only one question left..
what is the big difference between a datagrid or datagridview..
cause in some other project (made with visual studio 2003) i use a datagrid and the currentrowindex does work..
many thanks
|
|
|
|
|
change the code to this:
int rowIndex = dBANBM_T075_BORGTOCHTDataGridView.CurrentRow.Index
Thanks
Rastgar
|
|
|
|
|
Hi
I have two applications running simultaneously, from one application i want to raise event or notify second application to do something. both applications are using same db, but putting flag there will result in pooling. can someone point me to some good article concerning this.
Thanks
Shajeel
|
|
|
|
|
You can use PostMessage API function.
Best regards, Alexey.
|
|
|
|
|
Too dangerous i would have to hook a IMessageFilter in Message Queue and i dont know which message to pass, if i set it some arbitrary message windows might send that message too, is there no easy way.
Thanks for help
Shajeel
|
|
|
|
|
|
Public Function ExportModule(ByVal ModuleID As Integer)
As String Implements
DotNetNuke.Entities.Modules.IPortable.ExportModule
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Function
very urgent
sanjeev
|
|
|
|
|
public string ExportModule(int ModuleId) : DotNetNuke.Entities.Modules.IPortable.ExportModule {
}
---
b { font-weight: normal; }
|
|
|
|
|
giving error
at : its saying ; expected
|
|
|
|
|
My bad, I didn't reflect on the fact that it was a method, not a class. Just put the inheritance on the class, and name the methods the same as the interface methods they implement.
public class whatever : DotNetNuke.Entities.Modules.IPortable {
public string ExportModule(int ModuleId) {
}
}
---
b { font-weight: normal; }
|
|
|
|
|
the whole code that i want to convert is as:
If you could convert plz .
Public MustInherit Class ShopList
Inherits Entities.Modules.PortalModuleBase
Implements Entities.Modules.IActionable
Implements Entities.Modules.IPortable
Implements Entities.Modules.ISearchable
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Public ReadOnly Property ModuleActions() As _
DotNetNuke.Entities.Modules.Actions.ModuleActionCollection _
Implements DotNetNuke.Entities.Modules.IActionable.ModuleActions
Get
Dim Actions As New _
Entities.Modules.Actions.ModuleActionCollection
Actions.Add(GetNextActionID, _
Localization.GetString( _
Entities.Modules.Actions.ModuleActionType.AddContent, _
LocalResourceFile), _
Entities.Modules.Actions.ModuleActionType.AddContent, _
"", _
"", _
EditUrl(), _
False, _
Security.SecurityAccessLevel.Edit, _
True, _
False)
Return Actions
End Get
End Property
Public Function ExportModule(ByVal ModuleID As Integer) _
As String Implements _
DotNetNuke.Entities.Modules.IPortable.ExportModule
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Function
Public Sub ImportModule(ByVal ModuleID As Integer, _
ByVal Content As String, _
ByVal Version As String, _
ByVal UserID As Integer) _
Implements DotNetNuke.Entities.Modules.IPortable.ImportModule
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Sub
Public Function GetSearchItems( _
ByVal ModInfo As DotNetNuke.Entities.Modules.ModuleInfo) _
As DotNetNuke.Services.Search.SearchItemInfoCollection _
Implements DotNetNuke.Entities.Modules.ISearchable.GetSearchItems
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Function
End Class
|
|
|
|
|
hi
you have to implement the interface in the class definition i.e
public class myclass : DotNetNuke.Entities.Modules.IPortable
then implement all methodes and properties from this interface
in your class
regards
joe
|
|
|
|
|
the whole code that i want to convert is as:
If you could convert plz .
Public MustInherit Class ShopList
Inherits Entities.Modules.PortalModuleBase
Implements Entities.Modules.IActionable
Implements Entities.Modules.IPortable
Implements Entities.Modules.ISearchable
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Public ReadOnly Property ModuleActions() As _
DotNetNuke.Entities.Modules.Actions.ModuleActionCollection _
Implements DotNetNuke.Entities.Modules.IActionable.ModuleActions
Get
Dim Actions As New _
Entities.Modules.Actions.ModuleActionCollection
Actions.Add(GetNextActionID, _
Localization.GetString( _
Entities.Modules.Actions.ModuleActionType.AddContent, _
LocalResourceFile), _
Entities.Modules.Actions.ModuleActionType.AddContent, _
"", _
"", _
EditUrl(), _
False, _
Security.SecurityAccessLevel.Edit, _
True, _
False)
Return Actions
End Get
End Property
Public Function ExportModule(ByVal ModuleID As Integer) _
As String Implements _
DotNetNuke.Entities.Modules.IPortable.ExportModule
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Function
Public Sub ImportModule(ByVal ModuleID As Integer, _
ByVal Content As String, _
ByVal Version As String, _
ByVal UserID As Integer) _
Implements DotNetNuke.Entities.Modules.IPortable.ImportModule
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Sub
Public Function GetSearchItems( _
ByVal ModInfo As DotNetNuke.Entities.Modules.ModuleInfo) _
As DotNetNuke.Services.Search.SearchItemInfoCollection _
Implements DotNetNuke.Entities.Modules.ISearchable.GetSearchItems
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Function
End Class
|
|
|
|