|
At any given time the Datatable would only contain 9 records with 7 columns,It is a small table hence my manager wants me to show it in the body of email instead of moving the data to excel doc and then attaching it to the email.
|
|
|
|
|
Hi Guys,
Occasionally seen in License Agreements, The text containing in the Text Box is so long that the user has to scroll up and down to view the entire text (most users dont prefer to ). However, when I try to enter a long paragraph in the text box by braodening the length and breadth of the text box, I am only able to get a partial view of the paragraph, i.e., only half of the paragraph is visible and the other remains below which is not viewable. How can I implement the scrollbar in the text box which has long paragraphs to be insersed in, such that I am able to see the texts, no matter how long they are, using the scroll bar to scroll up and down?
I believe the this question is about desiging. It some code also must be implemented here, please tell me....
Your help will be appreciated....
Thanx, Rajdeep.NET!
|
|
|
|
|
|
Thanx Tom
|
|
|
|
|
Set the TextBox's Multiline property to true and ScrollBars to Vertical. It might be a good idea to set ReadOnly to true as well.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Thanx Davey!
|
|
|
|
|
Hi all,
i'm trying to create a OU in AD to have a otherWellKnownObjects attribute.
i can access the OU fine while connecting to it normally. but as soon as i try to access it via the otherWellKnownObjects attribute i get the error - "There is no such object on the server" and when i check the attribute in AD is it no longer set to null but i am unable to view its value!
any ideas?
Many thanks,
Phil.
|
|
|
|
|
I have spent some hours trying to read a checkbox enabled status on form1 from a different thread without any joy. Lots of research about Invoke etc has shown me how to write to the form but no clue as to how to read from the form. Can anyone here point me in the right direction please?
Cheers, Bruce
|
|
|
|
|
I didn't try it, but Invoke should do the trick to read a check box state.
|
|
|
|
|
Why use Invoke? Just read the control like usual..
private void btnReadControlThread_Click(object sender, EventArgs e)
{
Thread thread = new Thread(ThreadReadControl);
thread.Start();
}
private void ThreadReadControl()
{
MessageBox.Show("Enable status is " + cbEnableStatus.Checked.ToString());
}
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
Many thanks. Typical! me trying to overcomplicate things again. Cheers Bruce
|
|
|
|
|
Not sure about the safety of reading properties directly across threads as opposed to calling methods etc...
I suppose you could provide a GetEnabled (and if needed SetEnabled) method that use the property's getter (and setter) and call Invoke on that.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I try following code;
WebClient wClient = new WebClient();
wClient.DownloadFile("http://www.google.com", "C:\\google.html");
But those code do not download resource file (like css, image...). How can I download COMPLETE web page using with C#.NET
Best Regards...
|
|
|
|
|
Download the html page, use regular expressions or something similar to find references to images or css on the html,and download them as well...
|
|
|
|
|
Its really hard way.
I download http://www.google.com/
And I read source, find <img src=images/hp0.gif width=158 height=78 alt="Google">
Than I download http://www.google.com/images/hp0.gif
|
|
|
|
|
Hi Guys. I have a slight problem. My application usses EarlyBinding.where I reference Excel 12. Problem I'm having is that most of the machines targeted have Excel 10 or Excel 11 installed so when installing the App or running it I get a GAC error. This I know is that the versions are not backward compatable. My question is, how do I go from earlybinding to LateBinding with as little changes possible. Below I instanciate my Excel Workbook etc. My code is doing loads of stuff and I wouldn't want to rewrite all of it.
Microsoft.Office.Interop.Excel.Application objExcel =
new Microsoft.Office.Interop.Excel.Application();
objExcel.Visible = false;
Microsoft.Office.Interop.Excel.Workbook objBook =
objExcel.Workbooks.Add(System.Reflection.Missing.Value);
Microsoft.Office.Interop.Excel.Worksheet objSheet =
(Microsoft.Office.Interop.Excel.Worksheet)
objBook.Worksheets.get_Item(1);
Microsoft.Office.Interop.Excel.Range objRange;
Any advice would be appreciated.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
You can do this using something like this:
object xl = Activator.CreateInstance(Type.GetTypeFromProgID("Excel.Application"));
object books = xl.GetType().InvokeMember(
"Workbooks", BindingFlags.GetProperty, null, xl, null);
object book = books.GetType().InvokeMember( "Add",
BindingFlags.InvokeMethod, null, books, null );
object sheets = book.GetType().InvokeMember( "Worksheets",
BindingFlags.GetProperty,null, book, null );
object[] parameters;
parameters = new object[1];
parameters[0] = 1;
object sheet = sheets.GetType().InvokeMember( "Item",
BindingFlags.GetProperty, null, sheets, parameters );
parameters = new object[2];
parameters[0] = "A1";
parameters[1] = Missing.Value;
object range = sheet.GetType().InvokeMember( "Range",
BindingFlags.GetProperty, null, sheet, parameters );
parameters = new object[1];
parameters[0] = "1";
range.GetType().InvokeMember( "Value",
BindingFlags.SetProperty, null, range, parameters );
parameters = new object[1];
parameters[0] = true;
xl.GetType().InvokeMember( "Visible",
BindingFlags.SetProperty, null, xl, parameters ); I've just knocked this together in Notepad, so I apologise if it's not 100% perfect.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Cool, looks good though. My concern is when I start writing the data, for example see below portion of code.
objSheet.Cells[iR, iC] = CLIENTSURNAME.Trim();
objSheet.Cells[iR, iC + 1] = CLIENTFORENAMES.Trim();
objSheet.Cells[iR, iC + 2] = TITLE.Trim();
objSheet.Cells[iR, iC + 3] = "'" + ADDRESSLINE1.Trim();
objSheet.Cells[iR, iC + 4] = "'" + ADDRESSLINE2.Trim();
objSheet.Cells[iR, iC + 5] = "'" + ADDRESSLINE3.Trim();
objSheet.Cells[iR, iC + 6] = "'" + ADDRESSLINE4.Trim();
objSheet.Cells[iR, iC + 7] = "'" + POSTALCODE.Trim();
objSheet.Cells[iR, iC + 8] = LEVEL;
would I need to do the same as your example above
Pete O'Hanlon wrote: // get the "range" A1.parameters = new object[2];parameters[0] = "A1";parameters[1] = Missing.Value;object range = sheet.GetType().InvokeMember( "Range", BindingFlags.GetProperty, null, sheet, parameters );
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Yup. It's not pretty. I'd write some helper methods to do this if I were you.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Hi All,
Actually the problem is there is a task to be done "taking backup of message rules for an outlook profile".
How is it done:
- In outlook Open Tools.
- Select Rules and Alerts
- In Rules and Alerts dialog select "options"
- Click "Export Rules"
- This will create a .rwz file
So now i want to create this .rwz file programatically.
If any references, please post it..
Thanks in adv,
ashok
|
|
|
|
|
Hi,
I was using ms office 2003 in window application project to display information in word format now i have updated it, now i installed 2007.
Now word file not displaying some i don't know why.
Can any one tell me what will be the problem what should i do?
Please do replay.
Thanks
|
|
|
|
|
Did you used COM to communicate with office 2003??
|
|
|
|
|
|
If your problem is solved, please post the way by which you have solved....
It may be useful for someone else sometime.....
Have a Happy Coding.....
|
|
|
|