|
If you use different URLs for the endpoint, then it's OK, for example:
http://localhost:9000/ServiceA/
http://localhost:9000/ServiceB/
|
|
|
|
|
Hello,
I have created a datagridview using C# windows application and I am having formatting issues with the data once the datagridview has been populated. The way I have this set up is before I bind the data to the binding source I add a new row which contains combo boxes. These Como boxes are used to populate the new headers. Once the headers have been modified the data needs to be formatted to data types the system can handle. For example, the datagridview populates dates as mm/dd/yyyy 00.00.00 AM but I need to reformat this to mm/dd/yyyy. I have created a method that loops through each cell in the first row and captures the new header (which works) but when the code that is suppose to reformat the column runs, it doesn't work. the code I have to reformat the columns based on the logic used is dataGridView1.Columns[c].DefaultCellStyle.Format = "d";. However, this doesn't work. Can someone please help me? It is much appreciated. Here is what I have and if it is not enough then let me know and I can post more code.
private void button10_Click(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
{
string[] newHeaders = new string[dataGridView1.ColumnCount];
int n = dataGridView1.ColumnCount;
int c = 0;
for (c = 0; c < n; c++)
{
newHeaders[c] = dataGridView1.Rows[0].Cells[c].Value.ToString();
if (newHeaders[c] == "A1ORDT")
{
dataGridView1.Columns[c].DefaultCellStyle.Format = "d";
}
}
}
else if (radioButton2.Checked == true)
{
//Add code for custom formatting
}
else
{
MessageBox.Show("Please select standard or custom formatting");
}
}
modified on Friday, April 24, 2009 5:30 PM
|
|
|
|
|
I have a Person class with firstname and lastname properties. I have personList class that contains a list of persons and i have attached it to a listbox. When i display the list box, it grabs the toString() method of person class and displays it. Instead I would like to show the first and last names aligned as two different columns so that it could be viewed better.
I have tried the multi column property, but it takes the next item and puts it in the next column. Can this be achieved in a list box ?
Should i customise the display using the DrawItem event
please let me know.
thanks,
kaer
|
|
|
|
|
Owner drawing may be an alternative, but I think you'd be better if you used a ListView (with the View property set to Detail) or a DataGridView
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Thanks dave..
Which would be a better alternative..A listview or a DatagridView with respect to performance and ease of use... the data in the list will be around 50 and i wouldnt need any specific features other than displaying the data in columns and handling the selection event
|
|
|
|
|
Having used listviews extensively in an app but only having prototyped the DataGridView, I tend to lean towards the latter.
A list view is a less complex control (it's the file list from windows explorer). A DataGridView is a much more full featured, and complex, grid. If you're databound a DataGridView has native features to populate data. If you're not databound you can still do so easier by doing something like mygrid.addrow(firstItem, secondItem, thirdItem). With a listview afaik you have to create a new row item, use it's addSubItem method to add each value one at a time, and then finally add the row to the grid. There might be gotchas I'm not aware of but the DataGridView seems to be easier to use and has a much richer set of features. If you ever had to do anything fancy in the grid you'll have to use the latter anyway so you might as well start with it.
EDIT: The listview will have semantics somewhat closer to that of the listbox. However it's still different enough that it's not a plug and play replacement.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
I"m using this CMT universal tool to migrate emails from Lotus to Exchange. During the migration a lot of outlook reminders boxes popup and once the migration finish, those diaglog boxes won't allow the CMT tool to go to the next user until someone click OK on that diaglog box.
I tried to write an application that get the outlook takes and closes it out, however I don't want to close outlook if there aren't any diaglog boxes there. I'm having a hard time trying to figure out how to write a script that would click close that diaglog box.
|
|
|
|
|
Hi there,
I heard that if we remove even a single byte from an exe file/application (irrespective of its size), then, the entire file/application would disfunction or become an invalid Win32 application. I searched Google, MSDN thoroughly, but did not find any link. So, I thought about consulting you guys. So, please tell me how to remove a byte of an exe file or overwrite its contents with that of my code?
Your help will be truly appreciated,
Thanx,
Rajdeep.NET
|
|
|
|
|
depends which byte you remove i guess, if you remove part of a variable value then it probably wouldnt make a difference, i not sure thou
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
1: I don't think to be possible replace some part of an .exe, if you delete,add overwrite some part it becomes invalid.
2: How can you know which byte to replace???
3: Why you need to do that?
|
|
|
|
|
This is not possible because the file basically contains the low-level instructions that are executed. You'd literally have to analyze the file and determine where the binary data that you wish to change is located and then change it.
Hope in one hand and poop in the other; see which fills up first. Hope and change were good slogans, now show us more than words.
|
|
|
|
|
It depends on the executable. Pretty much any application with an activation code will also encrypt/compress or integrity check the exe every time it runs, so changing any byte will make the file useless. Even a lot of applications without an activation code will do the same to make it more difficult to decompile their code.
In the end, it's not easy to do, even if you do find the right file position, it's unlikely to work after a change. And there's probably very few that would help you accomplish it, since most of the time, it's the type of thing that software pirates would be doing, not legitimate programmers.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
You should also find that your virus scanner will detect and prevent such things. If it doesn't, change your virus scanner.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I have the following collection:
public class PopupWindowItem
{
public Object WindowObject { get; set; }
public UDPWindowType WindowType { get; set; }
public bool AllowMultipleInstances { get; set; }
public PopupWindowItem(Object window, UDPWindowType windowType, bool allowMultiple)
{
this.WindowObject = window;
this.WindowType = windowType;
this.AllowMultipleInstances = allowMultiple;
}
}
public class PopupWindowManager : List<PopupWindowItem>
{
public PopupWindowManager()
{
this.Clear();
}
}
When the user clicks a button to open a window, a new PopupWindowItem is created and populated with the indicated objects. This part woerks fine. Here's the code:
WindowAccountManager accountManager = new WindowAccountManager();
accountManager.Closed += new EventHandler(accountManager_Closed);
m_popupWindowMgr.Add(new PopupWindowItem(accountManager, UDPWindowType.AccountManager, false));
accountManager.Show();
When the application is closed, I traverse the PopupWindowManager collection and close the windows indicated therein. This is where it gets interesting. Here's the code I'm using:
while (m_popupWindowMgr.Count > 0)
{
switch (m_popupWindowMgr[0].WindowType)
{
case UDPWindowType.AccountManager :
{
((WindowAccountManager)(m_popupWindowMgr[0].WindowObject)).Close();
}
break;
}
}
When I call close on the window object inside the PopupWindowItem object, the whole PopupWindowObject is removed from the collection. As you might guess this is unexpected behavior. Why is it doing this?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Friday, April 24, 2009 12:15 PM
|
|
|
|
|
Does the function referenced here cause the behavior you are seeing?
John Simmons / outlaw programmer wrote: accountManager.Closed += new EventHandler(accountManager_Closed);
|
|
|
|
|
Seems to be wrong.
|
|
|
|
|
Yep.
God, I'm tired...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi!
In my project, i'm trying to watch a video streaming broadcasted from my pc (which uses vlc to broadcast the webcam stream ) on my pda which uses windows mobile 5.0.
Unfortunately, it doesn't work even if it has been working in another a pc whit the client application.
However,I've tried to read video stream from internet website from the pda and IT DOES WORK
Then,I've tried to experiment every codec in the VLC broadcast but I don't know if the mobile windows media player can support this kinds of video streaming or if the connection between the pc and the pda is not working.
I notice that i'm working under the same wifi connection and here are the line codes of the broadcasting and the pda client application code.
.bat file :
vlc.exe -vvv -I rc --ttl 12 dshow:
SmartDeviceProject source :
private void button1_Click(object sender, EventArgs e)
{
Process.Start(new ProcessStartInfo("wmplayer.exe", "http://xxx.xxx.xxx.xxx:1234"));
}
I wish you can help me to find a solution to this problem.I general i want just to watch a video stream in my pda if anyone had a idea...
p.s.: excuse my english
|
|
|
|
|
In windows forms development, is it ever practical to use datasets over class objects to store data? What would you prefer and why?
Thanks
Tina
|
|
|
|
|
You question is broad and general. As such the answer you get is going to be subjective. You may want to express the problem at hand bit more, so it give full picture.
Both dataset and class objects have their own functions. While some problems can be handled by both, in other cases one will have better tool than the other.
|
|
|
|
|
Hello Yusuf, thanks for the response...yes i realize it's a pretty broad question....but that's exactly what I'm looking for...i don't think there's a right or wrong answer, i guess I need peoples opinion. so haveing said that, what would you prefer and whY????
Thanks
TIna
|
|
|
|
|
I've delegated the task to Google[^]
|
|
|
|
|
Hello everybody!
I am working on a little program and I was wondering if somebody could kindly offer me some help on using Regex?
Here's a scenario, let's say that I have a HTML file... I want to be able to find any text inside a HTML tag. For example:
<title>Find meeee!</title> or;
<a href="http://www.finmeeee.com/">la la lalaaaa</a>
But, the text between the HTML tags may contain symbols, letters, numbers etc, so is there a simple way to use Regex to find <b>any text</b> inside a HTML tag, extract/copy it, and perform an action, and then move onto the next match?:
1. Find match.
2. Copy or Extract the match.
3. Perform an action, like save match to file (which I know how to do).
4. Find next match, and repeat process.
I would greatly appreciate any help I can get on this. Lots of thanks in advance and thanks for taking the time to read this pretty long question.
P.S.
I wouldn't have posted this message, but I have tried MSDN and Google, read articles and tutorials but just can't get any of the snips I wrote to work.
Cheers,
Jay.
foreach( inch on Jason )
{
Girlfriend.IsHappier();
}
|
|
|
|
|
well i am assuming you know how to use the regex class and loop matches so ill attempt at a regex string for you...
"^<.*>.*<.*>$"
then with you match you could do a subtring...
string text = match.Substring(match.IndexOf('>') + 1, match.LastIndexOf('<'));
...maybe that will do it for you
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|