|
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.
|
|
|
|
|
Using Visual Studio the best way to debug code associated with an event is to set a breakpoint. You set a break point by clicking in the little gray bar to the left of the line of code you want to stop on, a small red circle will appear (click on it again to clear it when you no longer need it). For your situation you could put it right next to the line for the button click event. What happens is when the program reaches that line it will throw you back into debug mode and set you step through with F10 or F11 (note this only works if you're building the debug configuration and not the release one). Once you've stopped execution you can step through and use the watch windows to see the values of variables or use the command window to quickly type code to execute, for example myDataAdapter.SelectCommand.CommandText in the command window should show you what the command text actually is (assuming myDataAdapter is in scope). Hope this helps. You'll learn to love breakpoints!!
[Edit: forgot to mention]
In answer to your other question, no there is nothing theoretically wrong with using a DataAdapter twice (or more) to fill a table (even the same table). Now whether it's the most efficient way to do things is another question that depends greatly on your setup.
-- modified at 16:12 Wednesday 12th October, 2005
|
|
|
|
|
Well, your tips on debugging were good, and I'm sure they will come in handy a lot in the future, but my central question is still a mystery to me. As far as I can tell the code is idential the first time it goes through and the second time.
Here's the code again:
this.sqlDataAdapter.Fill(dataSet2.tblData);
this.dgClaimsExperience.DataSource = this.dataSet2.tblData;
this.tabctrlTabControl.Enabled = true;
It's crashing on the first line when it goes through the second time. The only other difference is that the CommandText of the sql command gets edited a little bit (so that it's drawing a different set of data from the database the second time around).
Any ideas how to work around this?
-stormin
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
Hi...
I was assigned a project on C# using ASP.NET WEb Application. This project requires me to design web form like userID and password to log in as a adminstrator and retrieve data from Access. I got two question which i was unsure:
1)what is the command that we know whether the password is key in right or wrong??
2)what methods can we extract data from database??
thankz =p
|
|
|
|
|
Cheese_kid wrote:
1)what is the command that we know whether the password is key in right or wrong??
Compare it to a stored password in a database?
Cheese_kid wrote:
2)what methods can we extract data from database??
You might want to start with the basics, try these[^] sites and articles.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is this a known bug or something? I'm working on my code, I hit "run", it starts to compile, and I get an error. No biggie, I thought I may have one. It asks if I want to continue. I click "no" and I get dumped back to the standard visual studio layout.
Only problem, that friendly little task list won't come up. I hit the keyboard short cut, I try from the view menu, I try clicking on the little tab on the bottom of the screen - nothing.
It won't show up. Only happens when I work on my laptop, never have this problem on my desktop.
Ideas!?!?!
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|