|
lol ok - although all you have to do with mine is copy and paste that line
|
|
|
|
|
At least with my method, he knows how to go get a different character if he wants. I didn't write anything for him...he's writing it himself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: he knows how to go get a different character if he wants
Exactly, I've experimented with some odd characters, such as some of the ones from Symbol font and that yields some fun results. As far as copying and pasting the code James supplied, VS 2005 Express complains about unicode issues. So Dave's approach floats the boat
Paul
|
|
|
|
|
I have not used the Express version, but my guess is that all it does is ask you to save the file in Unicode. It really should be default using Unicode anyway - use of ANSI should carry the death penalty.
|
|
|
|
|
Hello Imoelleb,
I went ahead and let it save as unicode and everything was fine. I still would prefer Dave's solution. It is requires only setting the textbox control's properties and it is simple enough
Paul
|
|
|
|
|
Dave Kreskowiak wrote: get a different character if he wants
I've used Symbol font with ascii hex 4A which is a Happy Face and it could be used to really throw people off
PC
|
|
|
|
|
Hello,
I am studing and trying to understand just when and where to use the Enum in the format below.
can someone please let me know how they use this and where and when to implement this?
thanks,,,
erik
Dim s As String
For Each s In [Enum].GetNames(GetType(Colors))
Console.WriteLine(s)
Next s
|
|
|
|
|
[Enum].GetNames() is a static (shared in VB.NET) function that returns an array names for the constants defined in a Type. In your case, this will return an array of names for constant values define in the Colors class.
Enum.GetNames Method[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The following is code written in C# using .NET Framework 2.0 and
VS 2005. I'm getting an exception, error #10022, when I call IOControl().
I tried different values for the parameters to IOControl(), and still get the same error.
Can anybody help clear this up as to why I'm getting this error?
Thx,
T
socket.SetSocketOption(SocketOptionLevel.IP,SocketOptionName.HeaderIncluded,1);
byte []IN = new byte[4]{1, 0, 0, 0};
byte []OUT = new byte[4];
int SIO_RCVALL = unchecked((int)0x98000001);
int ret_code = socket.IOControl(IOControlCode.ReceiveAll, IN, OUT);
ret_code = OUT[0] + OUT[1] + OUT[2] + OUT[3];
if(ret_code != 0)
ret_val = false;
|
|
|
|
|
10022 means Invalid Argument in the Sockets API docs, here[^].
One of the parameters you sent wasn't correct for the mode you've setup or was just plain grabage. You might want to check the parameters you're sending against the docs[^] for WSAIoCtl.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
I knew that the error means Invalid Argument, but
looking at the docs for WSAIoCtl, the values I'm
passing in all seem valid.
Socket.RcvAll is a constant in .NET, and the other
two are optional values.
Every other code snippet i've seen has similar values
for IoControl().
Any other thoughts?
Thx,
Tom
|
|
|
|
|
Since the ReceiveAll option requires the socket type be RAW, would your machine happen to be running Windows XP SP1 or SP2? Are you developing this under an Admin equivilent account?
You might also find this[^] a bit interesting.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 12:31 Monday 23rd January, 2006
|
|
|
|
|
Yes, Windows XP SP2 and under an Admin privileged account.
Does that mean it can't be done?
|
|
|
|
|
It can be done. Under XP, you have to jump through all these hoops to get it to work. Look at the second link I posted and there's a link at the bottom of that page. Make sure all your ducks are in a row, per those pages, and you should be OK.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
If I'm following the links you are talking about correctly, one of them mentions
turning on ICF if running SP1, and the other mentions if u want to use
raw sockets without restriction, use Windows 2003 Server.
In both cases it seems as if the issue is with sending data on Raw
sockets. In my example, i'm actually trying to receive data on
raw sockets.
So, given that, it seems like it should work.
This error is preventing me from proceeding. Any other
thoughts on how to solve this?
Also, Thanks again for your help to this point.
Tom
|
|
|
|
|
I've tried to search in the forum, but can not find the answer I want. So, here is my question.
1. I create setup and deployment project by Visual Studio 2005. In default settings, there is no shortcuts created in the "User's Programs Menu", so, I added the shortcut from [Application Folder]. I build the project and got 1 setup.exe and 1 MSI file then. After using setup file to install this program, I deleted the setup file and MSI file. And error occurred at 2nd time I launch this application from "Start" menu. Error message is:
An installation package for the product xxxxx can not be found. Try the installation again using a valid copy of the installation package.
I found the problem is, the installation MSI file should not be removed after installation. Why?? That's not reasonable.
2. I can not find a way to build out only one setup.exe file which is a combinition of original setup.exe file and my MSI file. Is it possible to achieve this by Visual Studio 2005?
www.phonol.com
eric
|
|
|
|
|
1) The appication is trying to find the MSI file so it can verify that the installation is OK and do any necessary repairs. The Setup and Deployment project is crap IMHO. It's a bare bones, pain in the a$$ simple installation builder. You'd be much better off using a professional product, something like InstallShield, to build your installs. You'll have much better control over how your install works.
2) No, the Setup and Deployment project doesn't support outputting to an .EXE only.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks, Dave,
For question 1, is there any possible solution for this situation? How can I create a direct shortcut to my .EXE program file of program folder so that the shortcut doesnt need to reference to installation MSI package? Or any other way to solve this problem by using Visual Studio?
Thanks, again
Eric at www.phonol.com
|
|
|
|
|
Without using 3rd party tools, there isn't one.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know of any good resources for working with scrollbars? Here's the scenario:
I'm trying to create a control similar to visual studio .net 2005's Error list. I couldn't find any way of making the lisbox control in details view fill the entire area (with the second header being the autofill member) so I moved on from there. Given that my version of the control doesn't have to be very complicated, I sat down to write my own version of the control. Everything went fine until I tried to get the scrollbars working.
I cannot figure out how to get the autoscrolling to work for me. Since I'm drawing my control by hand the basic autoscrolling feature just adds gibberish to the top and bottom of the control, and it also scrolls the headers that I want to keep on at all times on the control. If you look at .net's version, the scroll bar goes to the top of the control but doesn't change the headers' position. The "OnScroll" event is called after scrolling happens, and not before, which makes the control flicker as it tries to scroll and I try to prevent it. I can grab the scroll message as it's passed to the wndproc, but then the scrollbar's position isn't updated when I let go.
I figure that there has to be an easier way of working with scrollbars in .net. Does anybody know of one?
-- modified at 12:54 Sunday 22nd January, 2006
|
|
|
|
|
This is what i would do:
1) Make a new usercontrol
2) Put a new label (a label so it won't flicker) docked to the top, and bring it to front (so it wont be behind the scrollbar)
3) Set the AutoScroll property of the usercontrol to true
4) Change the height of the label as you please (according to the number of items or something)
5) Do the painting on the label
HTH!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
I appreciate the quick response but that seems to have the same issue. The problem that I'm having is that I want to create a ListView that only does details mode and has a few other features that the ListView doesn't seem to have (but really should as they're very basic things).
In fact, I'm trying to recreate the contol used in visual studio .net 2005 for reporting errors almost exactly but for my program's needs. If you play around with that control you'll notice that the second header (Description) automatically adjusts to fill extra space as the control is resized. If you have more errors than can fit the window, a vertical scrollbar appears on the right side. The scrollbar encompasses the entire control (from top to bottom that is) but it only causes the errors to scroll and leaves the headers where they are. I just want to be able to use the information from the automatic scrollbars but keep them from actually forcefully scrolling my window and replacing what I've drawn with gibberish (which is what they're doing now). I can't really seem to find any tutorials on the web for this kind of thing, and scrollbars are completely ignored in the books that I have.
|
|
|
|
|
Ah so you want to scroll the errors, but keep the headers visible? It's hard for me to imagine, i haven't got VS2005 installed. I think you need two separate labels, one for the header that wont move, and one for the errors themselves.
Something like this:
1) Make a new usercontrol
2) Put a new label (a label so it won't flicker) docked to the top and bring it to front (so it wont be behind the scrollbar)(This was BS, because AutoScroll is on ) Do the header painting on this label.
3) Put a panel on the usercontrol with dock to fill, and bring it to the front. Turn AutoScroll to true.
4) Put a label on that panel, with dock to top. Change the height of the label as you please (according to the number of items or something). Do the errors painting on this label.
Hope this works...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
Actually I went back and got your original idea to work but threw out the autoscrolling functionality and added a docked VScrollBar. I just have to manually adjust the offset and handle the scrollbar's Scroll event.
Thanks for the help.
|
|
|
|
|
Hi All
I am not able to open my previously copied project in .Net, When i try to open the webapplication it says " Unable to open the project file from the webserver ".
I have only .Sln file inside my folder. I donot have projectname.vbproj.webinfo file.
But i can create a new project.
Pls help me
Thanks
|
|
|
|