|
Hi, Tahnoon, and thank you for your reply.
As I said in my message, this involves a component (not a control). As we all know, the Name property is a property of the Control class, easily accessible for buttons, labels, etc.
However, when you need to access that Name property on a class that doesn't inherit the Control class, thus does not implement the Name property, what do you do?
Thank you again,
Calin, Toronto
|
|
|
|
|
Anyone plz tel me How to change column width in crystalreport at runtime
|
|
|
|
|
I think it's not possible to set width runtime but for displaying the data we can decrease the font size of that paticular column for data to display, which i am following.
Try Try Try....
|
|
|
|
|
I have made several derived buttons and have a backgroundimage on a customized form. My problem is when i use
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
in constructor and set the Color.Tranparent i get flickering when i moveover, -up and so forth.
I have tried doublebuffering and caching and it doesn't seem to eliminate that annoying flickering.
Can anyone help out ?
|
|
|
|
|
Try to capture space under the button to bitmap, on create, move or resize button events. And then draw this bitmap as button background.
|
|
|
|
|
Hi,
I am designing a page where I have two controls . One is TreeListView and one is listbox.
I like to populate the listview with the data from Database based on treelistview item selected.
I will click/check on one of the checkbox in TreeListView and that is used as input to fetch data from database.
Now my problem is when i click on a checkbox in treelistView the treeLIstViewItem checked property is not set till the TreeLIstView is displayed again. So i can not read the checked item(s) and cannot use it to fetch data from Db for the listbox.
I can see that next time i click on another item in treelistview the perviously selected/ checked
item Property is set but the item i clicked just now i cannot read it.
I have multiple child nodes for each treelistview item.
Is there any way i can read the value of the checked items before teh treelistview is displayed on clicent side.
Please help. I am to complete this task latest by tomorrow.
Any help will be appreciated.
Thanks!
|
|
|
|
|
i have moved the application to another machine, i moved the database successfully but the problem that when i open the report it displays the last query before moving i tried to use
rptcust.SetDatabaseLogon(UserName,PassWord,ServerName,DataBase);
but no changes happened and the new added records does not appear in the report.
|
|
|
|
|
I think u to have once again set the connection for ur database in the report design which would propably work.
TRY TRY TRY.....
|
|
|
|
|
vamsimohan21 wrote: set the connection for ur database in the report design
of course it will work. but it is not a solution
|
|
|
|
|
Hi,
I'm getting a strange error when trying to run my form with DirectX on another computer (on my own it's fine). I get:
Additional information: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
This problem has popped up ever since I added a panel that uses DirectX. To see if it could be something I did, I ran a simple, beginner directx file (from Tom Miller's Managed DirectX 9 book) on my computer and then copied those files to the other computer, and it again didn't work, although this time giving me the error:
An unhandled exception of type 'System.Security.SecurityException' occurred in Lights.exe
Additional information: Security error.
I then added messageboxes to see how far the thing ran before having issues. It didn't go far. I start with the usual Main() entry point:
Application.Run(new Tabs());
Then
private Tabs()<br />
{<br />
MessageBox.Show("begin");<br />
InitializeComponent();<br />
panel1.Visible = false;<br />
tabControl1.Visible = true;<br />
...}
Then under
InitializeComponent()<br />
{<br />
MessageBox.Show("start-ic");<br />
...<br />
}
When running the program, the "begin" messagebox appears ("start-ic" doesn't), and a Just-In-Time Debugger pops up. I run a new instance of Visual Studio .NET, the line after InitializeComponent() gets the yellow highlighting, and the System.Security.SecurityException warning comes up (the long version from above).
I've found info from people having the same exception as my first one, but they're all getting those errors when trying to connect to a database or the web which I definitely don't do.
Any ideas why this could be happening? It works fine on another computer if I create a plain form.
Thanks for any help/ideas!!!
Mel
-- modified at 16:31 Wednesday 12th April, 2006
|
|
|
|
|
1. Make sure the Managed DirectX runtime is installed on the target machine.
2. Make sure you're not running the application from a network share.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: I luv teh choco
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Hi!
You can set .NET security settings from a control panel: Microsoft .NET Framework 1.1/2.0 Wizards.
Could it be that you're running your program from a non-local disk? In that case, the framework won't allow the code to do everything locally running code is allowed to do. But you can adjust the permissions using the afforementioned control panel.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Thanks! That worked.
Mel
|
|
|
|
|
Hi, I'm building a chat program using Asyncronous Sockets, but want to secure or encrypt the transfer between client and server. At the moment I'm using TcpListenter and TcpClient sockets and all messages are routed through the server.
Can anyone advise on the best way to secure the transfer simply and efficiently (so it doesn't degrade speed too much)?
I'm also looking into authentication (login) between client/server and wondered if there is any information on how to implement this in c#. I've initially looked at using MD5, but is there any better ways for secure login...?
Any help appreciated!
|
|
|
|
|
Have you looked into the System.Security.Cryptography namespace? There are several encryption algorithms that do most of the work for you that can be useful in encrypting data. There are also some encrypted stream objects you could use for encrypting data between client and server.
|
|
|
|
|
Thanks very much, I'll look into those. Would you recommend any in specific? I'm hoping to not compromise in speed, as the messages are already routed through the server.
|
|
|
|
|
Any cryptograhpy is pure overhead. There will be a speed hit as you have to encrypt it on one end and decrypt it on the other end. But generally speaking, it shouldn't be too much of a performance hit. Best way to know is to try some out and see the results.
|
|
|
|
|
Lastly, in your view, is it relatively easy to implement an encrypted network stream?
Thanks for all the help Judah, don't really have time to test due to deadlines, but will give it a go.
|
|
|
|
|
I would venture a guess and say yes, since it's still a System.IO.Stream underneath, with the same familiar methods. But it really depends on your surrounding code; if lots of code is expecting it to act one way, you're going to have to make lots of changes. OTOH, if your code is isolated to the point where only the sending and receiving methods are expecting a regular old stream, you'll only need to change it in those 2 places.
|
|
|
|
|
I am puzzled on how to proceede with this issue! I have a text file that has information that I would like to extract out and save to another file.
I am able to read the file and write the file I am having a hard time figureing out how to extract the data I want out.
Any help would be greatly appreciated
Thank you
Hella
|
|
|
|
|
If it's a text file,
string textInFile = System.IO.File.ReadAllText("thefile.txt");
System.IO.File.WriteAllText(textInFile);
|
|
|
|
|
Sorry, I should have clearified a bit more...
I have no problem reading the file and writing the file! The only thing is I don't want to print out all the contents of the file just specific text in the text file.
From my example file I would want to get the Time and this ftp: 6384000 bytes sent in 84.73Seconds 75.35Kbytes/sec.
Once I figure out how to parse out this info I can acomplish the rest. I am pretty sure I have to use an array... But array's are a little tricky for me.
The text file I would like to pick a part!
05:29 PM
ftp> Connected to 192.168.100.115.
open 192.168.100.115
220 Connected to Intermec IFTP server. Version 2.11.
User (192.168.100.115:(none)):
331 Password required!
230-===============================
Intermec FTP server ready!
Version 2.11. WINCE
0010400D7B4C 36310500129 730
Binary transfer mode only!
===============================
230 Logon successful.
ftp> Local directory now C:\Documents and Settings\burlagr\Desktop\FTP_Transfer\Files.
ftp> lcd "C:\Documents and Settings\burlagr\Desktop\FTP_Transfer\Files"
cd "Flash File Store"
250 Current directory changed to "/Flash File Store/".
ftp> binary
200 Type set to I.
ftp> Hash mark printing On ftp: (2048 bytes/hash mark) .
ftp> hash
ftp>
mput test88.txt
mput test88.txt? yes
200 Port command successful.
150 STOR: Command accepted!
########################################################################################################################################################################################################################################################################################################################################################################################################
226 Transfer Complete.
ftp: 6384000 bytes sent in 84.73Seconds 75.35Kbytes/sec.
ftp> ftp>
|
|
|
|
|
|
Unfortunatley the data is not a .csv file... But would it be easier if I just concerted the .txt file over to a csv file? So there is whitespace that I have to deal with.
|
|
|
|
|
The Regex pattern could get as detailed as you like.
Untested:
<br />
using (StreamReader sr = new StreamReader("File.txt")) <br />
{<br />
string line;<br />
while ((line = sr.ReadLine()) != null) <br />
{<br />
if Regex.IsMatch(line, @"\d+ bytes sent")<br />
Console.WriteLine(line);<br />
}<br />
}<br />
- Bitwise
|
|
|
|