|
My first choice would be to try File/Open, then go find the Microsoft.VisualBasic.dll file. A simple search of the hard drive for the filename reveals that it's in C:\WINDOWS\Microsoft.NET\Framework\version .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I found the way of looking up the code using Reflector.
You must go to File -> Cache..
Load the required assembly, and then access the IRR code.
I did add the reference to that assembly, I just really wanted to see how the method was implemented.
Thank you all!
|
|
|
|
|
If a user logs on such as "insert user name here" i want to play a sound "insert sound 1 here", but if a different user logs on, i want to play a different sound.
So can i check what user has loged on? or if a specific user has loged on?
|
|
|
|
|
Have you tried using System.Security.Principal.WindowsIdentity.GetCurrent() to return the WindowsIdentity for the current user? Then, use the Name property to get the user name. Then you can play the appropriate sound for that person.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
Hello All
can any one help me where is the windows atom table and how to navigate it, and how to add and delete values from it
thx
|
|
|
|
|
|
|
let me explain , i want to navigate the atom table so i can able to find the record of the windows hotkey (win+D) and then unregister it , i had read before that this hotkeys values stored in the atom table,
i was trying the API unRegisterHotKey but i found that i must have the unique ID of that atom in the atom table
that is all
i hope if that topic is helpfull for all
and i hope if there any one can help me
thx
|
|
|
|
|
Hello,
After changing some content in my main-form and calling showDialog() for some input requirements i am totally losing the focus of the application. I don't have access to the menu, control boxes and ...
If i show this dialog bevore replacing some controls in my mainform everything works fine.
Anybody who can help?
Thanks
Frank
|
|
|
|
|
I've made a class containing an algorithm to make a query from MS Access. From a window form, i call to the class to make use of the method. In the first run, the result returns quite fast (130 records). But on any query after the first one, it runs VERY slowly. With only 130 records, it shouldn't be that slow. Is it because of MS Access or VS.NET 2005 Beta 2? I've tried to dispose all resources but it still doesn't work. What's going on here?
KiT
|
|
|
|
|
Dear all,
I have created an imagelist at runtime and am trying to fill it with images created at runtime.These images are of type Bitmap and are created based on the info from database.
Everything works fine but the problem is all the images in the imagelist are of the same color whereas it has to be be of different colors...here is my code...Any help would be appreciated.
/***********************************************************************************
iList myImageList;
FormLoad()
{
CreateImage();
myImageList = new ImageList();
if (myList.Count != 0)
{
foreach(Bitmap ic in myList)
{
myImageList.Images.Add(ic);
}
}
foreach (TwigCategory cat in m_TwigCategories)
{
this.cmb_CATEGORY.ImageList = myImageList;
Item = new ComboBoxExItem(cat.Description,0, cat.ID);
this.cmb_CATEGORY.Items.Add(Item);
}
}
private void CreateImage()
{
foreach (TwigCategory cat in m_TwigCategories)
{
Color color = ConvertRGB2Color((int)cat.RGB);
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(16, 16);
for (int x = 0; x < bmp.Height; ++x)
for (int y = 0; y < bmp.Width; ++y)
bmp.SetPixel(x, y, color);
for (int x = 0; x < bmp.Height; ++x)
bmp.SetPixel(x, x, color);
myList.Add(image);
}
m_TwigCategories.Reset();
}
private Color ConvertRGB2Color(int rgb)
{
int red = (int)rgb & 255;
int green = (int)((int)rgb / 256)& 255;
int blue = (int)((int)rgb / 65536) & 255;
Color color = Color.FromArgb(255, red, green, blue);
return color;
}
|
|
|
|
|
Could we get some sample rgb values for the ConvertRGB2Color method? Are you sure that your bit-twiddling is correct there?
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
Here are a few rgb values...the method works fine..the problem is actually with the imagelist..i get the same color for all the bitmaps
12583167
10551200
5767167
16734144
-8372160
|
|
|
|
|
Here are a few rgb values...the method works fine..the problem is actually with the imagelist..i get the same color for all the bitmaps
12583167
10551200
5767167
16734144
-8372160
|
|
|
|
|
Hi,
I have got the solution .I made a very stupid mistake in loading the images to the imagelist.Here is the complete solution...
This code could be useful to those who want to create a dynamic image programatically and add it to the imagelist.
I fetch the colors from the database and create a square image and fill it with the database color and display in the combobox as images.The colors are stored in the database as integers.
Formload():
CreateImage();
myImageList = new ImageList();
if (myList.Count != 0)
{
foreach(Bitmap ic in myList)
{
myImageList.Images.Add(ic);
}
}
int k = 0;
foreach (TwigCategory cat in m_TwigCategories)
{
this.cmb_CATEGORY.ImageList = myImageList;
Item = new ComboBoxExItem(cat.Description,k, cat.ID);
this.cmb_CATEGORY.Items.Add(Item);
k += 1;
}
private void CreateImage()
{
foreach (TwigCategory cat in m_TwigCategories)
{
Color color = new Color();
color = Color.FromArgb((int)cat.RGB);
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(16, 16, PixelFormat.Format32bppArgb);
bmp.MakeTransparent(Color.Transparent);
int i, j;
for (i = 0; i < bmp.Width; i++)
{
for (j = 0; j < bmp.Height; j++)
{
Color pixelColor = bmp.GetPixel(i, j);
int r = color.R; // the Red component
int b = color.B; // the Blue component
int g = color.G;
Color newColor = Color.FromArgb(r, g, b);
bmp.SetPixel(i, j, newColor);
}
}
myList.Add(bmp);
}
m_TwigCategories.Reset();
}
|
|
|
|
|
how can draw a my custom scrollbar so to draw my own button up and down, customize the central scroll button, and the back bar?
|
|
|
|
|
My guess would be to override the OnPaint method just like every other control.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
where is located windows search gifs (dog,magician Merlin or girl in car)?
|
|
|
|
|
|
When you searc a file in Windows Explorer on XP, You see an animation at left side of window (if u havent turned it off before) sometimes a dog, some times a magician named MERLIN. I need that animation files.
|
|
|
|
|
Has anyone experienced lockup issues when adding animated gifs to a typical Windows Form? I have a simple form with a picureBox panel. When I add an animated gif, the environment locks up and I have to kill it through task manager.
Is this a known bug or is there a workaround?
Thanks in advance for any info.
Ray
|
|
|
|
|
I have a table. When you select a plan from a listbox and click 'select plan', the program nicely goes out to the database, fetches the plan, and sticks it in a datagrid.
This is the code:
this.sqlSelectCommand1.CommandText += " WHERE PlanID = '" + PlanIDs[this.clstbxPlans.SelectedIndex].ToString() + "'";
this.sqlDataAdapter.Fill(dataSet2);
this.dgClaimsExperience.DataSource = this.dataSet2.tblData;
So I'm using data adapter, data connection and data set that I generated via the vs2003 GUI.
Anyway it works just fine with two problems.
If, after loading one plan, the user selects a different plan and clicks "select plan", I want the new plan to get loaded into the data grid and replace the old one. That's what the "WHERE Plan ID..." part of the code does. It uses the list box and an array of PlanIDs to specify which plan data I wanted loaded. But when I actually try to change plans this way I get an error:
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
What gives?
My second (more minor) problem is that when the data is loaded into the datagrid, it's too large too fit. This is OK, the data grid has scroll bars. But the problem is that the scroll bars are disabled by default for some reason. I can navigate around easily enough by just plopping my cursor in the data table and manually moving the cursor around the arrow keys - but what do I need to do to get the scroll bars to work like they should?
I appreciate the help. This project is killing me.
-stormin
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
Have you checked (by stepping through the code) what the SQL statement being generated is? Are you sure that the ToString method is actually returning a numeric string and not something else (like the type name).
Stop the code right before the DataAdapter.Fill and check that the CommandText is actually what you think it is.
theStorminMormon wrote:
Additional information: System error.
Don't you just love how helpful that additional information is?
|
|
|
|
|
Now is as good a time as any to admit my stunning ignorance of how to debug. I know you can step through code using F11, but my code is interactive. It has buttons. So when I try to step through with F11 I just get to the point where the main form pops up. Then if I hit a button, I can't get the F11-step through to start working again.
So, if you let me know how to step through code I'll be grateful and I'll try that out to see exactly what's going on.
But, just to clarify, there's theoretically nothing wrong with calling a dataadpater to fill a datatable in a dataset more than once?
Wjousts wrote:
theStorminMormon wrote:
Additional information: System error.
Don't you just love how helpful that additional information is?
Yeah - go to love those specific error messages. They're live savers.
Thanks for the help.
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|