|
And is there any method to copy these files?
How about the unlocker programs, how they do it?
|
|
|
|
|
I don't think so...
I've never heard about unlocker program.
|
|
|
|
|
Thaks for your answers!
I hope someone can help me solve this problem.
I think (and hope) is there a comand line util or an assemby program, witch can do anithing with a file, witout the permisson of windows...
PS.:
here you can find some "magic" program , they said, can unlock locked, or in used system or other files...
|
|
|
|
|
Iam developing a SDI windows application where i will have lot of user controls and one form(main) with panel. whenever the user clicks some buttons in form i have to load the corresponding user control into the panel. here i have a need every user control needs access the forms controls like when i click cancel on user control it should remove itself from panel and should load the next user control.
Now currenly i implemented this as the mainform class will create all user control object and pass this(mainform) as a refrence to all usercontrol constructors. so that all user control can access Form's panel to load/unload the usercontrol.
My question : Is design Ok. passing mainform reference to all usercontrols?
or any other way to do it.
Like i have one more idea instead of passing mainform reference every usercontrol will expose one event, mainform should register that event. whenever the usercontrol wants to remove itselft/load another one it has to send the nextusercontrol name as argument event and has to trigger tha event. so the mainform will process the event and unload/load the usercontrol from panel.
From the two apporached i don't which one is correctly. If you guys have some ideas. pleas suggest me.
Thanks and Regards
Srini
|
|
|
|
|
Hi,
both designs are correct and according to some situation one of them will
work better (desing wise i mean). If both work you can choose which one to use.
However, i the first case you should work with an interface instead of passing
the full form to it. This way you can't call any other non usercontrol related
functions from in the usercontrol. This is an better design.
codito ergo sum
|
|
|
|
|
If i understand you correctlly, you acctaully want a MDI-alike interface without the forms.
I've done the same thing (but with MDI forms) and found that a control/form should not unload itself. I prefer a "control marchall" in the main form that cooridnates the creation and disposal of the controls. I use this approach and gives my comlete control over the opened controls. The main form hold the custom control object, and main form can access it when something within the mainform changes and affects the currentlly open controls. The control/form communicates with the mainform using events and mainform cummunicates with the custom control trough public methods. Perfectly 2-way comm bewteen the 2 objects while none is dependant on the other.
engsrini wrote: when i click cancel on user control it should remove itself from panel and should load the next user control.
I use a event that thats fires within the contol when the cancel button is pressed. OnControlRequestClose(object sender).
This event is consumed by the control marchall in the main form and the control marchall then calls the public methods that stop threads running on the control and then safelly control.close();
I your case you can control the next control order from a central entity.
Both your appraches are feasible, but having a marchalling entity makes it so more flexible. The reason i took this road is that my mainform acts as a central management entity that does Audit trails, indicate network comms, log files, handle form malfunctioning and a few more functions that is commonly used troughout my system. I hate copying and pasteing the same code in each form, thus i use the central entity with a combonation of events and custom delegates.
This works fine for me. No refrence of the main form goes to the control. The main form however must 'know' the type of the custom control.
My opinion,
Andre
|
|
|
|
|
Hi,
My requirement is to set combobox column for deptno column of the table dept.
When insert button is clicked,i write the following code
DataGridViewComboBoxColumn cell = new DataGridViewComboBoxColumn();
cell.DataPropertyName = "DEPTNO";
cell.HeaderText = "dno";
cell.Items.Add(10);
cell.Items.Add(20);
cell.DataSource = ds.Tables["dept"];
cell.ValueMember = "DEPTNO";
cell.DisplayMember = "deptno";
dataGridView1.Columns.Add(cell);
dt=new DataTable();
dt = (DataTable)dataGridView1.DataSource;
DataRow dr = dt.NewRow();
dt.Rows.Add();
dataGridView1.DataSource = dt;
My problem is that combobox column is displayed as a separate column.But it value member set to deptno column of dept table.And when i select 30 from that combo box control goes to deptno=30 row.
I want combox cell is set for deptno column and when we select a value from that combo box column the velue is displayed for that row.
How to do this.
Thanks in advance.
|
|
|
|
|
kalkumar wrote: cell.ValueMember = "DEPTNO";
cell.DisplayMember = "deptno";
Display member is the one that's displayed onscreen, the value member represent the underlying value.
Example:
2 colums in table DEPNO (int) and DEPDESC (string).
Valuemember = DEPNO
Displaymember = DEPDESC
this will display the DEPDESC string in the combobox, but when you select a item the combobox returns the DEPNO and not the DEPDESC.
ps:
i get confused witch one is witch. Valuemember may be the one thats displayed and displaymember may be undelying value.
i think this is what you asked
Andre
|
|
|
|
|
Hello folks,
What's the equivalent of BSTR* in .NET (C#)
I used string and it gave me memory error. I used String and nothing gets returned.
The following is the declaration in C++ header file:
extern DllImport short int WINAPI ReceiveResponse(short int, short int, LONG, short int, BSTR*, BSTR*, BSTR*);
extern DllImport short int WINAPI ReceiveData(short int, short int, BSTR*, short int*);
The following is how the two functions declared in VB6 which works perfectly:
Declare Function ReceiveResponse Lib "some.dll" _
(ByVal a As Integer, _
ByVal b As Integer, _
ByVal c As Long, _
ByVal d As Integer, _
ByRef e As String, _
ByRef f As String, _
ByRef g As String _
) As Integer
Declare Function crwReceiveData Lib "some.dll" _
(ByVal a As Integer, _
ByVal b As Integer, _
ByRef c As String, _
ByRef d As Integer _
) As Integer
The following is how I declared it in C# which doesn't work:
[DllImport("some.dll")]
public static extern int ReceiveResponse (
int a, int b, int c, int d,
String e
String f,
String g );
[DllImport("some.dll")]
public static extern int ReceiveData(
int a, int b, String c, int d);
If the way I declare in it C# looks good, I don't know why it didn't work. Perhaps somebody could help me out.
Thanks,
Tony
|
|
|
|
|
try out
[DllImport("some.dll")]
public static extern int ReceiveResponse (
int a, int b, int c, int d,
ref String e
ref String f,
ref String g );
it might help out.
rahul
|
|
|
|
|
DOH!
of course!
Thanks. It works now
-Tony;P
|
|
|
|
|
Try this:
using System.Runtime.InteropServices;
[DllImport("some.dll")]
private static extern int ReceiveResponse(int a, int b, int c, int d,
[MarshalAs(UnmanagedType.BStr)] ref string e,
[MarshalAs(UnmanagedType.BStr)] ref string f,
[MarshalAs(UnmanagedType.BStr)] ref string g);
|
|
|
|
|
hai,
iam capturing a image and storing the image in the database as binary format and also able to retrieve the image. once i edit the image and save the image its saving but sometimes its showing length of large bytes and also once edited and updated iam unable to retrieve the image , its giving out of memory error. i will show my updating code .pls help me....
SQL="Update VisitorPhoto set ID='"+ txtVisitorID.Text.Trim() + "',";
SQL+=" Length='" + m_lImageFileLength + "',";
SQL+=" Picture='" + m_barrImg+ "',";
SQL+=" Type='" + '1'+ "',";
SQL+=" upsize_ts='" + DateTime.Now.ToString("dd/MM/yyyy hh:mm:sstt") + "'";
SQL+=" where ID='"+ txtVisitorID.Text.Trim() + "'";
Db.Execute_Non_Query(SQL);
|
|
|
|
|
You should use blob operations. Do something like this:
SqlCommand command= new SqlCommand("UPDATE bla VALUES (@picture)",connection);
command.Parameters.Add("@picture", SqlDbType.Image, m_lImageFileLength).Value = m_barrImg;
ADO.NET then takes care of your picture in the correct way because you definied the correct type (SqlDbType.Image)
|
|
|
|
|
hai thank u for ur reply. i got it and updated using stored procedure.
|
|
|
|
|
Hi
Can anyone help me out in adding a design script to a script component in SSIS using C#
Tarsha
|
|
|
|
|
Dear All,
How do i read the database name and File Size and File growth Which i will provide in the XML File
How do extract the only the dbname from the XML File i specified here.
like
<xml>
<databasename>
<id> dbname
<name> shiv
<filesize>
<id> size
<value> 10
With GreatRegards,
Siva
|
|
|
|
|
u can use
dataset's readxml method
but u have to keep data in xml file
under proper tags.
rahul
|
|
|
|
|
Hi,
try to use a proper subject line.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi,
u can keep the items organised in proper tags like
<xml>
<dbname>shiv
<filesize>10
then u can declare a class
say
class DB
{
public string DbName;
public int Size;
}
then call deserialise method .
please refer deserialise method for proper syntax.
those who win are those who believe they can
|
|
|
|
|
Does anyone know what the C# equivalent of PHP crypt() function is?
Basically, PHP's crypt() is one-way encryption of data using DES or MD5 etc.
we used PHP's crypt() function to store passwords in database.
We are now migrating the application to C#. But the encrytion results in different results.
Worse yet, the DES encrption in C# is a two-way encryption, but the same in PHP's crypt() is one-way.
I've been searching for useful information everywhere but in vain.
Any help is greatly appreciated.
Thanks!
|
|
|
|
|
System.Cryptography has MD5 and other algorithms built in.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I use ControlPaint.FillReversibleRectangle to create a rectangle black on a white usercontrol background.
I want to creare a blue rectangle as a Selection rectangle.
how?
|
|
|
|
|
How do you use .split("key") without losing "key" from the seperation? I know this is possible using perl, but not sure about C#. Anyone have a solution?
|
|
|
|
|
If you use Regex.Split, you can use capturing groups to get the string you are splitting on in the result, or even parts of it.
Regex splitter = new Regex("(key)");<br />
string[] result = splitter.Split(theString);
---
b { font-weight: normal; }
|
|
|
|