|
The problem is still the same.
My guess is that it has got to do something with the key. But what i wanted is symmetric encryption without any password key.
|
|
|
|
|
Hi nitin_ion,
The way you have set it up, you generate a new random Key every time you create an instance of the class. The result is that you will only be able to encrypt the text, as you need to use the same Key (and IV) to encrypt and decrypt.
Hope this helps
//LO
|
|
|
|
|
Hi I've been trying to add node the main branch of TreeView.I must do it in For.......Next.
I don't want to use this code.
TreeView1.Nodes(0).Nodes.Add("Main Branch")
TreeView1.Nodes(0).Nodes(0).Nodes.Add("1. Sub Branch")
TreeView1.Nodes(0).Nodes(0).Nodes(0).Nodes.Add("2. Sub Branch")
I'm waiting your help.
|
|
|
|
|
Store the result of the previous Add method and reuse it the next time. Something like
previousNode = TreeView1.Nodes(0).Nodes.Add("Main Branch")
For i = 0 to n
previousNode = previousNode.Nodes.Add( i.ToString() & "Sub Branch")
Next i
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Use Recursive Functions
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
For i As Short = 0 To 4<br />
TreeView1.Nodes.Add(i.ToString & ". MAIN NODE")<br />
AddNode(TreeView1.Nodes(i), 3, 1)<br />
Next<br />
End Sub<br />
<br />
Protected Sub AddNode(ByVal Node As TreeNode, ByVal SubNodeCount As Integer, ByVal Level As Integer)<br />
'Level is used to end function<br />
If Not Level > 3 Then<br />
For j As Short = 1 To SubNodeCount<br />
Node.Nodes.Add(j.ToString & ". SUB NODE LEVEL (" & Level & ")")<br />
AddNode(Node.Nodes(j - 1), 3, Level + 1)<br />
Next<br />
End If<br />
End Sub
-- modified at 3:28 Monday 24th October, 2005
|
|
|
|
|
How can I use RegEx to hightlight a word that matches in Richtextbox?
Dim myRegex As New Regex("home address|business address")
Dim matches As MatchCollection
Dim xMatch As Match
If myRegex.IsMatch(Me.RichTextBox1.Text) Then
MsgBox("it works")
me.RichTextBox1.SelectionFont = ?
Me.RichTextBox1.SelectionColor = ?
Else
MsgBox("it does not")
End If
End Sub
|
|
|
|
|
|
I want to dynamically create a crystal report from .net code. Is ist possible.
Actually i have 20 fields in a table and i want to give user the option to select the fields he wants to view. Then genrate the report on the fly.
is it possible.i searched internet but could not find anything useful. all i could find is the reports or template are generated at designtime with the feilds added on them. but i donot want that i want the report to be created dynamically on th fly with user selected fields. The problem is if i create a template with 20 feilds which will be fixed and user selects first and lastfield then the space between those feilds cannot be adjusted. it will be blank. is there any othe solution for this.
any help will highly appreciated.
Thanks
Monica
|
|
|
|
|
I am using PrintDocument to Preview and print my data.
I want the duplex printing (My printer supports it).
When I execute
e.HasMorePages = true;
in Print event of myPrintDocument object. It keeps on printing the pages and starts the printing right from the beginning of my code in Print Event
(I think it is recursive?)
Please help me.
-- modified at 12:00 Saturday 22nd October, 2005
|
|
|
|
|
"e.hasmorepages=TRUE" means re-raise PrintPage Event.
What u wantto do?
|
|
|
|
|
I just want to print the next page (and avoid recursion). Don't want to execute the Print_Page code again for the page I have already printed.
|
|
|
|
|
Use something like that at below . If u still have problem send email to me with sample what you did ,
Dim PageNumber As Integer = 1<br />
Dim PageCount As Integer = 5<br />
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage<br />
Select Case PageNumber<br />
Case 1 : PrintFirstPage(e.Graphics) : e.HasMorePages = True<br />
Case PageCount : PrintLastPage(e.Graphics) : e.HasMorePages = False<br />
Case Else : PrintOtherPages(e.Graphics) : e.HasMorePages = True<br />
End Select<br />
PageNumber += 1<br />
End Sub<br />
<br />
Protected Sub PrintFirstPage(ByVal g As System.Drawing.Graphics)<br />
'PRINT PAGE<br />
End Sub<br />
Protected Sub PrintOtherPages(ByVal g As System.Drawing.Graphics)<br />
'PRINT PAGE<br />
End Sub<br />
Protected Sub PrintLastPage(ByVal g As System.Drawing.Graphics)<br />
'PRINT PAGE<br />
End Sub
|
|
|
|
|
I want to know how to copy file using code vb.net
|
|
|
|
|
How abourt posting the code your using. How does source get assigned? How does does dest get assigned? You could keep asking this question, but if don't understand the basics, you'lre never going to understand the answers either.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I know how to assign the source and destanation address of the file
for ex
file test.txt located in c:\ I want to copy it in e:\
dim pth as string="c:\test.txt"
dim pth2 as string="e:\"
file.copy(pth.pth2)
it dosent work
AMR-CIS
|
|
|
|
|
Don't delete your previous messages please. It makes it hard to track the conversation and takes away information from people joining in later.
Well, without knowing the exception that's being thrown (if any, hint hint!), the 5 most common problems are:
1 - The source file spec doesn't exist.
2 - The source file is locked by another process and can't be opened for read.
3 - The destination spec doesn't exist.
4 - The destination file path already exists and your trying to overwrite a file without telling the Copy method to do so.
5 - You don't have the appropriate permissions to write to the destination folder.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does VB have the @ for strings to show that there's no escaping going on ? Or does it work totally differently in VB ? I'm just wondering if his strings are actually containing what he thinks.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No. All strings in VB are considered literal. There's nothing to escape.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
dim pth as string="c:\test.txt"
dim pth2 as string="e:\test.txt"
system.IO.File.Copy(pth,pth2)
|
|
|
|
|
Thanks its was small problem
AMR-CIS
|
|
|
|
|
hi
i've datagrid filled with some data,i used dataset to fill datagrid
Now i want to add some data to this existing(already populated) datagrid using datareader.
How can i do this?
if it's not possible to add using data reader can i do using arrays
|
|
|
|
|
can a datagrid populate with using datareader?
If u created table , add new row to the table then Refresh datagrid.
|
|
|
|
|
as per my knowledge we can't populate datagrid using datareader.any way can u tell me
how to bind two dimensional array to the datagrid
|
|
|
|
|
|
i got this ,thanq for response
|
|
|
|