|
Hi, ive got a program with a treeview.
The treeview has an image-list with some icons.
Everytime I select a node in the treeview, the icon of that node becomes the first icon in the imagelist.
When I select another node, the icon of this node becomes the first one in the list an the icon of the node that was selected before becomes the right icon.
Maybe someone could tell me what im doing wrong or what to do
|
|
|
|
|
Make sure the imageIndex and selectedImageIndex are defined. Typically this happens when the node is created e.g. treeview.Nodes.Add(key, text, imageIndex, selectedImageIndex);
|
|
|
|
|
YES that was the problem, i didn't know that theres an image index for a selected Node!
Thank you very much! Now it works!
|
|
|
|
|
hi
i need an article that show me how to write my own custom controls, does anybody have this article in vc#2005 ?
thanks
|
|
|
|
|
|
How can I make that my drawing should be always starting from the center? I mean that I want to see the whole drawing even if the window will resize. Please help.
|
|
|
|
|
OK, you asked two different things here.
How are you drawing it now ? If you're using a picture box, you can set it's display mode to resize the image to fit.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Oh dear, I do not mean how to Retrieve Data From database, but I mean is how to Retrieve the data set according to the conditions Assume more than 10 conditions, but not all at one time but in according chosen The user
|
|
|
|
|
Post a reply in the thread that you are talking about instead of creating a new thread.
---
single minded; short sighted; long gone;
|
|
|
|
|
1 - if you want people to answer you, don't keep deleting your posts, it makes the forums messy
2 - OK, where do you want to get this data set from, if not a database ? I can see now that we had 0 chance of understanding what you want from the original question, but I'm no closer to being certain what you mean.
You want to have 10 different conditions, but not all at the same time. Like 10 different searches ? Do you mean you want an OR search on different columns ? In the database ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
I am getting this error can any obe help me
A generic error occurred in GDI+.
my code is
Bitmap bmp = myIcon.ToBitmap();
bmp = Bitmap.FromHicon(shinfo.hIcon);
bmp.Save("c:\\test.jpg", ImageFormat.Jpeg);
what is wrong in it?
Thanks,
Rushiraj
|
|
|
|
|
Hi Rushiraj,
On which line does the error occur? If it's the FromStream line, I too have experienced this error - From what I can figure it's due to corrupt data being in the stream, which without seeing how you are filling streamImage I can't tell. Slap in a couple of breakpoints and perform some checks to see if you are receiving all the data that you sent - I'm experiencing the problem of not receiving all data,and have just posted.
Regards,
Satips.
|
|
|
|
|
hi
error occurs at this line
bmp.Save("c:\\test.jpg", ImageFormat.Jpeg);
and data is correct.
If I do only
Bitmap b = new Bitmap(32, 32);
b.Save("c:\\test.bmp", ImageFormat.Bmp);
it is also giving same error.
I think it should create blank bmp.
Thanks,
Rushiraj
|
|
|
|
|
'A generic error occured' usually means the error is within the underlying, Win32 stuff.
One thing that will generate this error, is if you have a bitmap somewhere that was opened from this path, as it will have a lock on the file in question.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
"A generic error occurred in GDI+" indicates something went wrong in Win32 code.
I guess bmp.Save failed because of: file in use, path does not exist, disk full,
or something similar. Try the same path with either Windows Explorer manually,
or programmatically with File or FileInfo; that should tell you what the problem is.
|
|
|
|
|
mahmoud wafy24 wrote: please I want a solution to this problem quickly
Yeah, as opposed to the other folks here, who are all hoping it takes a week, I know.
This is still a stupid question. Perhaps if you took the advice you were given, and phrased your question better, we'd have some idea what you're talking about.
I assume you're selecting from a database. My advice would be, turn off your computer. Buy a book on SQL ( or perhaps learn how to use google, which means turning the PC back on ). Work through whatever tutorial you select.
And, in future, don't just ask the same question over and over, think about what the answers you get mean, and how you can help us to help you. If you mean something other than how do you add more than one column to a SQL statement, then please make clear what it is that you mean.
For the record, select * from myTable will return all columns, select col1, col2 from myTable will return the columns names col1 and col2.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You need to write code to support drag and drop for the object you're dragging/dropping. There are tutorials on MSDN
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello everyone!
I have 2 programs, a server and a client. If I start them both on the same computer, it works flawlessly. However, if I try a computer on the network (which I can do Windows file/printer sharing with) with one of the apps, the client says that the target machine actively refused it.
At first I thought it was my router, since I've been having some problems with it lately. But then I used my neighbor's wireless connection with 2 laptops and tried it, no result. So it's got to be my code.
Server:
server = new TcpListener(port);
server.Start();
Client:
sock = new TcpClient(host, port);
As I said, both programs work fine on the same computer. Does anyone know why this might happen? Maybe my neighbor's router is crappy too?
Thanks in advance!
Windows Calculator told me I will die at 28.
|
|
|
|
|
I do not know if this can help....
for your information.
1) you can check your window firewall setting.
If your firewall is on,you can set the exception for port 77.
2) To get all the listenning ports at server, you can try 'netstat /a' command at Server command prompt.
-- To test the connection from client, you can also try 'telnet [hostIP] [port]' command at Client command prompt.
Wish u luck.
ccwang
|
|
|
|
|
|
I use the Windows firewall and PeerGuardian. For the Windows one, I clicked 'Unblock' the first time I ran it, and PG doesn't block it.
Netstat gives me this:
TCP presser:77 presser LISTENING
Wait, shouldn't both the local and foreign addresses be the same? Why is one 77 and the other zero?
And bola_shokry, that link didn't work.
Any more ideas? Thanks you both!
Windows Calculator told me I will die at 28.
|
|
|
|
|
sorry , i tryed the link i found it dont work (i dont know why)
anyway , go to
MSDN Forums » .NET Development » .NET Framework Networking and Communication » problem in client/server application
start the navigation from this link:
http://forums.microsoft.com/msdn[^]
i know this problem , its boring
sorry again
|
|
|
|
|
Well, his problem is kind of different. His computers can see each other on a network, mine can't.
But I got something here. I disabled both the Windows Firewall and PeerGuardian and guess what, Apache works. I tried my program but nope, that doesn't work yet. But wait a minute... 'telnet 192.168.0.100 77 ' gets through! Then how come my client doesn't?! I updated the code:
IPEndPoint ep = new IPEndPoint(IPAddress.Parse("192.168.0.100"), 77);
sock = new TcpClient(ep);
But it still isn't working... Ideas? Thanks for helping me!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Nevermind, that wasn't supposed to work. But this is:
sock = new TcpClient();
sock.Client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
sock.Connect(host, 77);
Wee, now I can play in 2 computers. Thanks VERY much!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Hello there,
I need to connect internet via C# using dialup. I can dialup existing dialup connection using wininet API but I wonder some body tell me how can we pass userid,password n dialup number at runtime. It would be appreicated please...
Best Regards,
Yousuf
|
|
|
|