|
Use of Anchor property will help you in this case
Layout has different properties like Anchor, Margin, Dock, Size, Min size Max size.
Use these in combination to achieve the output you are looking for
Happy Coding

|
|
|
|
|
Hi everybody
How can i receive text data from a web page
|
|
|
|
|
From the documentation[^];
using System;
using System.IO;
using System.Net;
using System.Text;
namespace Examples.System.Net
{
public class WebRequestGetExample
{
public static void Main ()
{
WebRequest request = WebRequest.Create ("http://www.contoso.com/default.html");
request.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse response = (HttpWebResponse)request.GetResponse ();
Console.WriteLine (response.StatusDescription);
Stream dataStream = response.GetResponseStream ();
StreamReader reader = new StreamReader (dataStream);
string responseFromServer = reader.ReadToEnd ();
Console.WriteLine (responseFromServer);
reader.Close ();
dataStream.Close ();
response.Close ();
}
}
}
Good luck
Bastard Programmer from Hell
|
|
|
|
|
Here is the link through that you will get some hint.
when you are requesting for some resource on web, on return of that you will get webpage content. so you need to learn WebRequest/WebResponse.
-Amit
|
|
|
|
|
hello guys... I was thinking if there is any way to compare two times which are in different format. Like if I have these times
time1 = "01/12/2005";
time2 = "Dec 1, 2005";
Is it possible to compare these two times? Thanks
This world is going to explode due to international politics, SOON.
|
|
|
|
|
Yes.
Never ever, ever try to compare dates, or any other numbers as strings: convert them to an appropriate class first.
In this case, that class is DateTime:
DateTime dt1 = DateTime.Parse("01/12/2005");
DateTime dt2 = DateTime.Parse("Dec 12 2005");
TimeSpan diff = dt2 - dt1; You may need to use ParseExact, or TryParseExact if you know what format the date will be in to avoid problems like 03/04/05 - is that 3rd Apr 2005, or 4th March 2005, or 5th Apr 2003?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Hey, i didn't seen your full reply. although both the code are same 
|
|
|
|
|
DateTime time1 = DateTime.Parse("01/12/2005");
DateTime time2 = DateTime.Parse("Dec 1, 2005");
if (time1==time2)
{...
}
else
{
...
}
|
|
|
|
|
Hi,
You can use Parse,TryParse,TryParseExact to parse your string to convert it into DateTime object. each have their own pros/cons.
Here is the sample code for finding difference between dates.
DateTime dt1 = DateTime.Parse("firstDate");
DateTime dt2 = DateTime.Parse("secondDate");
TimeSpan dateDifference = dt1.Subtract(dt2);
-Amit
|
|
|
|
|
Hey i want to create a table at run time and want to bind it with grid View how it would be possible
|
|
|
|
|
Create a new DataTable, add the data columns, assign the data table as the datasource of the gridview.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi all!
I am developing web app (asp.net) like http://dethi.violet.vn/present/show/entry_id/7650679 allow users preview document file.
The users will upload .doc or .ppt, .pdf; how to convert these file to .swf to display in web.
I uses Google view document, but if the document has mathematical formula, google view display not correct!
Hope all directions!
|
|
|
|
|
You can use:
Adobe FlashPaper Or Print2Flash
Both tools provide facility to convert any printable document to swf, there is also facility to convert document programetically.
|
|
|
|
|
And same time !the file size don't Exceed 10MB
|
|
|
|
|
Hi again
I make a program in c# and i obscure my executable with Eazfuscator, but this is detected like virus by some antivirus (like bitdefender, f-secure, gdata) and antimalware (like Emsisoft).
To understand the reason why these antivirus detect my application like a virus, I create a basic project with 2 forms and 1 button. In the first form I put a button with this click event:
Form2 frm2 = new Form2();
frm2.Show();
After I compiled, I used Eazfuscator to obscure the source of the project. After this I uploaded this file on virustotal.com , and surprize it was detected like a virus (by Bitdefender, F-Secure, Gdata, Emsisoft, Ikarus, Panda(suspicious file) and other) ).
After this, I create a key (test.pfx) to signing this application (+ Enable ClickOnce security setting > This is a full trusted application) , then I compiled and I used Eazfuscator and I uploaded the executable to virustotal.com and the result was that my application was detected like a virus just by Emsisoft and Ikarus.
Report: Report VirusTotal[^]
Now, the questions is:
1. Can I make my application full trusted by all the antivirus/antimalware( I mean that the antivirus to don't detect my basic application like a virus) without buying a certificate or to send an email with this on the antivirus software?
2. If I want to give my application signed with .pfx to my friend, I need to give the both file (executable + key) or I can give him just the executable?
I am sorry for my bad english and long post
Thank you. 
|
|
|
|
|
Have you tried a commercial obfuscator? Many come with a free trial period.
/ravi
|
|
|
|
|
Yes, I tried Dotfuscator, but I prefer Eazfuscator because I find it the best choise ...
I don't want to use Dotfuscator anymore because it doen't "hide" my code while Eazfuscator does.
Later edit: I almost forget, thank you for your response 
modified 25-May-12 9:00am.
|
|
|
|
|
You may want to try Babel - I've found it to be pretty effective and robust.
/ravi
|
|
|
|
|
I found Confuser to obscure my executable, but this is result: Report VirusTotal
Can I make something in my project that Nod32 to don't give me that result?
|
|
|
|
|
A lot of obfuscators work by modifying the header of the executable file so that disassemblers are confused about where the entry points and functions are. This obfuscator is probably modifying the file in such a way that matches a virus or trojan signature. Like the other post said, I would use a different obfuscator or talk to the developer. The problem is that you may end up getting it approved with one antivirus program, but what about the hundreds of other ones?
|
|
|
|
|
I don't understant what you want to say with:
"The problem is that you may end up getting it approved with one antivirus program, but what about the hundreds of other ones?"
The problem is just with these antivirus. The rest of antivirus doesn't detect anything.
Ok, let's say that i can't do anything out of buying a certificate or to contact the antivirus center.
But:
2. If I want to give my application signed with .pfx to my friend, I need to give the both file (executable + key) or I can give him just the executable?
|
|
|
|
|
Hello, CP. Lately I encountered a few articles here which discuss the topic of localization via Satellite Assemblies. While I understand the concept, and I have successfully implemented it in a small test project, I have a question. How do you go about localizing an application on a larger scale? For example, an application with many menus/sub-menus, dialogs, MDI children, etc. Is it necessary to create a method (or methods) which make statements such as:
private void SetUILanguage(string culture)
{
menuItem1.Text = resManager.GetString("menuItem1Text");
menuItem2.Text = resManager.GetString("menuItem2Text");
menuItem3.Text = resManager.GetString("menuItem3Text");
button1.Text = resManager.GetString("button1Text");
}
Or is there a simpler way to go about it that I am missing? I was thinking about possibly writing a method for a menu, which would iterate all menus/sub-menus (recursively) and load the resource string, also using the Tag property, like this (example):
private void SetMenuItemText(MenuItem item)
{
string stringName = string.Format("{0}Text", (string)item.Tag);
menuItem1.Text = resManager.getString(stringName);
}
However, would it be efficient/feasible to set the Tag property for every UI element and set the text this way?
Also, what is the best way to go about designing a UI (a data entry screen, for example) with localization in mind? Are there any resources online for that? I ask because a word in one supported language may be 7 characters long, while the same word in another supported language may be 13 or 14 characters long. How do you design the layout in order to compensate for that?
I came across this article on MSDN for the last question.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
modified 24-May-12 15:32pm.
|
|
|
|
|
I made a wpf form to keep track of a volleyball match as it is played; it contains the layout of a volleyball court with six positions(6 different listboxes with the roster of the players). I want to be able to select any of the 6 listview boxes(make active), then be able to select a button (assist, serve, block, etc.) and be able to link the player with the action they performed and store it in a text file(actually I will put it into a SQL database in the future). I'm not sure if this 'linking' is the right way to associate the two, using a GUI interface like that? Any suggestions on what might work better? I'm not looking for code help right now, just the path to take to associate the two, and whether a listbox is the right choice here. Thanks for your help.
|
|
|
|
|
I would use the MVVM pattern (easily searchable, even on here) - Create a viewModel that has some methods on it, like UserPerformedAction(long UserID, EAction ActionTaken) (assumes an enum of actions here), or some such thing - have a view model store your data (such that when you decide where/how to store it, it's not impacting anything your UI is doing. Your viewmodel can have a collection of actions/items whether it's a class or a dictionary, etc. such that it can store the data cumulatively.
The other option is to make a domain object (e.g. UserKey, ActionTaken, DateTime) and pass this to/from your view model (e.g. UserPerformedAction(VolleyBallUserAction vbAction) - using objects makes it easier to later databind the gathered data in an output display of some kind.
So your UI calls ViewModel methods to store actions/request data, etc. And then you can decide what do to with the data now that it's collected in a central location.
That's what I would do, or something similar.
Think of how stupid the average person is, and realize half of them are stupider than that. - George Carlin
|
|
|
|
|
how to insert date ex(24/5/2012 2:30:00AM)into SQL database note that the date is current date come from textbox in the web page and then bind this field to gidview
(c# code)
|
|
|
|