|
Hello guys.
I'm wonder about differences between VS2008 and VS2008 Express Edition !
Could you explain the most differences between them ?
Thank you
|
|
|
|
|
|
See here[^].
Cheers,
Drew.
|
|
|
|
|
Hi ppl
Lets assume i have 2 forms. Activity is hide one and show another. Just vice-versa.
Now everytime I have to create new form for which i want to show. Is there anyway to detect which form is hide or which instance have already created??
Pls help me thanks
|
|
|
|
|
I dunno what you're doing but you can know forms hidden status through Visible property
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
No Xen. thats not im asking for. I know that property.
My ques is how to detect from programaticaly.
Lemme explain again..
2 forms. Default open form1. when i click a button in form1, it will hide
exm. form1 code
{
this.hide();
form2 frm2 = new form2;
frm2.show();
}
Then show form2. In that form when i click button then it will show form1 again.
Now my problem is for showing i have to create form1 instance.
exm. form2 code
{
this.hide();
form1 frm1 = new form1;
frm1.show();
}
I dont wanna create another instance of form1.
Any way to do it.
Thanks
|
|
|
|
|
make an object of Form1 in Form2
in form2
public form1 form1inst;
in form1
form2 f2 = new form2();
f2.form1inst = this;
this.hide();
f2.Show();
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
What Xmen suggests is your solution. Since form1 derives from the Form class, you can also use a Form variable instead of a form1 variable. Going a step further, you can store the reference in a Control variable:
public Form FormRef
form2.FormRef = form1
or
public Control ControlRef;
form2.ControlRef = form1;
Both of these options will not limit your from storing one type of form and will make your code more flexible.
Happy coding!
There cannot be a crisis today; my schedule is already full.
|
|
|
|
|
sorry i cant understand ur code 1st time
but i tried to apply and its not working.
Its a nice way.
Thanks
modified on Wednesday, March 11, 2009 6:16 AM
|
|
|
|
|
Forgive me if this is stupid, but can't you create both initially as hidden, then alternately show/hide them? I've never tried it, as I'm just trying to learn the language, but it seems that it ought to be possible.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
I have a dataset that contains a query stateing the following:
select * from table where id = @id.
This query works fine. The problem I am having is that I have 2 Windows forms, Form1 contains a datagrid and Form2 contains the textboxes, comboboxes etc.
How can I double click on a record in the datagrid and then that record should populate form2?
I know it should be handled in the datagrid_doubleclick method but How can I let Form2 know that I have double clicked on id 1?
Illegal Operation
|
|
|
|
|
you'll setting dataSet public,when form2 load and for form2 data
|
|
|
|
|
Can you possibly give me an example of what you are saying?
Illegal Operation
|
|
|
|
|
use MouseDoubleClick instead...
Point p = dataGridView1.PointToClient(new Point(e.X, e.Y));
DataGridView.HitTestInfo tmp_hinfo = dataGridView1.HitTest(p.X, p.Y);
if (tmp_hinfo.RowIndex == -1 || tmp_hinfo.ColumnIndex == -1)
return;
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
what you can do is provide an overload constructor for the second form that takes a datarow as a parameter
<br />
public Form2(DataRow drow):this()<br />
{<br />
this.text1.text=drow["Name"].ToString();<br />
}<br />
and as to figuring out which data that has been selected just handle "CellDoubleClick" and/or "RowHeaderMouseDoubleClick" events and then send the datarow selected by using the selected row from the event handler argument. like in this code:
<br />
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)<br />
{<br />
new Form2(dataGridView1.Rows[e.RowIndex].DataBoundItem).Show();<br />
}<br />
hope this does the trick for you
|
|
|
|
|
I need to convert a coded string back to its original ascii charcters in c#.
The string has been coded by a vb6 application that I dont have the encoding code for but I do have the decodeing code as detailed below.
Public Function QLDecryptPassword(ByVal strPassword As String) As String
Dim intCharCounter As Integer
Dim intCharASCII As Byte
Dim strDecryptedPassword As String
If (strPassword = vbNullString) Then Exit Function
intCharCounter = 1
For intCharCounter = 1 To Len(strPassword)
intCharASCII = Asc(Mid(strPassword, intCharCounter, 1))
intCharASCII = 255 - intCharASCII
strDecryptedPassword = strDecryptedPassword & Chr(intCharASCII)
Next
QLDecryptPassword = strDecryptedPassword
End Function
can someone please let me have the equivelent c# code.
I have had a go using byte, byte[], char[], int convert.toint16,32.........etc but I just cant seem to get there.
any help greatly appreciated.
Bryden
|
|
|
|
|
The code makes very little sense to me, but you can get the ASCII encoding of a string easily: Encoding.ASCII.GetBytes("some string") gives a byte[] containing the ASCII values.
|
|
|
|
|
Hi,
the highest threshold you have to overcome is the fact that all .NET languages have strings consisting of Unicode characters which take 16-bit each.
Now your original decryption code is taking a series of (unsigned) bytes and complementing all the bits (that is what x=255-x basically does); BTW encryption would have to be identical to one undoes the other.
The first decision to make is whether you want to deal with your password as a string or as a byte array. The natural thing to do is a byte[], since it isn't really a string in the .NET sense nor in any other sense, it just accepts all possible bit patterns without giving them any particular meaning, i.e. it is just binary data, hence best represented by a byte[].
So it could be as simple as:
public void crypt(byte[] data) {
for(int i=0; i<data.length;>}
which modifies the array content in place, useful for both "encrypt" and "decrypt" (quotes due to the fact that it doesn't offer much protection against prying eyes).
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi,
I see Luc has beaten me to it.
Chances are that the old programme represents the string as single bytes so you should read the encrypted password into a byte array and decrypting will then just be some simple arithmetic.
To turn the the byte array into a unicode string you will need to select the correct encoding. The obvious one to try is Encoding.ASCII but this won't work if your data has character codes above 127. Windows 1252 is a single byte encoding, "provided for compatability with legacy systems" and is most likely correct.
Alan.
Example code:
public string QLDecryptPassword(byte[] encryptedPwd) {
byte[] decodedBytes = new byte[encryptedPwd.Length];
for (int i = 0; i < encryptedPwd.Length; i++){
decodedBytes[i] = (byte)(255-encryptedPwd[i]);
}
Encoding coding = Encoding.GetEncoding(1252);
return coding.GetString(decodedBytes);
}
|
|
|
|
|
thank you for the prompt answers and code examples.
I now have a working decrypt function so i can start pulling my hair out (what little i have) on the next bit of the program..........
|
|
|
|
|
I have returned with my "small" problem.
Short overview:
1) Problem was/is that my graphics disappeared when you move them out of screen borders and pull them back or put some other window over them.
2) Graphics are updated every time I move my trackbar (which gives values to function to draw the graphic based on the values)
So I've made some progress, but still stuck on other part.
I have 3 different functions, one for graphic, second for graphic and third for axis.
I solved the paint problem with Axis, since its static and never changes, so it was quite easy to convert to paint event. On the other hand, graphs have both 2 parameters that they receive and the graph changes after that according to the values given.
Example : public void JoonistaGraafik(int k1, int k2)
now when I want to make it to paint event "public void JoonistaGraafik(object sender,PaintEventArgs e, int k1, int k2)"
I have problem calling out in InitializeComponents();
this.GraphPanel.Paint += new System.Windows.Forms.PaintEventHandler(JoonistaGraafik(slider_a, slider_b));
the thing is that, my two values "slider_a" and "slider_b" are generated in the trackbar_scroll event and then JoonistaGraafik(slider_a, slider_b); was called out.
I'm pretty bad in explaining, but I hope that made a bit sence.
In conclusion, the question is, how can I call out
"this.GraphPanel.Paint += new System.Windows.Forms.PaintEventHandler(JoonistaGraafik(slider_a, slider_b));"
if the slider_a and slider_b values have to change when I move the trackbar.
Or how can I make a paint event which gets values from trackbars (means the graphic has to update itself every time trackbar is moved).
Thanks for reading, and I hope someone can help me out (again).
|
|
|
|
|
StuffyEst wrote: Subject: Graph Disappear Problem vol 2
I didn't knew, now questions come in volumes.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
well I have old post but thats like on page 30.. and I have serious doubts people care to watch pages that far.
|
|
|
|
|
Hi,
I gave you all the necessary information 5 days ago[^], and I can tell you there is no way around doing it all in the Paint handler. You simply must, it is the only way to get it to paint whenever something needs repainted (as with uncovering part of your window when it has been covered by something else; as with resizing, minimizing and maximizing a window; as with printing which can reuse all the painting code; etc).
In your specific situation, if you have two parameters that may change and cause your drawing to become invalid, what you do is:
1. store the drawing parameters that define your drawing as class members
2. draw everything (say on myPanel) in its Paint handler based on those parameters
3. and change those parameters where ever you feel you need to; and when you do change them, call myPanel.Invalidate() which will eventually result in myPanel.Paint() to be called automatically.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thanks a lot, finally got it all working as I wanted
|
|
|
|