|
Alrighty. So I'm using Visual C# 2005 Express, pretty new to programming in a Windows environment. Writing a program that loads mp3 filenames from a playlist into a gridlined listview. Nothing spectacular. However, the listview seems to become skewed when scrolling. To be precise, there are no problems when I scroll by dragging the scrollbar up or down, or when I use the arrow keys, or when I use PGUP/DN; however, if I scroll by pages (ie, clicking on the scrollbar), the gridlines and text get messy and are not drawn evenly. What's going on?
|
|
|
|
|
I have my main application.
MainMenu.
I have another form DynamiXPad
I want the DynamIXPad to appear on a certian location on the MainMenu form. But I want the user to be able to click items on the MainMenu without the DynamiXPad form being hid. How would you do this? You click button load form2 and it will load. I thought... Can you load the form onto a panel? So it appears on a panel? That would be better...
In the end we're all just the same
|
|
|
|
|
Have you looked at MDIContainers?
|
|
|
|
|
form1.MaximizeBox = false;
form1.MinimizeBox = false;
form1.Dock = DockStyle.Fill;
form1.TopLevel = false;
panel1.Controls.Add(form1);
form1.Show();
form1.BringToFront();
|
|
|
|
|
hello! is there a way that i can compile my images to a video format?? using c#.. or any programming languages
Im am SUPER P
|
|
|
|
|
I assume you want to create an AVI container file with a video stream and add your images as video frames.
If that's what you're trying to do, look here:
AviFileWrapper[^]
If you need a stable solution, search for DirectX examples.
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
|
|
|
|
|
hey thanks!!
i think im gonna read a lot of it, its quite long... can it be done too in java?
Im am SUPER P
|
|
|
|
|
Java cannot use the AviFile API, but I'm sure there are special video packages for Java, somewhere out there...
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
|
|
|
|
|
ahh ok..
i have a nokia phone n6600 and in my java app i want to receive a file from my n6600...
do you know anycodes for this one?
thanks!!
Im am SUPER P
|
|
|
|
|
I want to set our windows system time by my application but I don't know how to do that. Please help me. Thanks too much
|
|
|
|
|
For example by using the built-in time command like this:
string timeToSet = "12:05";
Process.Start("cmd", "/c time "+timeToSet);
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
How can i declare/create a array, which have dynamic size.
i mean dynamically the no of elements in array varies,..
Can u pls help me,.
I want a string array of such kind.
|
|
|
|
|
That's what collections are there for.
In C# 2.0: Collection<int> dynamicArray = new Collection<int>();
In C# 1.x: Use a collection generator to create a typesafe collection.
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
|
|
|
|
|
Arrays can't be dynamic. Resizing an array means declaring a new array and copy all the elements to the new array. This is expensive, so there is intentionally no built in method to do this.
There are many different collections that you can use depending on what you need, like ArrayList, HashTable, Queue, SortedList, et.c.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
VS 2005 C#.
I have a BackgroundWorker thread updating a graphic control every 15 ms, CPU load < 5%, i.e., it works fine. But when using menus (MenuStrip) in the form, the CPU load increases to ~50%, even without actually USING the menu, when I position the mouse pointer over a menu item. I don't even click! And the animation hobbles, of course. Is this a bug?
This was a problem in VB6 as well, having menus halting other events (related to SOME components, i.e., the Winsock) than their own. Severe bug.
Best regards,
Magnus
|
|
|
|
|
I am using a NET VS2003 Listview control in detail mode with icons. I set the .Enabled property to false and am geting weird display results. Only part of the control background becomes disabled gray, and the icons do not take on the disabled look- they are full color.
Is this normal behavior? Or am i doing something wrong? I was able to correct the background color problem by setting the listview .BackgroundColor to the same color as a disabled control. But the icons still show in full color.
Do i have to create my own listview control to get normal disabled behavior?
|
|
|
|
|
Since this listview is not anticipated to hold more than a few dozen items, i simply made a function that took each item icon, converted it to disable, and then put it back. Performance is very satisfactory. Below is my code. Since i had another routine that gets the icons, i did not code the conversion of disabled ==> enabled. For the in-place image converting i used code gotten from a code project article.
private void WinListEnabled(bool enabled)
{
// winlist listview
// normal disable does not color background properly
// and images maintain full color and do not gray;
// so workaround must be used;
if (enabled == true)
{
this.lvwWindowList.Enabled = true;
this.lvwWindowList.BackColor = SystemColors.Window;
this.lvwWindowList.ForeColor = SystemColors.WindowText;
LoadWinList();
}
else
{
this.lvwWindowList.Enabled = false;
this.lvwWindowList.BackColor = SystemColors.ControlLight;
this.lvwWindowList.ForeColor = SystemColors.GrayText;
for (int i = 0; i < this.lvwWindowList.Items.Count; i++)
{
// get item icon
ListViewItem listItem = this.lvwWindowList.Items[i];
Image itemIcon = this.imlWinIcons.Images[listItem.ImageIndex];
// create disabled image
Bitmap active = new Bitmap(itemIcon);
Bitmap disable = new Bitmap(active.Width, active.Height);
Graphics g = Graphics.FromImage(disable);
g.DrawImage(active, 0, 0);
ControlPaint.DrawImageDisabled(g, active, 0, 0, Color.Empty);
g.Dispose();
// replace listview image
this.imlWinIcons.Images[listItem.ImageIndex] = disable;
}
}
}
|
|
|
|
|
I have a ContextMenu and an item called Change Background, which will change the image on a PictureBox.
Here is the code:
{<br />
if (openFileDialog1.FileName.ShowDialog()==DialogResult.OK )<br />
{<br />
if (openFileDialog1.FileName != string.Empty) {<br />
this.pictureBox1.Image = new<br />
Bitmap(openFileDialog1.FileName);<br />
} }
This code was implimented on a button. I want to modify it to work on a context menu item. How would you do this? It has something to do with the DialogResult.OK code, its not a button so it wont work only crash the application.
In the end we're all just the same
|
|
|
|
|
The code would be exactly the same on a button as it would on a contect menuitem. I see no problem with the use of DialogResult , as long as you have using System.Windows.Forms; in your header.
|
|
|
|
|
The code above can't work, since the first if-line is bogus.
If you write if (openFileDialog1.ShowDialog() == DialogResult.OK) then the code will work, no matter if it's called from a button event handler or a (context)menu item handler.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi,
I want to Sum data from a DataTable...
I found the code samle below, which is fine but I want to Sum a calculation if possible. Something like this:
myTable.Compute("Sum(Quantity * Price)", "EmpID = 5");
Is it possible to Sum a calculation on two columns or just Sum one column?
Thanks,
Ron
private void ComputeBySalesSalesID(DataSet myDataSet){
// Presumes a DataTable named "Orders" that has a column named "Total."
DataTable myTable;
myTable = myDataSet.Tables["Orders"];
// Declare an object variable.
object objSum;
objSum = myTable.Compute("Sum(Price)", "EmpID = 5");
}
|
|
|
|
|
Hi,
Using .net 2.0
Not sure why I do not get the .BeginEdit in the intellisense for the row
This is what I have at present
DataRow row = oDS._TRCLNT01.Rows[rowNum];
row.
Thanks
|
|
|
|
|
Hi howzit?
I have a panel which displays many different controls after certain user events...i.e. the controls are instantiated and displayed in runmode.
How do I know when one of these controls has focus? i.e. how can I create a Enter Event which relates to any control in this panel's collection, so that when a user clicks any of these run time controls, i can run code and get location and size information from this particular control?
Regards,
|
|
|
|
|
I have to determine what is control x and y global position in screen, not local position, to show up dialog on top of the control - is there normal known way to do that?
|
|
|
|
|
hi oskars!
you can use the PointToScreen method to convert the Location value into a screen coordinate value.
hope that helps!
microsoc
|
|
|
|