|
Hi All!!!
I want to show only the shape of my form which i specify e.g. i would liek to draw a form like triagle or in circle or any opolygon. How would i do that rest of the form becomes transparent and only this portion is shown?
Thanx in advance
sorry for my bad English.
|
|
|
|
|
You can start by reading up on non-rectangular forms here[^].
RageInTheMachine9532
|
|
|
|
|
i have the following code, this code will fetch me the http text only without the pictures so how can i get the pictures
<br />
WebProxy proxyObject = new WebProxy();<br />
<br />
proxyObject.BypassProxyOnLocal = true;<br />
GlobalProxySelection.Select = proxyObject;<br />
WebRequest req = WebRequest.Create(url);<br />
WebResponse result = req.GetResponse();<br />
Stream ReceiveStream = result.GetResponseStream( ) ;<br />
StreamReader sr = new StreamReader( ReceiveStream ) ;<br />
Char[] read = new Char[256];<br />
int count = sr.Read( read, 0, 256 );<br />
while ( count > 0 ) <br />
{<br />
String str = new String(read, 0, count);<br />
Response.Write(str);<br />
count = sr.Read(read, 0, 256);<br />
}<br />
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
Use regular expressions or complex string comparisons (obviously, the former is recommended) to find all supported attributes for linked content, such as SRC and HREF (in a LINK element, not an A element). If a BASE is in the header, be sure to resolve the URLs with that, otherwise use the current directory of the HTML document. Combine the absolute and relative paths (the Uri constructor does a good job of this, so see the Uri class documentation) and then download the content.
FYI, it may be much easier to read this into an IHTMLDocument2 and use MSHTML to save it for you, since it intrinsically knows all the linked content. See Reusing MSHTML[^] for more information. Experience with COM will be helpful.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
How do you show properties of an object in a object collection editor,
eg. Panels collection???
|
|
|
|
|
You'll have to ellaborate a little on this...
Are you talking about DesignTime or RunTime?
Are you looking at extending the VS.NET Environment to include your own custom property UI Editor?
RageInTheMachine9532
|
|
|
|
|
How come this doesn't work? He doesn't save the data you edit in the datagrid
Thx in advance!
private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{ //get the node out of the xml-file
string pad = "//school[@naam='" + comboBox1.SelectedItem.ToString() + "']";
XmlDocument xml = new XmlDocument();
xml.Load(@"c:\nodes.xml");
XmlNodeList contactNodes = xml.SelectNodes(pad);
string box = contactNodes.Item(0).OuterXml;
//write the node to a new file so it can be loaded into a dataset
xml.LoadXml(box);
XmlTextWriter xmltw = new XmlTextWriter(@"c:\testnodes.xml",new UTF8Encoding(false));
xml.WriteTo(xmltw);
xmltw.Close();
DataSet ds = new DataSet();
ds.ReadXml(@"c:\testnodes.xml");
dataGrid1.DataSource = ds;
dataGrid1.DataMember = "school";
}
private void button1_Click(object sender, System.EventArgs e)
{
ds.WriteXml(@"c:\testnodes.xml");
}
|
|
|
|
|
Call dataGrid1.DataBind() function after setting DataSource property.
|
|
|
|
|
it sais that function doesn't exist
'System.Windows.Forms.DataGrid' does not contain a definition for 'DataBind'
DataBindings is in the list but i don't know how to use that
anyway thx for your answer
|
|
|
|
|
Sorry DataBind is for Asp.Net datagrid
DataSet ds = new DataSet();
ds.ReadXml(@"c:\testnodes.xml");
dataGrid1.SetDataBinding(ds, "school");
You can find it here
|
|
|
|
|
thx! i tried it but it still doesn't save the data in the datagrid
|
|
|
|
|
In your code you always write testnodes.xml file getting info from nodes.xml on comboBox1_SelectedIndexChanged . So you read data from one file, select, and than write to another file?(button1_Click ).
|
|
|
|
|
yes that's right,
later on i will take the node from testnodes.xml en place it back into nodes.xml
|
|
|
|
|
Hello,
I have a question of customizing the tree node of .NET FrameWork.
How can I add a picture box to treenode towards right side of the
treenode text.
Bye.
|
|
|
|
|
This is an incredibly difficult task because the TreeView is responsible for drawing the entire surface, not like pieces of it like a ListView . Like other controls, the TreeView encapsulates its common controls equivalent, namely the Tree-View. This class was not designed with owner drawing in mind.
Many attempts have been made to owner draw the tree, but none are very good at all. You're much better off using a third-party control like that from http://www.infragistics.com[^] (UltraWinTree). We use it for our products and it's very extensible with a drawing model that's easy to extend.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I want to know how to change the font, or size of MessageBox.
Help me please.
Thanks in advance.
Mr Duc Linh Nguyen
|
|
|
|
|
You can't, not without changing the system font. It encapsulates native calls, namely the MessageBox native API.
If you want a different look, create your own Form and make it work similarly if you like.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello,
Now I develop a dialog included splitter control.
After moving splitter control, I regist splitter location
in registry. In this case, I get location using splitter_moving event(SplitterEventArgs).
And I restart this dialog.
I set location. The following is setting code.
this.splitter1.Location = new Point(x,y);
But I couldn't.
I think this solution is no problem.
If you have some ideas, please tell me.
regards,
yu-yu
|
|
|
|
|
Don't waste resources saving the position every time it moves, but rather before the control is disposes (like when the container form is closed, which is also the best time to save any other positions and sizes you want). Some applications will save this data AFTER a change to make sure it is saved in cash of a crash, but don't do it while it's moving. You could, for instance, do this in the handler for the SplitterMoved event. See the documentation for the Splitter class in the .NET Framework SDK for more information.
The property you're looking for is Splitter.SplitPosition , as documented in the .NET Framework SDK. This is the distance (in pixels) between the location of the splitter and the side it's docked to (so if Splitter.Dock is set to DockStyle.Left (default), then SplitPosition set to 100 means it's 100 pixels from the left border of its container).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello,
Thank you for your advice.
I tried to do, but I couldn't do using splitterMoved event (always position is zero).
I used SpliiterMoving event, so I get position of splitter (SplitX, SplitY).
And I set Y position to Splitter.SplitPosition.
But time to do is long.
I checked MSDN and etc.
regards,
yu-yu
|
|
|
|
|
I have a table,it includes three columns :
studentID, name, score. There are a few records in the tale. The data in the table will be transferred across network. Now I want to write a class to packs these data into a packet in the client end,and unpack the packet in the server end.How to do it?
Thank you!
|
|
|
|
|
liu123jian123 wrote:
I want to write a class to packs these data into a packet in the client end,and unpack the packet in the server end
Using what technology? Or does it not matter?
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Hey
We are working on a smal game project.
In this project ve are al doing Windows Control Librarys, for example. The List that shows al online clients is one Windows Control Library and the chat window is one Windows Control Library and so on.
This Windows Control Librarys is including other dll files that is updated over time. One of this dll files is caled Transfer.dll, almost every Windows Control Library includes this file, but somtimes thay got a older version.
The dll files that our Windows Control Librarys uses is lokated at one place (/bin/debug), and this is for al the Windows Control Librarys. so when we adds this Windows Control Librarys to the main projekt form we only whant to have one dll file of each in /bin/debug.
There is some problem with this.
Exempel one
I have hade many versions of one dll file, say Transfer.dll on my computer. A friend that works on this project also have placed together the controls in one project, and got it to work on his computer.
But...
When he have sent me the projekt i look in the catlog (/bin/debug) and se that the versions of the dll files is the new ones. When i then start up the project o get some warnings about dependency, and i notic that some of the dll files is now an older version then before i open the project in Visual Studio.net at my computer.
How could this be? i cant compile it, and i got alot of errors.
I have lookt at msdn but i dont realy understand what thay are talking about, its som Asambling i shold copy to the bin directory..
I have taken the Asembliinfo in the main projekt och copy it to the bin/debug directory, but this dident solve the problem.
Pleas can somone help us understand this as easy as posible, and how to solve the problem?
We whant al the Windows Control Librarys to share the same dll files that lays in bin/debug, and even if we update some of this dll files the Windows Control Librarys will be abled to open them(if the funktions thay use is still in there)
//Jimmy
|
|
|
|
|
First, you should use project references instead of assembly references when you have multiple projects in a solution. This ensures that dependencies are created and that the right versions of assemblies are used.
Second, don't use a version number like 1.0.*, the default for the AssemblyVersionAttribute . In larger development projects, this will burn you fast.
Finally, see the <assemblyBinding> section in the .NET Framework SDK - which you can use to redirect versions, as well as publisher policy assemblies - as well as How the Runtime Locates Assemblies[^]. This allows you to redirect assembly version and to know where exactly to put the assemblies, such as in the same directory together, in the GAC, use a custom private path (ex: ASP.NET uses "bin" as its private path), or using the <assemblyBinding> section to specify the codebase for assemblies you want to use no matter where they are.
You should also consider keeping a build directory when you have projects that don't reference other projects, such as a plugin-driven application. With VS.NET, you can do this easily using post-build actions in the project configuration. There's also the DEVPATH environment variable that's documented in the .NET Framework SDK that can be helpful as well. It pretty much works like the PATH environment variable used to locate executables (.exes, .dlls, .bats, etc.).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hey thanks!
We have lookt throw the MSDN on this topic, but cant realy find what to do.
We dont understand what Asembling file is for? we think it haveing the information about what dll version is used and where to find it. But we cant find a file in our project that have this information.
We have added dll files to our Windows control Libararys this way.
move the dll file to /bin/debug
rightclick on the referens and added the dll file to the project. This works fine and we can worke against the dll file with no problem.
But when we then add all Windows control Librarys to the main project we get some dll varnings, and as a said the versions on some dll files is changed to older versions.
Pleas could you maby do a stepBYstep on this?
//Jimmy
|
|
|
|