|
b_girl wrote: Should I be using uint instead of uint32? Not 100% sure what the difference is, will look it up a little later...
It's the same, sort of. uint is a C# keyword for the System.UInt32 .NET type.
However, be careful using an unsigned int. It's not CLS compilant, which means that there may exist other .NET languages that might not support unsigned integers/longs.
As long as you use this struct only in your application/dll where the code is not readable from outside (marked as internal , the default one), then you're safe.
But if you plan to use this code within another .NET language which does not support unsigned data types, the you must use int instead of uint
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks... I'll keep that in mind
|
|
|
|
|
|
I did see that earlier but it doesn't show the format I need to put the IP addresses in so that they are accepted. For example dwForwardDest = 10.11.0.0 would obviously not be correct.
|
|
|
|
|
Hi,
Well the title says it all
Anyone know how?
Thanks in advance!
|
|
|
|
|
Are you talking about the actual number of bytes in the file name? Or the number of bytes in a file specified by a file name? For the number of bytes in a file name, figure out which encoding you're interested in (ASCII? Unicode? etc.), then use System.Text.Encoding.[encoding name here].GetBytes .
|
|
|
|
|
Why would anybody want to get the number of bytes of a file name? I think the threadstarter just did not ask precise enough
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Greeeg wrote: Why would anybody want to get the number of bytes of a file name?
I have no idea, but that's certainly not the strangest request I've seen in this forum.
|
|
|
|
|
Someone might want to do something strange like that, but I assumed that if someone was going to do something advanced as that, he would be capable of asking a more precise question.
---
b { font-weight: normal; }
|
|
|
|
|
Contrary to Judah, I assume that you don't want what you are actually asking for, but the size of a file.
To get the size of a file from the name, you use the Length property of the FileInfo class:
FileInfo info = new FileInfo(fileName);<br />
int length = info.Length;
---
b { font-weight: normal; }
|
|
|
|
|
Hi guys,
Sorry if i confused you all.
I'm trying to close a program with a condition.
If the program saved the data to an xml file, it can close. Otherwise it has to remain open.
In order to know if the data is saved, i just ask the size of the file in bytes to see if that has increased or not.
So how do i check the content in bytes of a file?
Thanks in advance!
|
|
|
|
|
Yustme wrote: So how do i check the content in bytes of a file?
You mean the size of the file? If you read my first reply, instead of just replying to it, you will find that I alread answered that question before you even asked it.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa,
I did. But i got an error, so i thought maybe this wasn't it...
Now i got it fixed tho.
Instead of int, shoulda been long
Thanks for your help!
|
|
|
|
|
Hey all,
I need to create a Custom Control that draws a line in the form with each end anchored to other controls. The Custom Control should show the drawing of the line once it is being drawn and able to redraw itself automatically once the anchored controls are moved. Can someone tell me how i can go about to accomplish this? Just want to know what might be need (class, namespace, etc and concept...) Cant seem to be able to figure one out.
Thanks in advance!
Tom
|
|
|
|
|
Create a custom control that takes has 2 properties: Control1, Control2. When either of those properties get set, add an event handler for LocationChanged. In the LocationChanged handler, update the destination coordinates of the line you want to draw, then call Invalidate. In the OnPaint override, draw a line between your destination coordinates.
|
|
|
|
|
Thx Jusah! I will give it a try.. didnt thought about using two Controls as properties before. Thx thx.
Tom
|
|
|
|
|
Thx Judah! I will give it a try.. didnt thought about using two Controls as properties before. Thx thx.
Tom
|
|
|
|
|
Hi
My application is written by C# and I load the bitmap onto button but this image with alfa channel .
how can i hide the alpha channel/layer
Plaese tell me the code.
Thanks you all in advance, I'm greatly appreciate
for your help. Have a good one...
Parshant
Parshant
|
|
|
|
|
The alpha channel decides the opacity of the other channels. In what manner do you want to "hide" the aplha channel? Do you want to make the image opaque?
---
b { font-weight: normal; }
|
|
|
|
|
Hi all,
I m working on a desktop based application which talks to web service.
i want to do some client side caching sort of thing for this application, like when user install my application then it has to install sqlserver express also at client side "if not found" where I can store some frequently used information.
But i have no idea abt this, how can i do this STUCK UP
pls help ASAP...
Thanx in advance
Anuj
|
|
|
|
|
So you need persistence in a desktop application? That is pretty basic stuff. What is your specific problem?
led mike
|
|
|
|
|
When some one first time start my application then i need to install sqlserver express 2005 at client side, then i have to create a database into it where i ll sync data from my web service to client side database i have written a thread for this.
but no idea how can i install sql xpress at client side using c#.
even if we can do this using installation wizard that will be also ok.
i m totally confuse abt the same pls help me out.
and even if u have done this pls send me your chat id we can chat on this when ever u get time.
Thanx
Anuj
|
|
|
|
|
They hide that information in the Documentation[^]
see the section titled: Deploying SQL Server 2005 Express Edition by Using a Wrapper
led mike
|
|
|
|
|
|
Hi
i use a button.and put a image on it the image has a rounded button shape
and extra color appear to make a full image .the exrta color can be hide by alfa channel.
plz tell me how to create a rounded button with a rounded image
Parshant
|
|
|
|