|
Kevin McFarlane wrote: May as well be up-to-date. Learn C# 2.0 with VS 2005.
Sounds like a good idea but I'm sitting with the problem now that I have to develop an application for a device that operates Windows CE.NET 4.2 (and consequently .NET Compact Framework 1.0) for which VS 2005 is useless it seems. I'd love to be proven wrong here.
It just doesn't make sense to me. So much for backwards compatibility. Or did Microsoft think that when they release VS 2005 all older terminals and devices will stop existing?
|
|
|
|
|
MS do have a tendency, especially these days, to force you to have the most up-to-date of everything. Or rather if you use one of their latest tools you generally have to update the complementary ones too.
Kevin
|
|
|
|
|
hi
would you please answer my question
How to display HTML Document within an application form ?
thank you
|
|
|
|
|
Easiest way, put a web browser control on your form. Otherwise, I guess you need to parse the HTML yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: I guess you need to parse the HTML yourself
I had to do that once. The code for it is not pretty, I can tell you. It wouldn't be so bad if html was always strict, but the transitional dtd's really cause problems.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thank you so much for your reply ...
Could be possible ... !!
The HTML document is a HTML file
What is the code to make the web browser control display the file ?
Thanks again
|
|
|
|
|
If you're using .NET 2 and the Web Browser control, there's a property called Url. Just set that to the URL you want.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thank you so much, i will try it
|
|
|
|
|
Use the WebBrowser control
|
|
|
|
|
my CustomWebControl has a property like:
string[] _size;<br />
[PersistenceMode(PersistenceMode.InnerProperty), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public string[] StringCollection <br />
{ get{ return _size; } <br />
set{ _size = value; } <br />
}
It can be designed, but when I visit a aspx page which contain my customcontrol, it show errors, how can i do..? thanks
|
|
|
|
|
Hi,
When i run my app a listbox on the main form loads data from xml in the formload event.
when they want to edit a record they select a record in the listbox and click the edit button. then an editrecord modalform shows. after they made their changes and click save the form closes and gets back to Main form.
Now my question is how can i refresh the listbox after a record has been edited through the edit form?
mmm this may bee a dumm question but its weird i just dont know how lol.
Thanks
GermanD
|
|
|
|
|
The code to load your listbox is in the Onload ? Factor it out to a method, and call it again when your modal form closes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yip i as soon as the form loads the listbox get populated.
hmmm i dont fully understand how to do that i have never made a mthod out of an event before.
Could you please give me some hints on how to deal with this?
Thanks for your response
regards
|
|
|
|
|
hi,
What Christian ment is that you should create a function in you first form. This function should contain the code that gets the information and put them in the listBox. This function should be separate from the form1_onLoad event.
For example:
you should create a function like this:
public void getInformation(){<br />
..
}
then you call this method in the form1_onLoad function
public void form1_onLoad(object sender, evnet...){<br />
getInformation();<br />
}
after that when you create the next form you should give it a reference to the fist form
example:
form2 f = new form2(this);<br />
f.show();<br />
note that the constructor of the second form should contain an argument that take an object of type form1.
example:
public form2(form1 frm){<br />
.........<br />
}
and on the save button of the second form you just enter this line of code
<br />
frm.getInformation();<br />
do as i told you and it will work
Jamil Abou Khalil
|
|
|
|
|
oh ok lol thanks for your help guys I managed to find another solution thought are faster and easy one.
All I did was:
<br />
if (EditAccount.ShowDialog() == DialogResult.OK)<br />
{<br />
Populate();<br />
}<br />
else<br />
{<br />
<br />
}<br />
So i just set the dialog results on the buttons as OK and Cancel on the edit form.
I cant believe I missed this lol duh
thanks again guys
|
|
|
|
|
Good Work!!!
Jamil Abou Khalil
|
|
|
|
|
Hello,
I have an instance of System.Drawing.Bitmap that I whant to send to a defined Printer.
No idea how to do that.
If its only possible over a file, I would use the Bitmap.Save() Method to save it somewhere temp.
But I would prevere a solution without saving to a file.
I get the printers out of the System.Drawing.Printing.PrinterSettings.InstalledPrinters.
I looked into namespace System.Drawing.Printing, too following classes:
PrinterSettings (Here I could set the printer name)
PrintDocument (There is a Print() Method)
But I have no idea how too tell the PrintDocument which file or better Bitmap, too print.
Best solution for me would be without DialogBoxes. (No interaction for the user)
I would really be thankfull for your help.
Martin
|
|
|
|
|
Hi,
you are principally working with the correct classes. If you have configured yor PrintDocument and PrinterSettings with all required settings than call Print() on the PrintDocument. It will raise a PrintPage event. You'll have to catch this. The event arguments provide a Graphics object where you can draw your bitmap into.
Robert
|
|
|
|
|
OOOOOOOOOh,
I found such a solution somewhere, but didn't whant too believe that after the event was fired, I could change some data.
I will try it now and tell you what happens.
Thank you very much for helping so fast..
Martin
|
|
|
|
|
Thank you again Robert.
It works fine!
I used:
e.Graphics.DrawImage(Bitmap,0,0);
for the conversion.
Hope this is the recomended way to do it.
All the best,
Martin
|
|
|
|
|
Hello...
It seems Label.TextAlign doesn't work anymore in VS2005.
I just put a label at the right side of my form and set TextAlign to MiddleRight. Then I just write something long, for example "ABCDEFGHIJKL...".
The label grows not to left, but to right. I try to set the size using property window, it doesn't work also. The size seems to be set automatically.
Has anybody any solution for this ?
Thanks...
|
|
|
|
|
Hi,
I think the different behaviour comes from the fact that in VS2005 the AutoSize property is by default set to true and not like in VS2003 to false.
Robert
|
|
|
|
|
Hi All,
I am Working in C#.Net Technology (Window Based Application).My Problem is that ,I Want to display a Image in DataGridView cell.Iam able to display different Images In different cell of particular Column,But my problem is that Iam getting the image of a Exact Size.What I wan is to Scale a Image so that Whole Iamge is Visible In a Small Size not a Part Of it.
Can any body guide me .
Rahul Joshi
|
|
|
|
|
Hi,
I assume you are using a DataGridViewImageColumn. It has a ImageLayout property where you can set the resizing behaviour.
Robert
|
|
|
|
|
Hi Robert,
Thanks for replying
But Sorry to say It's not working in the Desire way.
( ColumnName.ImageLayout = DataGridViewImageCellLayout.Stretch;)
Rahul Joshi
|
|
|
|