|
Wikipedia[^] is also your friend (as well as google).
Dave
|
|
|
|
|
I am doing a GUI design right now. I have all the templates with me which have space allocated for controls. I have added form's background as this image and placed controls in the correct slots. Since background is an image, it's getting slight delay in loading the form. I am looking for an alternative efficient way to load the background image. Any thoughts ?
|
|
|
|
|
Hi,
Only thing I can think of right now is double buffering, or maybe use an image instead of the background image of the form ...
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: maybe use an image instead of the background image of the form ...
Do you mean image in a picture box ? Picture box is poor in performance.
Programm3r wrote: double buffering
Thanks. I will take a look at this.
|
|
|
|
|
|
Hi all,
I am trying to select the cell of a datagrid as a right click occurs on it .... and I am kinda lost. Can anyone please give me some advice ?
Many thanks in advance
Regardsm
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Handle the CellMouseClick event in which check if the mouse click is of right button and then select the particular cell
.....
|
|
|
|
|
Thanks for the reply ...
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
|
.... and I'm no longer lost
private void dbGrid_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
if (e.ColumnIndex != -1 && e.RowIndex != -1)
{
dbGrid.ClearSelection();
dbGrid.CurrentCell = dbGrid.Rows[e.RowIndex].Cells[e.ColumnIndex];
}
}
}
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi again,
So after figuring out how to make the right click work, I'm having trouble with the position of the contextmenustrip. The problem is that the menu pops-up at the incorrect locaion. I'm doing the following:
...CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
...
contextMenuStrip1.Show(dbGrid, e.Location);
...
}
But the contextmenustrip pops-up at the top right hand corner of the DataGridView ?? Am I doing something wrong, if so what ?
Many thanks in advance
regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Instead of Show use PointToScreen method...Also i think you have to attach the contextmenustrip to the particular cell like dbgrid.rows[index].Cells[index].ContextMenuStrip = contextmenustrip..
check the syntax
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
|
Just out of curiosity, why would the contextmenu pop-up every second time, that the right-click occurs ??
Another observation, is when I right click on the cell(1) and right-click on another cell(2) and then move back to the previous cell(1) the contextmenu pops-up first time ???
Thanks again.
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
|
HI,
I have seen applications like Reflector that can
perform a self update. How can I replace the currently running executable
with another file downloaded from an update location? I have tried
disassembling Application.Restart() and writing the new file in the process
gap but that does not work. I figure there must be some best practice for
this?
Thanks
tbhattacharjee
|
|
|
|
|
You have the program check to see if it needs to update. If it does, it runs another program that does the update. That way you can actually update the old application.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I am trying to convert native code to C# through DLLs. The dll works fine when called from C++ but when called from C# (using P/Invoke), it give exception error. Anyhow has any idea what the issue could be. Basically i am working on Math Kernel Library. Any help will be appreciated.
Thanks
|
|
|
|
|
If you're trying to call a dll through p/invoke, best bet is to check that you go the pinvoke signature right.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have a DirectX environment going and working beautifully. I also found a way to get frames per second and that is working too.
I am using DirectX Sprites to draw everything. Now, the problem is with scaling the sprites. If I have about 30 scaled sprites, I nearly halve my framerate. I know the problem lies with having to scale it everytime I draw it, any ideas?
if (!bVisible)<br />
{<br />
return;<br />
}<br />
<br />
if (!bScaled)<br />
{<br />
AdjustScaling();<br />
bScaled = true;<br />
}<br />
sprite.Transform = scaling;<br />
<br />
sprite.Draw(texture, sourcerectangle, center, position, color);
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
hI all,
I need to add text inside external .rtf file..How to add text into .rtf file...?
Thank you..
%#&kmpYrlHSGYG5@#($_+!@!(*JASnjshdk,cm_0ashjhdbn@#$!48mkhfbchsh))^%#W%&@YW7wsdfjw789';'][]\`~JKJQ4$!@#~)-HSKS^&*1)JK12@#@$~!1`DFGkqp][]\]?Zas;EWRG%!@~)(^&BVAG
|
|
|
|
|
You load it into memory, add the text, and save it.
I guess you need to know how to parse RTF to do that successfully.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I suggest accessing the RTF file using MS Word COM APIs (if available)and to use the same MS Word COM API to save the file as RTF again after you made your modifications.
MSDN has a link to the RTF specification http://msdn.microsoft.com/en-us/library/aa140277(office.10).aspx, but you might want to avoid this method as it is very tedious.
|
|
|
|
|
this kind of disconnect has happened to me before and then it went away, but I can't figure out how I fixed it.
basically, I input a text value in a form and the try to read it in a string, and the string comes in empty.
Also, if I set the textbox value to a string, it doesn't update on screen.
What am I missing?
www.solvengineer.com
Code Exchange for Scientists and Engineers
|
|
|
|
|
Well, hard to say, without seeing some code. I mean, if you set the textbox value then it will update on screen, no question. And if you grab the value, the one you get, will be what's in the textbox.
So, something else is going on here.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|